Haskell-like intervals for Python
Project description
autoreadme
Generate READMEs with collapsable* code and corresponding output from Python.
Install
pip install autoreadme
autoreadme
Example
A typical README-edit.md file would be:
# Uses
We can cook using the following Python code:
<<cook>>
However, 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
However, 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.8.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file autoreadme-0.2101.8.tar.gz
.
File metadata
- Download URL: autoreadme-0.2101.8.tar.gz
- Upload date:
- Size: 2.8 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.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 832270b787f9d43496501ded45e921507b597b9c3c71a472863b57e28c8ffc83 |
|
MD5 | 7c3098b0b2fd7f5c0aeb3435ae3f4f66 |
|
BLAKE2b-256 | bec856d54376b051db720d6f2ac9de50887624560b739246afde52601cdf5c6e |
File details
Details for the file autoreadme-0.2101.8-py3-none-any.whl
.
File metadata
- Download URL: autoreadme-0.2101.8-py3-none-any.whl
- Upload date:
- Size: 14.9 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.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52156a3c9915363fa73e206df1fae08d03d65cad2b9eef1955d7f92ea3066a48 |
|
MD5 | f52016e072857e94d2404512f0495ab0 |
|
BLAKE2b-256 | 20307f625619e9755271959f503a6e533929ed15b549ad99f83b5d921aec0646 |