Skip to main content

CLI tool to convert images to the LaTeX bezier curves formulas

Project description

Img2Desmos

This is a simple python script that converts an image to the bezier curves which can be plotted on desmos.

image

Requirements

  • Python 3.11
  • Poetry
  • [Optional] Chafa (for previewing images in terminal)

Installation

pip install img2desmos

Usage

> img2desmos --help
                                                                                             
 Usage: img2desmos [OPTIONS] IMG                                                             
                                                                                             
╭─ Arguments ───────────────────────────────────────────────────────────────────────────────╮
│ *    img      TEXT  Path to the image to convert into graph [default: None] [required]    │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ─────────────────────────────────────────────────────────────────────────────────╮
│ --output   -o      TEXT     Output formulas file path [default: None]                     │
│ --preview  -p               Preview the img in a window (chafa is required)               │
│ --upper            INTEGER  Upper threshold for the edge detection [default: 200]         │
│ --lower            INTEGER  Lower threshold for the edge detection [default: 100]         │
│ --help                      Show this message and exit.                                   │
╰───────────────────────────────────────────────────────────────────────────────────────────╯

Formulas will be pasted into clipboard

Demo

https://github.com/Perchinka/img2desmos/assets/34923601/b34c509b-6fae-4e57-8f8f-7d76a0139e42

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

img2desmos-1.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

img2desmos-1.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file img2desmos-1.1.0.tar.gz.

File metadata

  • Download URL: img2desmos-1.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.9.19 Linux/6.5.0-1017-azure

File hashes

Hashes for img2desmos-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9a349c0f7c8fbcff8eb0c29f476d13360d5ad1fa5c4fda455fd4111bc6da6e95
MD5 87e7b6ce9d1f5af274dbdc699cc3b91b
BLAKE2b-256 e2cab35d028361381a22ce0acc53b6306f490c411ca55de6fca560234e260557

See more details on using hashes here.

File details

Details for the file img2desmos-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: img2desmos-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.9.19 Linux/6.5.0-1017-azure

File hashes

Hashes for img2desmos-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcd6d538f74cf884236c563e4fb618ff17fffe8cf0499df0c2b9f4d942eb0257
MD5 9865422ee5d22d8f6082ad971d93556b
BLAKE2b-256 ea4bb5fe569d9c98ee71e59160f21aec3f5ccd9c5caa0f50e30fc40636601ee6

See more details on using hashes here.

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