pycco-docs / pycco

Literate-style documentation generator.

Home Page:https://pycco-docs.github.io/pycco/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for listing html files generated in index.html

vinitkumar opened this issue · comments

Ever since I used pycco, I am in love with it. It is really awesome and handy. Though I faced one problem. While recursively generating docs, I end up having a lot of html files in nested dirs (as code). Is there any way to get all of them listed nicely just using the tool? I hate the manual work of linking the html to a index.html file

I think the -i, --generate_index option is what you want:

$ pycco --help

Usage: pycco [options]

Options:
  -h, --help            show this help message and exit
  -p, --paths           Preserve path structure of original files
  -d OUTDIR, --directory=OUTDIR
                        The output directory that the rendered files should go
                        to.
  -w, --watch           Watch original files and re-generate documentation on
                        changes
  -l LANGUAGE, --force-language=LANGUAGE
                        Force the language for the given files
  -i, --generate_index  Generate an index.html document with sitemap content
  -s, --skip-bad-files  Continue processing after hitting a bad file

I leave this running when coding, running my tests and auto-updating the docs:

$ reload bash -c "cd ../ && py.test -q tests && pycco -ip src/**/*.py"

I use reload and py.test. You have to use bash rather than sh because of the extended ** globbing magic that recursively gets all nested python files.