Skip to main content

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)

Source distribution for grid2fp 0.0.10
File Size Uploaded
grid2fp-0.0.10.tar.gz 16.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for grid2fp 0.0.10
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.10 This release

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page