Command-line automation for batch exporting Vexy Lines vector art documents to PDF on macOS
Project description
this_file: README.md
Vexy Lines Utils
Export Vexy Lines .lines documents to crisp PDFs without pointing and clicking. This package provides a command-line interface for batch automation of Vexy Lines on macOS, wrapping the exact workflow described in the original vexy-lines2pdf.py script with a Fire-powered CLI.
About Vexy Lines
Vexy Lines is a creative desktop application that transforms photos, illustrations, AI-generated images and other bitmaps into expressive vector art. It reads the color value of every pixel and intelligently builds vector artwork from it.
Core Concept
Feed it a portrait, get back an engraving. Drop in a landscape, receive flowing wave patterns. The software offers twelve different ways to interpret your images, each method responding to the light and dark areas of your source image differently. Dark areas generate thick strokes, bright areas create thin ones—or reverse it for dramatic effects.
The 12 Fill Algorithms
- Linear: Classic copper-plate engravings with parallel straight lines
- Wave: Flowing parallel curves that undulate across your image
- Radial: Lines exploding from a center point like sun rays
- Circular: Concentric rings emanating outward
- Spiral: Continuous winding patterns from center to edge
- Halftone: Newspaper-style dots that scale with brightness
- Trace: Clean edge detection that converts boundaries to paths
- Wireframe: 3D-looking dimensional lattices
- Scribble: Hand-drawn energy with organic randomness
- Fractal: Intricate mathematical recursive patterns
- Text: Paint with letters and typography
- Handmade: Draw your own custom strokes for full control
Professional Features
- Layer System: Stack multiple fills, organize with groups, control visibility with masks
- Dynamic Color: Strokes pull actual colors from source images segment by segment
- 3D Mesh Warping: Wrap patterns around cylinders, drape over waves, add perspective
- Multiple Sources: Each group can reference different images for complex compositions
- Production Export: SVG, PDF, EPS for infinite scaling; PNG, JPEG for quick sharing
- Overlap Control: Fills can cut through each other creating woven effects
Files save as .lines projects that preserve every layer, fill, mask, mesh, and parameter—allowing iterative refinement.
What This Package Provides
This automation tool helps power users and studios process large batches of Vexy Lines artwork efficiently:
- Fire CLI: A
vexy-linescommand implemented with Google'sfireframework for intuitive command-line usage - Batch Processing: Recursive discovery and processing of
.linesfiles in folders or single-file operations - macOS Automation: PyXA-powered menu control for File → Export… and File → Close operations
- Smart Dialog Navigation:
pyautogui-ngkeyboard automation to navigate save dialogs and set proper filenames - Voice Feedback: Optional macOS text-to-speech announcements for accessibility
- Dry-Run Mode: Preview operations without touching the UI—perfect for CI tests or validating large batches
- Robust Error Handling: Continues processing remaining files even if individual exports fail
System Requirements
- macOS 10.14+ (required for PyXA automation framework)
- Vexy Lines desktop application installed
- Python 3.10+
- 4GB RAM minimum (same as Vexy Lines)
Installation
From PyPI (Recommended)
pip install vexy-lines-utils
From Source
git clone https://github.com/vexyart/vexy-lines-utils.git
cd vexy-lines-utils
pip install -e .
Required Permissions
Grant accessibility permissions to your Terminal/IDE for UI automation:
- Open System Preferences → Security & Privacy
- Navigate to Privacy → Accessibility
- Add your Terminal app or IDE
- Restart Terminal/IDE after granting permissions
Usage Examples
Basic Export Operations
# Export a single document
vexy-lines export ~/Art/portrait.lines
# Export everything in a folder (recursive)
vexy-lines export ~/Projects/posters
# Process specific project with verbose output
vexy-lines export ~/Clients/BigCorp/logos --verbose
# Preview what would be processed without running
vexy-lines export ~/batch --dry_run --verbose
# Get voice confirmation when batch completes
vexy-lines export ~/batch --say_summary
Advanced Workflows
# Process today's work
vexy-lines export ~/Desktop/vexy-today/ --verbose --say_summary
# Validate large batch before running
vexy-lines export ~/Archive/2024 --dry_run | grep "processed"
# Export with detailed logging for troubleshooting
vexy-lines export ~/problem-files/ --verbose 2>&1 | tee export.log
Command-Line Arguments
Required:
target: Path to a.linesfile or folder containing them (searched recursively)
Optional Flags:
--verbose: Show detailed progress including each file being processed--dry_run: Preview files that would be processed without UI automation--say_summary: Announce completion summary via macOS text-to-speech
Output Format
The command returns a structured dictionary with export statistics:
{
"processed": 10,
"success": 9,
"failed": 1,
"failures": [
["path/to/broken.lines", "Failed to open file"]
],
"dry_run": false
}
How It Works
- Discovery –
find_lines_filesresolves the target path, supports single files, and sorts recursive directory walks for deterministic runs. - App bridge –
PyXABridgelaunches/activates Vexy Lines via macOS scripting bridges and exposes a minimal interface (window_titles,click_menu_item). - Window watching –
WindowWatcherpolls the live window list so we wait for the expected document title, the Export dialog, and the Save dialog instead of relying on coarsesleep()delays. - Keyboard automation –
UIActionswrapspyautogui-ng+pyperclipto press Command-Shift-G, paste the folder path, select the filename, and confirm overwrites. - Verification – the exporter waits for the Save window to close, then checks that the new PDF exists and is non-empty before moving on.
If any step fails (missing dialog, file cannot open, permissions issue, etc.), the run continues with the next .lines document and reports the failure reason in the final summary.
Python API
For integration into larger workflows:
from pathlib import Path
from vexy_lines_utils import VexyLinesExporter, AutomationConfig
# Create custom configuration
config = AutomationConfig(
poll_interval=0.2, # Window check frequency (seconds)
wait_for_app=20.0, # App launch timeout
wait_for_file=20.0, # File open timeout
wait_for_dialog=25.0, # Dialog appearance timeout
post_action_delay=0.4 # Pause after UI actions
)
# Initialize exporter
exporter = VexyLinesExporter(config=config)
# Process files
stats = exporter.export(Path("~/Documents/vexy-projects"))
# Check results
print(f"Success rate: {stats.success}/{stats.processed}")
for path, reason in stats.failures:
print(f"Failed: {path} - {reason}")
Development
Project Structure
vexy-lines-utils/
├── src/vexy_lines_utils/
│ ├── __init__.py # Package exports
│ ├── vexy_lines_utils.py # Main implementation
│ └── py.typed # PEP 561 type marker
├── tests/
│ ├── test_package.py # Unit tests
│ └── fixtures/ # Test data
├── pyproject.toml # Package configuration
└── README.md # This file
Development Setup
# Clone repository
git clone https://github.com/vexyart/vexy-lines-utils.git
cd vexy-lines-utils
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install with development dependencies
pip install -e ".[dev,test]"
# Run tests
uvx hatch test
# Format code
uvx hatch fmt
# Type checking
uvx hatch run lint:typing
Testing Philosophy
Tests focus on the automation logic rather than UI interaction:
- Discovery logic for finding
.linesfiles - Stats tracking and error reporting
- Window watching state machines
- Dry-run mode for CI environments
Contributing
When adding features:
- Keep scope focused on
.lines→ PDF export automation - Add unit tests for new functionality
- Update this README with new options
- Follow existing code style (Ruff-formatted)
Troubleshooting
Common Issues
"PyXA is not available"
- Ensure you're on macOS
- Install with:
pip install mac-pyxa - Check Python architecture matches system
"Failed to launch Vexy Lines"
- Verify Vexy Lines.app is in /Applications
- Try launching manually first
- Check for trial/license expiration
Export dialogs timing out
- Increase timeout values in AutomationConfig
- Check if Vexy Lines has modal dialogs open
- Verify no system dialogs blocking
"Accessibility permissions required"
- Grant Terminal.app accessibility permissions
- If using VS Code/PyCharm, grant IDE permissions too
- Log out and back in after permission changes
PDFs not appearing
- Check source
.linesfiles aren't corrupted - Verify write permissions in target directory
- Look for hidden error dialogs in Vexy Lines
About
vexy-lines-utils is developed by FontLab Ltd., creators of Vexy Lines and industry-standard font editing software.
Links
License
MIT License - see LICENSE file for details.
Credits
Based on the original vexy-lines2pdf.py automation script. The package structure follows modern Python packaging standards with Fire CLI, comprehensive testing, and robust error handling.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vexy_lines_utils-1.0.6.tar.gz.
File metadata
- Download URL: vexy_lines_utils-1.0.6.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bff30e2a8330f0c277db62797e784d6b63a19c897d6e3973b48090235cdccbf
|
|
| MD5 |
af20d331e5b20c93e4e12a1e0ac7f048
|
|
| BLAKE2b-256 |
237ecf9a55162e3588dbfe149399dfc243a16b04b30ed42ddc699da702800bf4
|
File details
Details for the file vexy_lines_utils-1.0.6-py3-none-any.whl.
File metadata
- Download URL: vexy_lines_utils-1.0.6-py3-none-any.whl
- Upload date:
- Size: 34.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a4319662014fb836664d8e380c092a2247e597268b859f199d2f1fe62af56e1
|
|
| MD5 |
961e4c791f6a545382623b22153bec28
|
|
| BLAKE2b-256 |
a15c1fe1b7aaa80bf4d06360b6e47ed6e70654ca01d115c4988a35adc792520b
|