Giter Site home page Giter Site logo

berteh / print-weight-barcodes Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 8 MB

Loose goods Tare automated for Point-of-Sale - print a (barcode) label with weight from (serial) scale

License: GNU Affero General Public License v3.0

Python 89.52% Zimpl 5.63% Shell 4.84%
point-of-sale rs-232 scale zpl-printer zebra-label-printers weight label loose

print-weight-barcodes's Introduction

Scale and Print label - loose goods tare

Point-of-Sales to "weight-it-yourself" and print the Tare of (empty) containers on a barcode label.

The said barcode, glued to the container, can be used in loose goods shops to deduce the Tare from the product weight.

GUI preview in dual mode (EN)

The (default) EAN-13 barcode is compatible with Odoo module: Point Of Sale - Tare, but mostly all formats are easy to adapt (incl. QR code).

Tested with Zebra label printers (via USB) and Soehnle (Pro) scales (via COM interface)... but plenty flexible. Multilangue interface supports EN, DE, FR, PT, LU.

Tested in Xubuntu, should work in other OS (including windows provided you install Python and CUPS) with minimal changes to config file. Use at your own risks, we're happy so far.

GUI is ready for dual (above) or single (below) setup:

GUI preview in single mode (LU)

install

  1. download code and unzip (eg to ~/print-weight-barcodes)

  2. edit config.yaml to suit your devices

  3. install dependencies:

     sudo apt-get install cutecom cups python3-pip python3-tk python3-pil python3-pil.imagetk
     pip install pyserial pycups pyttk pyyaml pytest
    
  4. quick check configuration for most probable errors (configuration, access rights): pytest

  5. run cd ~/print-weight-barcodes && python3 gui.py

  6. copy launcher to desktop and update it's working directory (right clic > edit launcher) to match your script location

     cp ubuntu/'Tare Kiosk.desktop' $HOME/Desktop/
    

Current user needs to have rights to read scale weight. add him to dialout and tty groups.

sudo gpasswd --add $USER dialout
sudo gpasswd --add $USER tty

label editor

Adapt the provided label templates to your need, eg with help of

Kiosk mode

Instead of running the app manually, you can keep the app running via a custom systemd service (adapted from https://superuser.com/a/1128905)

Either use the provided script that will configure a user-service and start it on login (in Xubuntu):

./install_as_user_service.sh

Or do it manually for a finer understanding :

  • edit script-dir in TareKiosk.service to match your script location
  • cp TareKiosk.service $HOME/.config/systemd/user/TareKiosk.service
  • systemctl --user daemon-reload
  • systemctl --user enable TareKiosk.service

and install applications shortcuts on desktop:

cp ubuntu/S*.desktop $HOME/Desktop

and service startup at session login:

cp ubuntu/'Start Tare Kiosk.desktop' $HOME/.config/autostart/

You can then see service status at

systemctl --user status TareKiosk.service 

start/stop service at

systemctl --user stop TareKiosk.service
systemctl --user start TareKiosk.service

detailed Kiosk install

If you'd like to configure a whole screen-touch Xubuntu system from scratch to run this script you may be interested in the full detailed instructions in installation station de tare (french only).

support and contributions

This code is brought to you for Free by co-labor. It's likely no support will be provided as it's not our job, but you can always try opening an Issue.

Improvements are welcome as Pull-Requests.

print-weight-barcodes's People

Contributors

berteh avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.