Skip to main content

Install

$ [sudo] pip install readme-md

Features

  • <section-name>.md sections
  • attrs/properties/methods sections - subclass readme_md.Readme
  • auto headers - if section 1st line is not empty and not # header
  • sections order - Readme.order or order.txt
  • python project (setup.cfg required) sections - install, classes, functions, cli

Classes

readme_md.Readme - README.md generator

Readme attrs __doc__
header_lvl header default lvl (4)
headers dict with sections headers (optional)
order list of sections order
sections dict with sections (loaded from .md files)
Readme methods __doc__
get_header(name) return a string with section header
get_section(name) return a string with README section
get_sections() return all sections in a list of (name, string) pairs sorted by order
load(path) load sections and order
render() render to a string
save(path='README.md') save to file

Functions

function __doc__
readme_md.broken_links(string, timeout=5) return a list with broken markdown links
readme_md.links(string) return a list with markdown links
readme_md.tables.attrs(cls) return a string with class attributes table
readme_md.tables.cls(cls) return a string with class name, description and attrs+methods+properties tables
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

# .README/examples.md, .README/features.md, .README/order.txt
$ python -m readme_md.create .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(".README").save("README.md") # load sections and create README.md

readme-md - README.md generator

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-2019.1.28.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

readme_md-2019.1.28-py2.py3-none-any.whl (7.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file readme-md-2019.1.28.tar.gz.

File metadata

  • Download URL: readme-md-2019.1.28.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for readme-md-2019.1.28.tar.gz
Algorithm Hash digest
SHA256 01492f210443fa37a0b34e051ae24ca23e4a92f0f39ef03b5c02cf09d76df455
MD5 928a2762eeeb8404eb6e69479bde91f5
BLAKE2b-256 85ab4e409d4a2afb85829b72380a6e2b59b3f9813c7f89cb273e88e9df3329ce

See more details on using hashes here.

File details

Details for the file readme_md-2019.1.28-py2.py3-none-any.whl.

File metadata

  • Download URL: readme_md-2019.1.28-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2

File hashes

Hashes for readme_md-2019.1.28-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 687b2799d9e1297f018b71a2fb4aaa22b2e23de4bf30b2b7ee4f457fcef8247f
MD5 90fd31cab1b43660e321c6af4f975c29
BLAKE2b-256 26241d3ff61664359cc6f72b8dcaed5ac2c4458e211e42c2226573646d29cc58

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2019.1.28 This release

2 files

2019.1.25

2 files

2018.12.1

2 files

2018.11.30

2 files

2018.11.28

2 files

2018.11.23

2 files

2018.11.15

2 files

0.0.2

2 files

0.0.1

1 file

0.0.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page