[tools] fix argument parsing of -s option and cleanup

fixes #20
This commit is contained in:
Stefan Riesenberger 2022-03-08 18:37:22 +01:00
parent 7ea094cabc
commit cfbba20435
1 changed files with 1 additions and 5 deletions

View File

@ -174,11 +174,7 @@ def main():
raster_graphics(files, sizes)
# if "specific" parameter was specified, only render those
if args.specific:
if len(sys.argv) == 2:
print("Please specify at least one file!")
sys.exit(1)
for file in sys.argv:
for file in args.specific:
file = file.removeprefix('svg/').removesuffix('.svg')
if os.path.exists(f"svg/{file}.svg"):
files.append(f"svg/{file}.svg")