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.attrs(cls) |
return README attributes of a class in a list of (name, value) pairs. object __readme__ required |
readme_md.broken_links(string, timeout=5) |
return list with broken markdown links |
readme_md.classes(modules) |
return list of README classes. module __all__ or __readme__ required |
readme_md.doc(obj) |
return first line of an object docstring |
readme_md.functions(modules) |
return list of README functions. module __all__ or __readme__ required |
readme_md.links(string) |
return list with markdown links |
readme_md.methods(cls) |
return README methods of a class in a list of (name, method) pairs. class __readme__ required |
readme_md.modules() |
load python files and return its module objects. setup.cfg [options] py_modules or packages required |
readme_md.properties(cls) |
return README properties of a class in a list of (name, prop) pairs. class __readme__ required |
readme_md.python_sections() |
return a dictionary with python project sections: install , classes , functions , cli . setup.cfg required |
readme_md.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.broken_links path [timeout] |
print README.md broken links |
python -m readme_md.create [path ...] |
generate README.md |
python -m readme_md.links path |
print README.md links |
Examples
# .data/README/examples.md, .data/README/features.md
$ python -m readme_md.create .data/README > README.md
$ python -m readme_md.broken_links README.md # find broken links
>>> 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.12.1.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for readme_md-2018.12.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1961899dcf4eef97e332b413f58dfed953b89d2bf9f2c3d6cec1d2c6cda05d3 |
|
MD5 | f96879a2e5034ad04a00f8c77870793a |
|
BLAKE2b-256 | 344f229bef5b8d8c468ac6e6dfda24e4a9c6ab2a421e735b48e05dfec9fab841 |