grid2fp
A tool to eat grid diagrams and generate its front projections.
Disclaimer
The tool is lightly tested. I would expect bugs and strange behavior. If you find something make an issue.
Installation
Install with pip:
pip install grid2fp
Usage
CLI
Doesn't exist.
Scripting
from grid2fp import grid2fp
import drawsvg as draw
csv_path = "path"
svg_path = "path"
diagram = [["x","","o"],["","",""],["o","","x"]]
# Option 1
g = grid2fp(csv_file=csv_path,draw_crossings=False)
d = g.draw()
d.save_svg(svg_path)
# Option 2
grid2fp(csv_file=csv_path, out_file=svg_path)
# Option 3
g = grid2fp(diagram=diagram)
d = g.draw()
d.save_svg(svg_path)
# Option 4
g = grid2fp(csv_file=csv_path,string_color = "pink", crossing_color="purple")
d = g.draw()
# make some changes to d with drawsvg
d.save_svg(svg_path)
Sample images
| o | x | |||
|---|---|---|---|---|
| x | o | |||
| x | o | |||
| x | o | |||
| o | x |
| x | o | |
|---|---|---|
| o | x |
| | o | x | ||||
|---|---|---|---|---|---|---|
| o | x | |||||
| x | o | |||||
| o | x | |||||
| x | o | |||||
| o | x | |||||
| x | o |
ToDo
- CLI interface
- fit canvas to drawing better.(still not perfect)
- set string color
- ???
Release files for grid2fp 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| grid2fp-0.0.10.tar.gz | 16.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| grid2fp-0.0.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.5 kB
Release files / grid2fp-0.0.10.tar.gz
| Download URL | grid2fp-0.0.10.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4109f6173f1883808febf0d090d0f85e21fff5c31939762ed15b9edafa307143
|
|
BLAKE2b-256 checksum How to use checksums |
b8ed2f01744b097ffa2d0ac3888bab5a1d149a7e65e226b02dbb1709acb19806
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / grid2fp-0.0.10-py3-none-any.whl
| Download URL | grid2fp-0.0.10-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6fc1fe9b31e89326d658e093ec08244a0cfc8804e17becd35ccc4eb147fa4549
|
|
BLAKE2b-256 checksum How to use checksums |
c70ac5605bc00e02f860953628375c4c53668d81d971ff18da41100ea2906715
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|