Generate README files from templates. Allow input from functions calls and cli output.
Project description
readme_patcher
Generate README files from templates. Allow input from functions calls and cli output.
cd your-project
vim README_template.rst
poetry add --group dev readme-patcher
poetry shell
readme-patcher # README.rst
Global objects
py_project
{{ py_project.repository }}
github
{{ github.name }}
{{ github.full_name }}
{{ github.description }}
badge
{{ badge.pypi }}
{{ badge.github_workflow('tests' 'Tests') }}
{{ badge.readthedocs }}
Functions
cli: Combined output (stdout and stderr) of command line interfaces (scripts / binaries)
{{ cli('awk --help') }}
func: return values of Python functions
{{ func('os.getcwd') }}
Filters
code
{{ 'print("true")' | code('python') }}
.. code-block:: python print("true")
literal
{{ func('os.getcwd') | literal }}
:: /home/repos/project
Configuration
[[tool.readme_patcher.file]]
src = "README_template.rst"
dest = "README.rst"
variables = { cwd = "func:os.getcwd", fortune = "cli:fortune --help" }
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_patcher-0.4.0.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for readme_patcher-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10658744a4bf0a545ab4dbfcd325026ddd88d85b37170f4894a43c756f6ff76a |
|
MD5 | aa168c73bb6a7d31769ae227544b6d6b |
|
BLAKE2b-256 | 7d1927ea20695e408df12a83321045b3f482cd090a1f19e54670d38542eec265 |