txtoflow (Translate To Flowchart)
The Python library can be used to generate flowcharts from pseudo-code.
Installation
You may need to install the following graphviz tools and libraries first
On Ubuntu ...
sudo apt-get install graphviz libgraphviz-dev pkg-config
Then
pip install txtoflow
Usage
from txtoflow import txtoflow
txtoflow.generate(
'''
if (A) {
B;
} else {
C;
D;
while (E) {
F;
}
G;
}
H;
'''
)
Will generate an image named flowchart.jpg in current dir that looks like below
All the conditions and states can be arbitrary strings too
from txtoflow import txtoflow
txtoflow.generate(
'''
First Node;
if (A != 10) {
B;
} else if (Just a String) {
Another String;
} else {
Else Body;
More Statements;
while (While also works) {
While Body;
}
Link back;
}
Final Node;
'''
)
Will still generate image like below
Examples
More examples can be found here
Cmdline usage
$ > txtoflow -h
# Generates flowchart of pseudo-code from sample.c in file flow.jpg
$ > txtoflow -s sample.c -o flow.jpg
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file txtoflow-0.2.8.tar.gz.
File metadata
- Download URL: txtoflow-0.2.8.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2487dc62b7056aeff47eb3be3132897c34d5c53428c4e2d35831f148f60aa4b
|
|
| MD5 |
8b8a59f309018b77b38f99b91992dff7
|
|
| BLAKE2b-256 |
b93d8632039cfc6519d30a051675d9f2c14b16face600a7df830a67894e3350d
|
File details
Details for the file txtoflow-0.2.8-py3-none-any.whl.
File metadata
- Download URL: txtoflow-0.2.8-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33829002c3de22ebf760780c0d32762fb6dab4bd916d43642781c806a142b2c9
|
|
| MD5 |
629502c9e7210fd96513e05ce25337ae
|
|
| BLAKE2b-256 |
d2650a986149436022e3fd8b3328d9136597956fe42eacff6b26dfffbea9e2f9
|