Skip to content
Snippets Groups Projects
Commit eea35445 authored by Tomáš Orviský's avatar Tomáš Orviský
Browse files

CLI args cleanup

parent 939d93a0
Branches
No related merge requests found
......@@ -27,24 +27,18 @@ class MainScene(ZoomedScene):
if __name__ == "__main__":
argparser = argparse.ArgumentParser(prog="pyplaml")
argparser.add_argument("file")
argparser.add_argument("-sx", "--scale-x", default=1, type=float)
argparser.add_argument("-sy", "--scale-y", default=1, type=float)
argparser.add_argument("-fps", "--frames-per-second", default=60, type=int)
argparser.add_argument("-fcache", "--flush-cache", action="store_true")
argparser.add_argument("file", help="Path to .puml file")
argparser.add_argument("-sx", "--scale-x", default=1, type=float, help="Scale for x-axis")
argparser.add_argument("-sy", "--scale-y", default=1, type=float, help="Scale for y-axis")
args = argparser.parse_args()
src_file = Path(args.file)
if not src_file.is_file():
raise Exception("\"{}\" is not a file.".format(args.file))
raise FileNotFoundError(f"File not found: {args.file}")
config.output_file = src_file.stem
config.cairo_path = "media/images/"
config.ffmpeg_path = "media/videos/"
config.frame_rate = args.frames_per_second
config.flush_cache = args.flush_cache
scene = MainScene()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment