README.md generator
Project description
Install
$ [sudo] pip install readme-md
Features
- auto headers (if section 1st line not empty and not
#
header) - section name as header title <section>.md
files as README.md sectionsinstall
,classes
,functions
,cli
README.md sections for project withsetup.cfg
Classes
readme_md.Readme
- README.md generator. attrs and properties as README sections, ordered by order
method | __doc__ |
---|---|
get_sections() |
return all sections in a list of (name, string) pairs sorted by order |
header(section_name) |
return section header string |
load_sections(path='.') |
load sections from .md markdown files |
render() |
return README string |
save(path='README.md') |
save to file |
Functions
function | __doc__ |
---|---|
readme_md.get.attrs(cls) |
return README attributes of a class in a list of (name, value) pairs. object __readme__ required |
readme_md.get.classes(modules) |
return list of README classes. module __all__ or __readme__ required |
readme_md.get.doc(obj) |
return first line of an object docstring |
readme_md.get.functions(modules) |
return list of README functions. module __all__ or __readme__ required |
readme_md.get.methods(cls) |
return README methods of a class in a list of (name, method) pairs. class __readme__ required |
readme_md.get.modules() |
load python files and return its module objects. setup.cfg [options] py_modules or packages required |
readme_md.get.properties(cls) |
return README properties of a class in a list of (name, prop) pairs. class __readme__ required |
readme_md.get.python_sections() |
return a dictionary with python project sections: install , classes , functions , cli . setup.cfg required |
readme_md.get.spec(func) |
return a string with Python function specification |
readme_md.tables.attrs(cls) |
return a string with class attributes table |
readme_md.tables.classes(classes) |
return a string with classes table |
readme_md.tables.cls(cls) |
return a string with class name, description and attrs+methods+properties tables |
readme_md.tables.functions(functions) |
return a string with functions table |
readme_md.tables.methods(cls) |
return a string with class methods table |
readme_md.tables.properties(cls) |
return a string with class properties table |
readme_md.tables.usage(modules) |
return a string with cli modules usage table. python -m module or module USAGE variable (if defined). if __name__ == "__main__" line required |
CLI
usage | __doc__ |
---|---|
python -m readme_md.create [path ...] |
generate README.md |
Examples
# .data/README/examples.md, .data/README/features.md
$ python -m readme_md.create .data/README > README.md
>>> class Readme_npm(readme_md.Readme):
order = ["description","features","install", ...]
disabled = ["generator"]
@property
def install(self):
return "`$ [sudo] npm i -g %s`" % json.loads(path)["name"]
>>> Readme(".data/README").save("README.md") # load sections and create README.md
readme-md - README.md generator
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
readme-md-2018.11.28.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for readme_md-2018.11.28-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a62868441a00c88e3fe2713680d75b3336a5b4717e1ee62f4ec9d8d554eb38e |
|
MD5 | 87e8ed9959505b2b0d83a1096e4ded4b |
|
BLAKE2b-256 | 8de435917b8b068be726ea93aa06ff7b5430f9b2ca47f90ea403583945224baa |