Skip to content

Commit

Permalink
Corrige les noms
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud-D committed Mar 2, 2024
1 parent 8449474 commit 0c66c21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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.")

0 comments on commit 0c66c21

Please sign in to comment.