Open cmidgley opened 4 months ago
Okay, I quickly ran pre-commit on this to fix the formatting and also did some light refactoring:
ipn_template
to ipn_format
(to make it more in line with the existing part_selection_format
config var)--ipn
options from "never", "new", "always"
to "false", "true", "overwrite"
(to make it more in line with the --interactive
settings, functionality is the same repectively)Okay, so some general thoughts on the implementation:
jinja2
?
I'd highly prefer an approach that just uses the standard str.format(...)
function.config.yaml
section, with a simple example. (Let's do this last though, once we've settled on a final implementation).setup_parameters(...)
. I'll refactor this on master by creating splitting this up into a match_parameters(...)
function which adjusts the parameters
on the api_part
directly and will be run before committing the parameters to InvenTree. Then your import_part_ipn
can be run inbetweeen those.
Adds support for setting IPN based on Jinja2 templates. See #38 for background, and the updated README for feature details.