Open cjcodeproj opened 2 years ago
Not sure if the command line syntax should be command-noun-verb or command-verb-noun
$ media movies list
$ media list movies
The command would be directed to a module in the package specified in the pyproject.toml
file under the project.scripts
block, which would be a dedicated module with a huge decision tree handling everything from the argparse object.
The command-noun-verb method makes a little more sense because there could be scenarios where not every verb is applicable to every conceivable type of content. Obviously a music album would not have a cast list. It would also work better with commands dealing with stuff like the authorship records.
The core function of the medialibrary module is reading the XML files in a repository and providing Python code representations of the data. The Proof Of Concept tools included with the module are written to show what can be made with the code base. They all provide barebones examples of things work, and can be used as instructional guides for anyone using the code base.
If further improvements are made to the proof of concept tools, they should be directed to the effort of building a separate Python module designed to act as a command line interface client.
The code should act as a command line level tool, similar to other Python tools, where a front end program is installed in a bin/ path, accessible from a user shell, capable of handling command line requests.
It will require a code base capable of handling a complex argparse command tree, and delegate the functionality to the correct module. It would also require thoughtful delegation between where the code goes in the medialibrary module, and the command line module, as well as a coordinated release effort in order to keep dependencies in check.