Haskell-like intervals for Python
Project description
autoreadme
Generate READMEs with collapsable* code and corresponding output from Python. Collapsable isn't enabled due to pypi incompatibility with
tag.
Install
pip install autoreadme
autoreadme
Example
A typical README-edit.md file would be:
# Uses
We can cook using the following Python code:
<<cook>>
But we can also clean:
<<clean>>
The example file (given in this repo as examples/README-edit.md) depends on two scripts.
Each script should have a # ...
line where the output until that moment is expected to appear:
examples/cook.py:
# Cooking
x = 2 * 8
print("This script prints something:", x)
# ...
examples/clean.py:
# Cleaning
y = 34 % 5
print("this script prints another thing.", y)
# ...
Running...
autoreadme -i examples/README-edit.md -s examples/ -o examples/README.md examples/README-edit.md
...will result in the following markdown:
# UsesWe can cook using the following Python code:
Cooking
x = 2 * 8 print("This script prints something:", x)This script prints something: 16
But we can also clean:
Cleaning
y = 34 % 5 print("this script prints another thing.", y)this script prints another thing. 4
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
autoreadme-0.2101.6.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for autoreadme-0.2101.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1221bb55505badde3c60db74cd33df04caca4854289b58c676f04e5e92d743c7 |
|
MD5 | 3017e61747faab7411ce0f6da8b6c3ec |
|
BLAKE2b-256 | 6c01ea8c7b76edce3248388633e848241bf5278ae2cf65437a0276896f3dc33e |