AlexandreKempf / automacdoc

Automatic generation of documentation for mkdocs
MIT License
42 stars 10 forks source link

Welcome to AutoMacDoc

What is AutoMacDoc?

AutoMacDoc is a tool to generate documentation for Python modules or groups of functions. It is based on MkDocs and written in Python.

Why this project?

To keep it simple:

How to install ?

With pip pardi : pip install automacdoc

Recipe to make it works!

How is works ?

AutoMacDoc list all your python functions and class in the folder (in example/src here) and generate doc about it (in example here)! It creates:

Minimal project layout

 src/
     ...         # Other python files or folders
 mkdocs.yml      # The configuration file.

 src/
     ...         # Other python files or folders

 docs/
     index.md    # The documentation homepage.
     ...         # Other markdown pages, images and other files.

 site/           # The static site ready to be hosted
     index.html
     ...

Recommended Docstring

Code:

def fun(arg1: int, arg2: str = 'Hello World!'):
    """Description of your function

    **Parameters**

    > **arg1:** `int` -- Description of argument `arg1`.

    > **arg2:** `str` -- Description of argument `arg2`.

    **Returns**

    > `str` -- Description of returned object.
    """
    return arg2 + str(arg1)

Screenshot:

recommended docstring screenshot

You want more ?

Check the example folder, you will found tons of fancy elements you can now add to your documentation.