Convert text prompts to pen-plotter-ready SVG files using AI image generation and centerline vectorization.
git clone https://github.com/malvarezcastillo/txt2plotter.git
cd txt2plotter
# Create virtual environment
python3.10 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -e .
# Configure API keys
cp .env.example .env
# Edit .env with your keys
# Basic usage (A3 size)
python main.py "a geometric skull"
# Custom dimensions (A4)
python main.py "circuit board pattern" --width 297 --height 210
# Generate multiple variations
python main.py "mountain landscape" -n 5
# Reproducible generation with seed
python main.py "geometric pattern" --seed 42
# Generate 3 reproducible variations (uses seed, seed+1, seed+2)
python main.py "geometric pattern" -n 3 --seed 42
# Skip prompt enhancement
python main.py "minimalistic line drawing of a cat" --skip-enhance
# Batch mode: process multiple prompts from file
python main.py --batch prompts.txt -n 10
Create a prompts.txt file (one prompt per line, supports comments):
# My prompts
"Minimalistic isometric impossible cube, thick black lines, technical drawing."
"Single continuous line drawing of a greyhound, Picasso style."
# This is also valid (no quotes)
A geometric skull with clean vector lines
Output is organized by prompt: output/<prompt_slug>/
output/*.svg - Final plotter-ready SVGsoutput/debug/ - Intermediate files for debugging:
01_prompt_enhanced.txt - Enhanced prompt02_raster_raw.png - Generated image02_raster_binary.png - Thresholded binary03_skeleton.png - Skeletonized paths03_graph_*.png - Graph visualization03_paths.svg - Raw paths04_optimized.svg - After optimizationMIT
12 commits
5 commits
Python
100.0%
Convert text prompts to pen-plotter-ready SVG files using AI image generation and centerline vectorization.
git clone https://github.com/malvarezcastillo/txt2plotter.git
cd txt2plotter
# Create virtual environment
python3.10 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -e .
# Configure API keys
cp .env.example .env
# Edit .env with your keys
# Basic usage (A3 size)
python main.py "a geometric skull"
# Custom dimensions (A4)
python main.py "circuit board pattern" --width 297 --height 210
# Generate multiple variations
python main.py "mountain landscape" -n 5
# Reproducible generation with seed
python main.py "geometric pattern" --seed 42
# Generate 3 reproducible variations (uses seed, seed+1, seed+2)
python main.py "geometric pattern" -n 3 --seed 42
# Skip prompt enhancement
python main.py "minimalistic line drawing of a cat" --skip-enhance
# Batch mode: process multiple prompts from file
python main.py --batch prompts.txt -n 10
Create a prompts.txt file (one prompt per line, supports comments):
# My prompts
"Minimalistic isometric impossible cube, thick black lines, technical drawing."
"Single continuous line drawing of a greyhound, Picasso style."
# This is also valid (no quotes)
A geometric skull with clean vector lines
Output is organized by prompt: output/<prompt_slug>/
output/*.svg - Final plotter-ready SVGsoutput/debug/ - Intermediate files for debugging:
01_prompt_enhanced.txt - Enhanced prompt02_raster_raw.png - Generated image02_raster_binary.png - Thresholded binary03_skeleton.png - Skeletonized paths03_graph_*.png - Graph visualization03_paths.svg - Raw paths04_optimized.svg - After optimizationMIT
12 commits
5 commits
Python
100.0%