auspice
auspice copied to clipboard
Unconventional camel case for CLI args rather than GNU convention kebab-case
Context
I was surprised to find that the (long) CLI args of Auspice are camel case rather than kebab case, as is conventional for CLIs
Description
Switch to using kebab-case by default, camel case should be kept for backwards compatibility only, but help should show kebab caes.
Examples
Current arguments
❯ npx auspice view --help
usage: auspice view [-h] [--verbose] [--handlers JS] [--datasetDir PATH]
[--narrativeDir PATH]
Launch a local server to view locally available datasets & narratives. The
handlers for (auspice) client requests can be overridden here (see
documentation for more details). If you want to serve a customised auspice
client then you must have run "auspice build" in the same directory as you
run "auspice view" from.
Optional arguments:
-h, --help Show this help message and exit.
--verbose Print more verbose logging messages.
--handlers JS Overwrite the provided server handlers for client
requests. See documentation for more details.
--datasetDir PATH Directory where datasets (JSONs) are sourced. This is
ignored if you define custom handlers.
--narrativeDir PATH Directory where narratives (Markdown files) are
sourced. This is ignored if you define custom handlers.
Good to be thinking about this. If we change these I'd be more inclined to accept any number of paths at the end of the command which are scanned for markdown / json files. This would allow you to use recursive expansion if you store files in a hierarchy etc.
auspice view [arguments] <directory> [<directory> ...]
Agree, since the directory is mandatory it makes a lot of sense to make it a positional argument
But the other args should in my view still be transitioned to standard kebab-case