Skip to content
/ doc2md Public

Extract python docstrings and save as markdown file [very lightweight and designed for my personal use case]

License

Notifications You must be signed in to change notification settings

coldfix/doc2md

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

doc2md

Simplistic utility to extract docstrings from a module or class and throw them into a simple GitHub Flavoured Markdown document. Its purpose is to quickly generate README.md files for small projects.

Project status

I stopped using this package and therefore will not push any updates (I now usually write README.rst manually). Nonetheless, you may still find it useful. Should you encounter bugs or have improvements, feel free to submit a PR. If you want to take over maintenance, feel free to contact me.

For a more feature-rich and well maintained alternative, see:

Installation

No installation necessary. However, if you want:

$ pip install doc2md

Usage

You can run this script from the command line like:

$ doc2md.py [-a] [--no-toc] [-t title] [-d depth] module-name [class-name] \
    > README.md

At the moment this is suited only for a very specific use case. It is hardly forseeable, if I will decide to improve on it in the near future.

For a simple example output document, see the generated README (i.e. the github frontpage). It is extracted from the doc2md.py file using this very utility:

$ ./doc2md.py -a -d1 doc2md > README.md

License

Copyright © 2013-2017 Thomas Gläßle t_glaessle@gmx.de

This work is free. You can redistribute it and/or modify it under the terms of the MIT license. See the COPYING file for more details.

This program is free software. It comes without any warranty, to the extent permitted by applicable law.

API

doctrim

Clean up indentation from docstrings.

Any whitespace that can be uniformly removed from the second line onwards is removed.

doc2md

Convert a docstring to a markdown text.

About

Extract python docstrings and save as markdown file [very lightweight and designed for my personal use case]

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages