I’m looking for a way to generate a single Markdown (.md) file that includes all the file names, function definitions, and docstrings from my Python files. Ideally, this should traverse a directory recursively while respecting the .gitignore rules.

Does anyone know of a package that accomplishes this?

  • logging_strict@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 months ago

    Just spent the last two weeks (no exaggeration) putting documentation together. Ensuring references resolve correctly is the time consuming bit.

    extlinks, nitpick_ignore, autodoc_type_aliases, intersphinx_mapping, multiple extensions, and building inventories using sphobjinv, Table of contents using sphinx-external-toc-strict links to both ref and docs.

    The table of contents supports both .md and .rst files. With the caveat that the initial file must be index.rst.

    Having to relearn all this crap to do the same thing (e.g. mkdocs)? Would rather stick a fork in my eye.

    Here is a sample TOC config file wreck _toc.yml from package wreck. Shows globs:, file:, url: links.

    This one includes both .rst and .md strict TOC _toc.yml

    Output is a user manual web site or a pdf.

    markdown and restructuredText are input files, not the end goal.