diff --git a/Gulpfile.js b/Gulpfile.js index fa6fedbd3b..525421ad91 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -175,7 +175,7 @@ function images() { // Generate PNG versions of SVG smileys. // Output files are not optimized for size. function convertSmileysToPng() { - const pathToScript = 'scripts/convert_smileys_to_svg.py' + const pathToScript = 'scripts/convert_smileys_to_png.py' const pathToSvgSmileys = 'assets/smileys/svg/' const pathToPngSmileys = 'dist/smileys/png' const convertToPng = run(`python ${pathToScript} ${pathToSvgSmileys} ${pathToPngSmileys}`) diff --git a/scripts/convert_smileys_to_svg.py b/scripts/convert_smileys_to_png.py similarity index 90% rename from scripts/convert_smileys_to_svg.py rename to scripts/convert_smileys_to_png.py index b7c1f5d6dc..103099098d 100644 --- a/scripts/convert_smileys_to_svg.py +++ b/scripts/convert_smileys_to_png.py @@ -16,11 +16,11 @@ import cairosvg -def convert_folder_to_svg(src_folder: pathlib.Path, dst_folder: pathlib.Path) -> int: +def convert_folder_to_png(src_folder: pathlib.Path, dst_folder: pathlib.Path) -> int: """ Convert all SVGs from src_folder into PNGs and write them in dst_folder. Create dst_folder if needed. - Existing files in dst_fodler are overwritten. + Existing files in dst_folder are overwritten. Return the number of converted files. """ src_files = src_folder.rglob("*.svg") @@ -53,5 +53,5 @@ def get_cli_args(): if __name__ == "__main__": args = get_cli_args() - file_count = convert_folder_to_svg(args["source"], args["destination"]) + file_count = convert_folder_to_png(args["source"], args["destination"]) print(f"{__file__}: {file_count} files converted.")