Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

autoreadme

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autoreadme

Generate READMEs with collapsable* code and corresponding output from Python

  • 0.2302.3
  • PyPI
  • Socket score

Maintainers
1

test codecov

autoreadme

Generate READMEs with collapsable* code and corresponding output from Python.

Installation

from package

# Set up a virtualenv. 
python3 -m venv venv
source venv/bin/activate

# Install from PyPI
pip install autoreadme

from source

git clone https://github.com/davips/autoreadme
cd 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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc