Skip to main content

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


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 hashes)

Uploaded Source

Built Distribution

grid2fp-0.0.10-py3-none-any.whl (17.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page