A tool to eat grid diagrams and generate its front projection.
Project description
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
- ???
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
grid2fp-0.0.10.tar.gz
(16.4 kB
view details)
Built Distribution
grid2fp-0.0.10-py3-none-any.whl
(17.1 kB
view details)
File details
Details for the file grid2fp-0.0.10.tar.gz
.
File metadata
- Download URL: grid2fp-0.0.10.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4109f6173f1883808febf0d090d0f85e21fff5c31939762ed15b9edafa307143 |
|
MD5 | 1700ba0eded2b9d90e61a6dd6aafa074 |
|
BLAKE2b-256 | b8ed2f01744b097ffa2d0ac3888bab5a1d149a7e65e226b02dbb1709acb19806 |
File details
Details for the file grid2fp-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: grid2fp-0.0.10-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fc1fe9b31e89326d658e093ec08244a0cfc8804e17becd35ccc4eb147fa4549 |
|
MD5 | 77f2da69e62a2beeb4322149549b589b |
|
BLAKE2b-256 | c70ac5605bc00e02f860953628375c4c53668d81d971ff18da41100ea2906715 |