osterwood / label_maker

A Simple ruby script for generating machine and human readable labels.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Label Maker

A simple ruby script for generating machine and human readable labels.

Installation

bundle install

This will install the required gems, prawn, barby, and combine_pdf, .

Usage and Ouput

./label add 29b1e28c2b96 LED0603 Red AP1608SRCPRV
./label add 42096fa6ad42 LED0603 Yellow LTST-C190YKT
./label add 1656d67b0908 LED0603 Green LTST-C190KGKT

Running these commands will generate a PDF with 3 pages (1 per label), which looks like this. The first "word" after add becomes the barcode, while all other text is printed on the line below.

Sample Barcode Labels

Once you print the labels, you can delete the PDF with:

./label clear

I'm using this script generate labels for SMT part binders like this:

SMT Book

Currently, I'm printing labels with a Brother PT-D600 (this script allows me to avoid their horrible software), and using Adafruit's barcode scanner.

The Brother printer wastes about 1" of label every time you print, so it's best to queue up a whole bunch of labels into a many page PDF (instead of printing each label one at a time).

Printing

On Mac OS, you'll have to create a custom page size that is the same as your label size (here 3/8" x 2.5"). Orientation has to be set to landscape, and I also select "High resolution".

Mac OS Print Settings

On Windows and Linux you'll likely have to do something similar to directly print these PDFs to the Brother label printer.

About

A Simple ruby script for generating machine and human readable labels.

License:MIT License


Languages

Language:Ruby 100.0%