Skip to content
frahugoPublic

About

Tools for printing labels for a LUGBulk

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lugbulk

Tools for helping with the task of sorting parts from a LUG bulk.

label example

command line demo


The tools were developed on Mac OS X.

  • Dymo LabelWriter 450
  • Dymo Label Software v8.7.5 for editing labels if necessary
  • Dymo Label Web Service running on port 41951
  • 28mm x 89mm labels
  • NodeJS 16.11+ installed

Installation

  • Clone the git repo locally
  • If necessary, install NodeJS. If you use ASDF, you can follow these instructions.
  • Install the packages:
cd lugbulk
cd lib
npm install
cd ../cli
npm install

Note: if you have to modify the label templates (XML files), make sure you do not have a plugin that reformats the file on save. In VS code, run command Save without formatting.

Assumptions

  • The LUG bulk order is provided in CSV format. If your order is a Google Sheet, you should export a CSV for the 'grid' of lots. See lib/test/fixture/order.csv for the expected format.
  • The printer name is "DYMO LabelWriter 450". You can see the name of the printer in the DYMO Label software.

Usage

Open a terminal window and cd to the repository, in the cli sub-folder.

To list the elements:

bin/lugbulk list elements path-to-order-csv

To list the buyers' lots:

bin/lugbulk list lots path-to-order-csv

To list the buyers:

bin/lugbulk list buyers path-to-order-csv

The list commands can send output to a CSV file by appending -o csv-file-name to the command.

Labels

The name of the label printer is hardcoded in the source code to DYMO LabelWriter 450. To change it, edit this file.

To print test labels:

bin/lugbulk print test path-to-order-csv

To print the labels for the lots:

bin/lugbulk print elements path-to-order-csv

PDF Files

To create the PDF files:

bin/lugbulk pdf elements path-to-order-csv
bin/lugbulk pdf megalots path-to-order-csv
bin/lugbulk pdf tables path-to-order-csv
bin/lugbulk pdf dispatch path-to-order-csv
bin/lugbulk pdf buyers path-to-order-csv path-to-members-csv

To show help:

bin/lugbulk

Missing lots

If some elements were not received fast enough, you can print the missings lots per member.

  1. Create a CSV and put the element IDs, one per line.

  2. Run this command:

    bin/lugbulk print missings path-to-order-csv path-to-missing-lots

You can then attach each slip to the member's megalot sheet.

Development

To run the tests and watch for changes:

cd lib
npm run test -- --watch

For the web app:

cd app
npm start

To test on a phone, HTTPS is required for the camera to work:

npm start
ngrok http 3000

To build the app artifacts for Amazon S3 and test them:

npm run build
http-server build

QUELug instructions

For a project support or LUG bulk order, first, you need to export sheet with the right buyers and quantities (the order sheet, not the nominations sheet).

  • First, go in the Google Sheet and download as CSV the two sheets (replace X with appropriate number):
    • Sheet Commande: rename to lb202X-orig.csv
    • Sheet MembresCommande: rename to lb202X-membres.csv
  • Open lb202X-orig.csv in LibreOffice or other software:
    • Make sure that the first row has LUG member IDs that are included in the bulk.
    • Review the buyers columns and remove the non-participating buyers.
    • Go at the bottom and look at the total pieces per buyer. If a buyer has 0 as the total, delete the column.
    • For column with id 164 (extra quantities), Set name to Extra and pseudo to extra (important) and put Acheteur below, like the other members.
    • Remove bottow rows (subtotals, totals, ...)
    • Then save the file as CSV format to lb202X.csv
  • Set the right URL for the CSV Google Sheet for distribution instructions in your .env file (see .env.example). The URL should be the one Google Sheet gives you when you create a public CSV link for the sheet "Soumissions".
  • Follow instruction above to generate the PDF files and labels.

Note: when generating the elements.pdf file, if an element does not fit on one page, we might have to reduce the font size of the table rows.

About

Tools for printing labels for a LUGBulk

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages