Patchu is a simple web-based tool designed to help users resize sewing blueprints. It allows users to upload a blueprint image, specify the target height, and generate a printable PDF that can be printed on A4 paper, ready to be stitched together.
- Upload blueprints (JPEG, PNG, PDF).
- Input a target height to resize the blueprint.
- Generate a multi-page PDF that divides the blueprint into A4-sized sheets.
- Easy-to-use interface with responsive design.
- Frontend: HTML, TailwindCSS for styling.
- Backend: Python with Flask to handle requests.
- Image Processing: Pillow for scaling and slicing images, ReportLab for PDF generation.
- Python 3.10+
- Docker (optional, for containerized deployment)
-
Clone the repository:
git clone https://github.com/n0ha/patchu.git cd patchu
-
Create a virtual environment and activate it:
python -m venv .venv source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Run the Flask application:
flask run
The application will be available at
http://127.0.0.1:5000
.
-
Build the Docker image:
docker build -t patchu .
-
Run the Docker container:
docker run -d -p 5000:5000 patchu
The application will be available on your local network at
http://<your-ip>:5000
.
- Open the application in your web browser.
- Upload a blueprint image file.
- Enter the target height in centimeters.
- Click "Generate PDF" to get a printable version of the blueprint.
- app.py: Main Flask application.
- templates/index.html: HTML template for the web interface.
- static/logo.png: Logo used in the interface.
- requirements.txt: List of required Python packages.
- Dockerfile: Instructions for building the Docker image.
A simple and friendly UI for resizing your blueprints.
This project is licensed under the MIT License. See the LICENSE file for more details.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.