Haskell-like intervals for Python
Project description
autoreadme
Generate READMEs with collapsable code and corresponding output from Python.
Intallation
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.5.tar.gz
(4.2 kB
view details)
Built Distribution
File details
Details for the file autoreadme-0.2101.5.tar.gz
.
File metadata
- Download URL: autoreadme-0.2101.5.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b65602999458361567b0b49626a52addf979c7cbb2ed35773c4dacf7cac07b4a |
|
MD5 | cd97294715da570f464b6a6fa6775839 |
|
BLAKE2b-256 | c41f972cf70a819ecc6b09fdd1148da72610ef2f5251782ddbb0607ecf048dc2 |
File details
Details for the file autoreadme-0.2101.5-py3-none-any.whl
.
File metadata
- Download URL: autoreadme-0.2101.5-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc8b5e9e618c1fb8d7830b00c4a045db2e765a06cb03e79e6b6d856853897639 |
|
MD5 | 98dc62f928a75763a00945f38a94ee8f |
|
BLAKE2b-256 | b5da73e57ea5eb7481ea21e1349ccd7dfcf3f5f4eaa05d9f081917364bded8e3 |