-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Commands section in wiki documentation #595
Comments
These tools seem like they could be used for the task (maybe they were just mentioned by @cbartz): |
I checked how md-click would work. The current release requires Click version <=7.1.2, and as such does not work with Annif. There is an open PR from a fork, which upgrades the requirement. Using that fork I got this kind of output for each command (each in separate .md file):
|
I hoped mkdocs-click would allow using a custom template for the whole wiki page, but this tool renders the Click commands documentation only to html. Markdown is used only in the template for building the html page. So mkdocs-click is not applicable for this task. Then I tried sphinx-click plugin for Sphinx with sphinx-markdown-builder. It can use a Sphinx template in .rst format. Output can look like following: Supported CLI commands in AnnifThese are the command line commands of Annif, with REST API equivalents when applicable. annif list-projectsList available projects. annif list-projects [OPTIONS] Options-v(, --verbosity( )Either CRITICAL, ERROR, WARNING, INFO or DEBUG -p(, --projects( )Set path to project configuration file or directory -v(, --verbosity( )Either CRITICAL, ERROR, WARNING, INFO or DEBUG REST equivalent::
annif show-projectShow information about a project. annif show-project [OPTIONS] PROJECT_ID Options-v(, --verbosity( )Either CRITICAL, ERROR, WARNING, INFO or DEBUG -p(, --projects( )Set path to project configuration file or directory ArgumentsPROJECT_ID()Required argument REST equivalent::
The .rst template for above:
Unfortunately there are the extra parenthesis following each option and argument, which appear on markdown generation. In normal Sphinx build to html the extra parenthesis are not present. |
sphinx-markdown-builder has a maintained fork sphinx-notes/markdown-builder and using it the extra parenthesis are not inserted to the the markdown file; I continue with that. |
The Commands page in the wiki is getting really out of date and it is missing commands such as
annif index
. I think it needs an overhaul. It would be best to try to generate some of the content automatically from the CLI command help.Thanks to @cbartz for pointing this out.
The text was updated successfully, but these errors were encountered: