label-generator

A command line utility to generate n^k labels based on label components.

Getting Started

For this example, we'll assume we are a screw company that needs labels for each type and length of screw.

For instance:

Create a new folder

bash mkdir labels cd labels

Create a manifest.toml file

toml root = "root.svg" sku = "SC-{head}-{length}"

Create a root.svg file

```svg

```

Create a new folder for our expanding components

bash mkdir head mkdir length

Add files to these folders to be injected into root.svg.

. ├── head/ │ ├── P-phillips.svg │ └── F-flat_head.svg ├── length/ │ ├── 2-inch.svg │ ├── 3-inch.svg │ └── 4-inch.svg ├── branding.svg ├── manifest.toml └── root.svg

Now we run the label generator

``` $ label-generator

SVG Label Generator

🔧 Config:

Root: root.svg SKU: SC-{head}-{length} 📦 Components: branding 📝 head 📂 length 📂 💾 Generated Files: SC-P-2 SC-P-3 SC-P-4 SC-F-2 SC-F-3 SC-F-4 ✅ Done ```

This will create an out directory with our new label files

. └── out/ ├── SC-P-2 ├── SC-P-3 ├── SC-P-4 ├── SC-F-2 ├── SC-F-3 └── SC-F-4

If we look at the SC-P-2 file, we should see that our components are injected into the SVG.

Eg:

```svg

Screw Company

Phillips

2"

```