mirror of
https://github.com/konpa/devicon.git
synced 2025-08-12 01:24:42 +02:00
Various bug fixes and reference update
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from argparse import ArgumentParser
|
||||
from build_assets.PathResolverAction import PathResolverAction
|
||||
|
||||
def get_commandline_args(peek_mode=False):
|
||||
def get_selenium_runner_args(peek_mode=False):
|
||||
parser = ArgumentParser(description="Upload svgs to Icomoon to create icon files.")
|
||||
|
||||
parser.add_argument("--headless",
|
||||
@@ -33,3 +33,12 @@ def get_commandline_args(peek_mode=False):
|
||||
help="The title of the PR that we are peeking at")
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def get_generate_markdown_args():
|
||||
parser = ArgumentParser(description="Generate markdown for the image urls passed in.")
|
||||
|
||||
parser.add_argument("img_urls",
|
||||
help="The urls of the images. Must be the string/JSON form of an array. Ex: '[1,2,3]'")
|
||||
|
||||
return parser.parse_args()
|
12
.github/scripts/build_assets/filehandler.py
vendored
12
.github/scripts/build_assets/filehandler.py
vendored
@@ -147,7 +147,7 @@ def rename_extracted_files(extract_path: str):
|
||||
print("Files renamed")
|
||||
|
||||
|
||||
def create_screenshot_folder(dir, screenshot_name: str="screenshots"):
|
||||
def create_screenshot_folder(dir, screenshot_name: str="screenshots/"):
|
||||
"""
|
||||
Create a screenshots folder in the dir.
|
||||
:param dir, the dir where we want to create the folder.
|
||||
@@ -158,5 +158,11 @@ def create_screenshot_folder(dir, screenshot_name: str="screenshots"):
|
||||
folder = Path(dir).resolve()
|
||||
if not folder.is_dir():
|
||||
raise Exception(f"This is not a dir: {str(folder)}. \ndir must be a valid directory")
|
||||
folder.mkdir(screenshot_name, exist_ok=True)
|
||||
return str(folder)
|
||||
|
||||
screenshot_folder = Path(folder, screenshot_name)
|
||||
try:
|
||||
os.mkdir(screenshot_folder)
|
||||
except FileExistsError:
|
||||
print(f"{screenshot_folder} already exist. Script will do nothing.")
|
||||
finally:
|
||||
return str(screenshot_folder)
|
||||
|
Reference in New Issue
Block a user