README generator


Keywords
readme generator, cli, generator, python, readme
License
Unlicense
Install
pip install readme-generator==2019.4.13

Documentation

Travis

Installation

$ [sudo] pip install readme-generator

Features

  • <section-name>.md, attrs/methods/props as sections
  • auto headers
  • readme_generator.Readme class

How it works

<global>/footer.md          global section
<global>/headers.json       global custom headers (optional). example: {"footer":""}
<global>/order.txt          global order. section names line by line

<local>/examples.md         custom section
<local>/order.txt           custom order     (optional)

~/.config/readme-generator - global location, $README_GENERATOR_HOME

README.md:

#### Examples
<examples.md content>

<footer.md content>

Headers

custom header:

  • headers.json {"how":"How it works"}
  • #### Insert Custom header in the first line

without header: headers.json - {"badges":""} or empty first line/empty header

Classes

class __doc__
readme_generator.Readme attrs: disabled, header_lvl, headers, locations, order. methods: load(path), save(path), render()

Executable modules

usage __doc__
python -m readme_generator [location ...] generate README.md

Examples

$ python -m readme_generator location > README.md
readme_generator.Readme("location").save("README.md")

What's Next?

create readme_generator.Readme subclass(es). use attr/methods/props as sections

class Readme(readme_generator.Readme):
    order = ["install", ..., "footer"]
    locations = readme_generator.Readme.locations + [".config/README"]
    headers = {"footer":""}
    footer = "footer ..."

    def install(self):
        return "`$ [sudo] pip install %s`" % self.name

Related projects

python-readme-generator