The work done to implement #381 and #511 has indicated that the lack of a common (internal) API for each of our sub-commands has made it challenging to implement flags like --verbose and --no-color across all commands.
#381 (comment) outlines a rough proposal for a TwineCommand which would allow sharing common patterns between commands:
- twine-wide flags can be implemented in a single place
- helpers for producing output
- settings can live on the class instance and not be passed through multiple layers of function calls
This would help ensure that all commands behave in a cohesive manner. It also could lead to a more "short and sweet" implementation for #194.
Implementing this should not result in any changes to Twine's command-line API or behavior. It likely would change our unofficial, internal API that is used by some external projects
The work done to implement #381 and #511 has indicated that the lack of a common (internal) API for each of our sub-commands has made it challenging to implement flags like
--verboseand--no-coloracross all commands.#381 (comment) outlines a rough proposal for a
TwineCommandwhich would allow sharing common patterns between commands:This would help ensure that all commands behave in a cohesive manner. It also could lead to a more "short and sweet" implementation for #194.
Implementing this should not result in any changes to Twine's command-line API or behavior. It likely would change our unofficial, internal API that is used by some external projects