Aidful-SVG is a Python script that allows users to remove small paths from SVG files. This tool provides a simple graphical interface to load SVG files, preview changes, and save the modified SVG with small paths removed.
- Load SVG files
- Interactive slider to adjust the minimum path length
- Real-time preview of the modified SVG
- Save the resulting SVG with small paths removed
-
Clone this repository:
git clone https://github.com/yourusername/aidful-svg.git
-
Navigate to the project directory:
cd aidful-svg
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the script:
python aidful-svg.py
-
Use the "Load SVG" button to select an SVG file.
-
Adjust the slider to set the minimum path length. Paths shorter than this value will be removed.
-
The preview will update in real-time as you adjust the slider.
-
When satisfied with the result, click the "Save SVG" button to save the modified SVG file.
Here's an example of the Aidful-SVG interface with an SVG file loaded that contains many small paths:
After adjusting the slider, you can see a preview of the SVG with smaller paths removed:
Aidful-SVG uses the following process to remove small paths:
- Parses the input SVG file.
- Calculates the length of each path in the SVG.
- Removes paths shorter than the user-specified minimum length.
- Generates a new SVG with the remaining paths.
- Python 3.12
- svgpathtools
- tkinter
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.