autoreadme-0.2302.3
توضیحات
Generate READMEs with collapsable* code and corresponding output from Python
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | autoreadme-0.2302.3 |
| نام | autoreadme |
| نسخه کتابخانه | 0.2302.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Davi Pereira-Santos |
| ایمیل نویسنده | dpsabc@gmail.com |
| آدرس صفحه اصلی | https://github.com/davips/autoreadme |
| آدرس اینترنتی | https://pypi.org/project/autoreadme/ |
| مجوز | GPL3 |

[](https://codecov.io/gh/davips/autoreadme)
# autoreadme
Generate READMEs with collapsable* code and corresponding output from Python.
## Installation
### from package
```bash
# Set up a virtualenv.
python3 -m venv venv
source venv/bin/activate
# Install from PyPI
pip install autoreadme
```
### from source
```bash
git clone https://github.com/davips/autoreadme
cd autoreadme
```
# Example
A typical *README-edit.md* file would be:
```markdown
# 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*:
```python3
# Cooking
x = 2 * 8
print("This script prints something:", x)
# ...
```
*examples/clean.py*:
```python3
# Cleaning
y = 34 % 5
print("this script prints another thing.", y)
# ...
```
Running...
```bash
autoreadme -i examples/README-edit.md -s examples/ -o examples/README.md examples/README-edit.md
```
...will result in the following markdown:
<blockquote>
# Uses
We can cook using the following Python code:
**Cooking**
<details>
<p>
```python3
x = 2 * 8
print("This script prints something:", x)
```
```
This script prints something: 16
```
</p>
</details>
However, we can also clean:
**Cleaning**
<details>
<p>
```python3
y = 34 % 5
print("this script prints another thing.", y)
```
```
this script prints another thing. 4
```
</p>
</details>
</blockquote>
نحوه نصب
نصب پکیج whl autoreadme-0.2302.3:
pip install autoreadme-0.2302.3.whl
نصب پکیج tar.gz autoreadme-0.2302.3:
pip install autoreadme-0.2302.3.tar.gz