Haskell-like intervals for Python
Project description
autoreadme
Generate READMEs with collapsable code and corresponding output from Python.
Intallation
pip install autoreadme
rewritereadme
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...
rewritereadme -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.1.tar.gz
(4.2 kB
view details)
Built Distribution
File details
Details for the file autoreadme-0.2101.1.tar.gz
.
File metadata
- Download URL: autoreadme-0.2101.1.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 | e753f3b908d70b62d2e7e833d0e1cb0a9061603eb975597ea7865b8b84258f48 |
|
MD5 | 0a425988c73ca5e989b9c6c57bad0330 |
|
BLAKE2b-256 | 1112b36b6b38473c7efaf88807b58957f19afca7a1d11040717e69f4d18f1826 |
File details
Details for the file autoreadme-0.2101.1-py3-none-any.whl
.
File metadata
- Download URL: autoreadme-0.2101.1-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 | 3e8bbf44364f91e0fb2aa9e09d995aa00723133e4db5ba50bf6b373da787b86d |
|
MD5 | 8af3862dc58150525eb05c923996f65d |
|
BLAKE2b-256 | caf1fc0b61e995b1262c1f417cbcb3e077f8b4a97ad1edd49436a95137f01021 |