alex-rudakov / sphinx-argparse

Sphinx extension that automatically document argparse commands and options
MIT License
49 stars 40 forks source link

Using rubric instead of TOC'able titles #85

Open j3mdamas opened 6 years ago

j3mdamas commented 6 years ago

Hi,

I was trying to implement an option to use nodes.rubric instead of nodes.title, but I didn't quite achieve it: https://github.com/j3mdamas/sphinx-argparse/commit/2b884ecfa7ab806bc076894b59e74da0f20c727f

The objective was to suppress the "Positional Arguments" and "Named Arguments" from the sidebar, but maybe I am approaching this incorrectly. I was able to change them into a rubric entry, but they still appear in the sidebar. I would assume it has to do with the nodes.section being used, but this was my first time looking into docutils. Any clue? I think suppressing these from the sidebar can be useful.

João

j3mdamas commented 6 years ago

I kind of made a work-around that works in a particular case, by using the :maxdepth: of .. toctree::, but can definitely not work in other cases

j3mdamas commented 6 years ago

Any ideas? @ribozz

mmagnus commented 5 years ago

I think similar issue https://github.com/ribozz/sphinx-argparse/issues/78

I'm getting such a mess :( I'm trying to find a way how to change it in the code, let's see where it gets me.

Screen Shot 2019-07-13 at 7 59 51 AM