src/main.py CLI is a broken stub that contradicts the README #124

Closed
opened 2026-09-08 19:08:09 +00:00 by Mark · 0 comments
Owner

src/main.py CLI is a broken stub that contradicts the README

Repo: Mark/easystitch
Severity: High — every user following the README's quick-start hits this
Found: 2026-09-08 full shakedown

Symptom

The README's quick-start command fails immediately:

$ python src/main.py data/sample.svg
ImportError: attempted relative import with no known parent package

The CLI must be invoked as python -m src.main (undocumented), which works.

What the CLI exposes vs. what the README advertises

README claim CLI reality
python src/main.py input.svg fails with ImportError
python src/main.py input.svg -f pes -o output.pes exits 1 with "Format pes not yet implemented in this version"
python src/main.py logo.png -f dst -o logo.dst exits 2 with "Input file must be an SVG file"
--visualize, --analyze, --optimize-path, --fill-density, --fill-type, --fill-angle, --threads none of these CLI flags exist

src/main.py is an 86-line hard-coded wrapper that hard-codes DST output and rejects non-SVG
input. The engine library EmbroideryPipeline.process(input_bytes=..., output_format=...)
supports all four formats (DST/PES/EXP/JEF), raster inputs via auto-vectorization, and all
the settings the README documents — but the CLI doesn't expose any of it.

Acceptable fixes (pick one)

  1. Rewrite src/main.py to expose the full EmbroideryPipeline.process(...) surface with
    proper CLI flags matching the README
  2. Update the README to clearly say "use python -m src.main ..." and remove the raster/PES/EXP/JEF
    claims from the CLI section

Repro

cd /home/b/Projects/easystitch
python src/main.py data/sample.svg              # ImportError
python -m src.main data/sample.svg              # works
python -m src.main data/sample.svg -f pes       # exits 1
python -m src.main data/test_fixtures/simple_square.png  # exits 2
## src/main.py CLI is a broken stub that contradicts the README **Repo:** Mark/easystitch **Severity:** High — every user following the README's quick-start hits this **Found:** 2026-09-08 full shakedown ### Symptom The README's quick-start command fails immediately: ``` $ python src/main.py data/sample.svg ImportError: attempted relative import with no known parent package ``` The CLI must be invoked as `python -m src.main` (undocumented), which works. ### What the CLI exposes vs. what the README advertises | README claim | CLI reality | |---|---| | `python src/main.py input.svg` | fails with ImportError | | `python src/main.py input.svg -f pes -o output.pes` | exits 1 with "Format pes not yet implemented in this version" | | `python src/main.py logo.png -f dst -o logo.dst` | exits 2 with "Input file must be an SVG file" | | `--visualize`, `--analyze`, `--optimize-path`, `--fill-density`, `--fill-type`, `--fill-angle`, `--threads` | none of these CLI flags exist | `src/main.py` is an 86-line hard-coded wrapper that hard-codes DST output and rejects non-SVG input. The engine library `EmbroideryPipeline.process(input_bytes=..., output_format=...)` supports all four formats (DST/PES/EXP/JEF), raster inputs via auto-vectorization, and all the settings the README documents — but the CLI doesn't expose any of it. ### Acceptable fixes (pick one) 1. Rewrite `src/main.py` to expose the full `EmbroideryPipeline.process(...)` surface with proper CLI flags matching the README 2. Update the README to clearly say "use `python -m src.main ...`" and remove the raster/PES/EXP/JEF claims from the CLI section ### Repro ``` cd /home/b/Projects/easystitch python src/main.py data/sample.svg # ImportError python -m src.main data/sample.svg # works python -m src.main data/sample.svg -f pes # exits 1 python -m src.main data/test_fixtures/simple_square.png # exits 2 ```
Mark 2026-09-08 19:08:09 +00:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/easystitch#124
No description provided.