sree314 / stepcvt

Generate STL files for 3D printing from STEP files
2 stars 0 forks source link

Load and write to json file in scripts #61

Closed AdiraBlumenthal closed 6 months ago

AdiraBlumenthal commented 7 months ago

load from JSON function

write to JSON function

# if args.command == "make"
#   something else
# else 
    # p = load_from_json(args.jsonFile)
    # sys.exit(args.func(args))
redrn commented 7 months ago

Centralized Loading and unloading of Project json file should appear only in the toplevel stepcvt script. Subcommand scripts shouldn't have to deal with loading json themselves. The created Project object would be passed to subcommand function call on dispatch. We should modify our subcommand function to take a Project argument followed by args. The dispatch would look like args.func(project, args).

We should all change our subcommands functions to reflect this change.

skriegsman commented 7 months ago

proj.py methods updated by commit 4a8d95fc882abe782b65ff4ca5c02cdde9d67bfa on CLI branch