Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
raghakot committed Dec 22, 2016
1 parent e81b890 commit acb640f
Show file tree
Hide file tree
Showing 3 changed files with 406 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# dev-env
.idea/
*.iml
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# API doc generator in markdown
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/raghakot/mkdocs-apidocs/blob/master/LICENSE)

I didnt want to use sphinx and reStructuredText syntax when the rest of the documentation is in markdown. I also
dont like reStructuredText syntax. Long story short, I ended up creating my own library to auto-generate
markdown docs per module using python `inspect` module.

Currently only [Google formatted docstrings](http://sphinx-doc.org/latest/ext/example_google.html) are supported.
Feel free to submit a PR for extending to other formats.

## Usage
```python
from mk_autodoc import MarkdownAPIGenerator, to_md_file

source_folder = 'src'
github_link = 'https://github.com/raghakot/mkdocs-apidocs/blob/master'
mk_gen = MarkdownAPIGenerator(source_folder, github_link)

import mymodule
md_text = mk_gen.module2md(mymodule)
to_md_file(md_text, mymodule.__name__, "docs")
```

For usage on a real project, with [MkDocs](http://mkdocs.org), see: https://github.com/raghakot/keras-vis/tree/master/docs

The autogenerated doc on that project: https://raghakot.github.io/keras-vis/
Loading

0 comments on commit acb640f

Please sign in to comment.