Skip to main content

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 sections. use Markdown Preprocessor to compile complex sections
  • readme_md.Readme attrs and properties as sections
  • predefined sections and order - Readme.order (see below)
  • install, classes, functions, cli sections for projects with setup.cfg
    • classes, functions listed in __all__ (use @public.add decorator)
    • class attrs, methods, properties listed in class __readme__
    • cli - modules with if __name__ == "__main__" and scripts (script --help output)

Classes

readme_md.Readme

README.md generator

attr default value
header_lvl 4
order ['badges', 'description', 'install', 'features', 'requirements', 'index', 'how', 'config', 'classes', 'functions', 'cli', 'examples', 'todo', 'links', 'generator']
method description
load(path='.') load sections from .md files (filename as section name)
render() render to string
save(path) save to file
__init__(path=None, **kwargs)

CLI

usage description
python -m readme_md [path ...] generate README.md

Examples

# .data/README/examples.md, .data/README/features.md
$ python -m readme_md .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


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.23.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

readme_md-2018.11.23-py2.py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page