Label generator service for
spejstore
inventory management system
fonts | ||
.editorconfig | ||
.gitignore | ||
.ruby-version | ||
Dockerfile | ||
Gemfile | ||
Gemfile.lock | ||
ipptool-print-job.test | ||
main.rb | ||
README.md |
spejstore-labelmaker
bundle install
bundle exec ruby main.rb
try it out:
GET http://localhost:4567/api/1/preview/:label.png GET http://localhost:4567/api/1/preview/:label.pdf POST http://localhost:4567/api/1/print/:label
where :label is a spejstore
label.id or item.short_id
to test without spejstore running locally, pass:
LABELMAKER_DEBUG_JSON='{"short_id":"abcdef","name":"Some long test item","owner":"testowner"}' bundle exec ruby main.rb
Make sure to pass either LABELMAKER_LOCAL_PRINTER_NAME
or LABELMAKER_IPP_PRINTER_URL
. See top of main.rb
for all env variables available.