Closed thehilll closed 3 years ago
Just wanted to follow up and see if you think any changes are needed here. Thanks.
Looks good but my only question is does this change any of the current behaviors? In other words is this is a breaking change?
No, it isn't breaking.
I just moved the work that you do after building the itemsToProcess
list into a function. Your wiki instructions to call generatejson.py
via cli should not need to change at all.
The improvement is that it is easier to use this as part of a larger process now, by including from generatejson import *
, building a list that matches itemsToProcess
and then calling the new function build_item_dict
. Previously we had done this by using subprocess
to mimic what you describe in the wiki, but that just seemed like a bit of a hack.
Thanks again for making this. It has been extremely valuable for us.
Clever. :)
Thanks for the PR. Merged.
Move the main loop that processes itemsToProcess (after parsing CLI args) and construction of stages dict out to a function.
The function takes only the itemsToProcess list that is constructed by parsing the args.item inputs as well as the base-url.
Within the function the code is essentially unchanged, and the function returns the completed stages dictionary.
The only other change is to remove the branch "if args.output" when constructing the savePath...args.output is required, so it will always be set (also, the alternative 'rootdir' appears to not be defined).
This version is updated to handle the newly added
pkg-skip-if
settings.