Skip to main content

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:

# Uses

We 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


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.9.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

autoreadme-0.2101.9-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file autoreadme-0.2101.9.tar.gz.

File metadata

  • Download URL: autoreadme-0.2101.9.tar.gz
  • Upload date:
  • Size: 3.4 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

Hashes for autoreadme-0.2101.9.tar.gz
Algorithm Hash digest
SHA256 d6aff232def153ea31820ab35fc9eec94f030d5b9ab95a54b1dfaf59dd3c7e04
MD5 526d3c0817920a2c3763e7ab9523a714
BLAKE2b-256 d60fa96b95efdf603cff615abeb58205ddc9f8640fa027ded6d7eecf74bca2e0

See more details on using hashes here.

File details

Details for the file autoreadme-0.2101.9-py3-none-any.whl.

File metadata

  • Download URL: autoreadme-0.2101.9-py3-none-any.whl
  • Upload date:
  • Size: 15.5 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

Hashes for autoreadme-0.2101.9-py3-none-any.whl
Algorithm Hash digest
SHA256 cb5aa4d19ad15bce9b6a8a47181c0198b956c8d3ae7e44e96e4817a4a3824934
MD5 e36eb434ba232df75df89e821c04e5f7
BLAKE2b-256 0694779ba7f1fd85816f99cd81d2f0e17097a136bdeb500f4a3d7cfc1977cc84

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page