Skip to main content

Haskell-like intervals for Python

Project description

autoreadme

Generate READMEs with collapsable code and corresponding output from Python.

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...

python3 autoreadme/rewritereadme.py -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

But 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.21.1a0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

autoreadme-0.21.1a0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file autoreadme-0.21.1a0.tar.gz.

File metadata

  • Download URL: autoreadme-0.21.1a0.tar.gz
  • Upload date:
  • Size: 2.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.0 CPython/3.9.1

File hashes

Hashes for autoreadme-0.21.1a0.tar.gz
Algorithm Hash digest
SHA256 22d7c02306724ac110a41220587d88e38d24fc4cc6cca4cefaf38d732fbb40b9
MD5 9140698ad366f1e0470b5a0bb6ea21bf
BLAKE2b-256 76e27d2344d1dfe9410c885cf5b36a15888256b51b350ad80ea037d516b2c0d5

See more details on using hashes here.

File details

Details for the file autoreadme-0.21.1a0-py3-none-any.whl.

File metadata

  • Download URL: autoreadme-0.21.1a0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 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.0 CPython/3.9.1

File hashes

Hashes for autoreadme-0.21.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 428483d92bca7312479ff1acf191ea02f18095ebb214462eef088885d125f5a6
MD5 7c298f2fc1816f8bacd6433e1404fcbb
BLAKE2b-256 26196104d1e7915caf1c8d182c4fee394bbc0d0cbdc6973f41ff94b8600167a4

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