- Overview
- Setup Instructions
- Usage Guide
- Code Structure
- Adding New Features
- Future Development and Contributions
MakerLabels is a Python script designed for creating customizable labels for various components. It's particularly useful in the context of electronics, filaments, nuts, bolts, and similar items. The script allows for extensive customization through templates, elements, and components.
- Python 3.x
- reportlab library
- Optional: QR Code support (
qrcode
andPillow
libraries)
- Clone the repository:
git clone https://github.com/xtraorange/MakerLabels.git
- Navigate to the directory:
cd MakerLabels
- Install dependencies:
pip install reportlab
- For QR code support:
pip install qrcode Pillow
To generate labels using MakerLabels:
- Configure
GenerateLabels.py
according to your needs. - Run the script:
python GenerateLabels.py
- The labels will be generated based on the specified configurations.
The original idea (and fork) for this project came from another project (details below) from Martin Stumpf. You can mimic his labels using the template created for this.
- This template replicates the style and layout of their original labels, offering a familiar and proven design for various components.
- To use this template, select the
MartinStumpfTemplate
in the script configuration and adjust the settings according to your labeling needs.
Elements are the basic units of label design, representing text, images, or shapes. Elements can have other elements within them.
TextElement
: Defines text characteristics like font, size, and content.
Templates are the blueprint for label layouts, organizing elements into a cohesive design. Templates can have other templates within them.
ResistorLabelTemplate
: A template for resistor labels, arranging elements specific to resistors.
Components are abstractions of real-world objects, making label creation more intuitive.
ResistorComponent
: Represents a resistor and its properties like resistance value and tolerance.
- Create a
.py
file in thetemplates
directory. - Define the layout using existing elements or create new ones.
- Specify positioning, sizing, and styling for each element in the template.
- Add a new
.py
file in theelements
directory. - Code the element's properties, including type (text, image, shape), dimensions, and style attributes.
- Add a
.py
file in thecomponents
directory. - Define the component's properties, including any specific label requirements and data representations.
- Expand the range of templates for different types of labels.
- Introduce more elements for greater design versatility.
- Add new components to represent a wider variety of real-world objects.
- Develop a command-line interface for easier and faster label generation.
- Fork the repository.
- Create a new branch for your changes.
- Make your changes and commit them.
- Submit a pull request with a detailed description of your changes.
This project is licensed under the MIT License - see the LICENSE file for details.
- Original project forked and loosely based on Finomnis/ResistorLabels.
- The original project was based on an idea from Zach Poff.
For more details on how to use these labels, visit his website: https://www.zachpoff.com/resources/quick-easy-and-cheap-resistor-storage/