Skip to content

Et enkelt API for enkel utskrift av utstyrsetiketter til Vågens bookingssystem

Notifications You must be signed in to change notification settings

VaagenIM/EtikettServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Etikett Server for Vågen Utstyrsbase

Simple & hacky barcode and QR code label generator API for the Vågen Utstyrsbase.

Label dimensions: 50x26mm Zebra Labels (Could update this to work for other sizes as well, but for now it's hardcoded with spaghetti code.)

QR label preview Barcode label preview

Installation

  1. Clone the repository
  2. Ensure cups is installed and Zebra printer is working
  3. Run docker compose up -d

Usage

Visit http://ip-address:5000/ in your browser to design and print labels. You can also integrate in your own application by using the API endpoints.

Endpoints

GET /preview?id={id}&name={name}&variant={variant}&category={category}

id = "A6500-01"
name = "Sony A6500"
variant = "qr"  # "qr" or "barcode", default: "qr"
category = "Camera"  # Optional, used for audits

Returns a preview of the label, useful for getting a preview of the label before printing.

POST /print (JSON)

{
  "id": "A6500-01",
  "name": "Sony A6500",
  "variant": "qr",
  "category": "Camera",
  "count": 1
}

Prints the label to the connected printer. (Requires setup of printer in app.py)

About

Et enkelt API for enkel utskrift av utstyrsetiketter til Vågens bookingssystem

Resources

Stars

Watchers

Forks