1
0
mirror of https://github.com/konpa/devicon.git synced 2025-08-23 06:33:11 +02:00

Various bug fixes and added ability to comment multiple files

This commit is contained in:
Thomas Bui
2020-12-29 21:49:39 -08:00
parent c388503d28
commit a9eb51aca5
11 changed files with 21 additions and 75 deletions

View File

@@ -1,19 +1,10 @@
from typing import List
from build_assets import arg_getters
def generate_screenshot_markdown(img_urls: List[str]):
"""
Generate the markdown for the screenshots using the
img_urls then print it to the console.
:param img_urls are valid image links.
"""
template = "![Detailed Screenshot]({})"
return [template.format(img_url) for img_url in img_urls]
import json
import os
if __name__ == "__main__":
args = arg_getters.get_generate_markdown_args()
markdown = generate_screenshot_markdown(args.img_urls)
print("\n\n".join(markdown)) # format it before printing
img_urls_list = json.loads(os.environ["IMG_URLS"])
template = "![Detailed Screenshot]({})"
markdown = [template.format(img_url) for img_url in img_urls_list]
print("\n\n".join(markdown))