QUICK LOOK
Software:
rwbarcode version .32
Download:
rwbarcode zip file.
kCRT (Source code for kCRT)
Software Requirements:
Linux 2.4.x or higher with libncurses.so.5 or higher.
Hardware Requirements:
x86 system, barcode printer
Test System:
Devuan Linux, CounterPoint, Cognitive Baster Advantage Barcode Printers.
Screen Shots:
Main Screen, F9 for item list, and Enter lb for an item.
DESCRIPTION
RWBarcode can make scannable barcodes based on weight. Each label can have a different weight and price. All the Point of Sales user has to do is scan the barcode and the correct the quantity and price will be entered into the Point of Sales.
WHY?
In the process of installing CounterPoint for the Point of Sales we needed random weight barcodes for cheese, peanut butter, and fudge. We have a scale but it wasn't designed to add a printer for barcodes. There's no need for a deli setup because we package the items before putting them out. Before paying 100's or 1,000's of dollars for a scale I decided to search the Internet for more information about random weight barcodes. After searching I had everything but the software that would encode the barcode for the printer.
What we needed for the program was the following:
1) Linux console, no need for GUI. We use ltsp.org for a character based terminal.
2) Ability to print to a different printer for each label.
3) More than one label design.
4) Barcode labels to work with CounterPoint.
5) One line of description (max 25 character).
6) 100 items or less.
7) Barcode to begin with number two.
PROGRAMMING
The question now is what language are we going to use for programming? For Linux there are all kinds of programming languages. But, I like programming in Delphi from Borland. And I have Kylix for Linux. So it's going to be Kylix.
For screen control we are going to use ncurses. Kylix doesn't come with an interface for ncurses, but I found a unit on the internet called LinCRT. Special thanks to Andrei Borovsky the author of LinCRT Kylix unit v 1.0
LinCRT is not a complete interface to ncurses, but it is a start. I made changes to LinCRT to handle user input fields, added better windows handling, and updated to use libncurses.so.5 or higher. With so many changes and updates to LinCRT it's not LinCRT anymore. So I changed the name to kCRT.
After a little work RWBarcode was born! The program is being used on Devuan Linux, and was develeped and tested on SuSE 9.0 with Kylix 3. It should work and any Linux system with ncurses 5.0 or higher. It might work with older ncurses by making a link from libncurses.so.5 to your ncurses file in /lib.
CONFIGURATION
For configuration take look at prtconf and RWBL1 and RWBL2 files. The printing is controlled by the prtconf file. The commands for barcode printers are in the files RWBL1 to RWBL10. For each label code you need RWBL# file and print command in the prtconf file. The maximum number of label codes is 10. Label codes tell RWBarcode which label layout file and printer command to use.
When RWBarcode makes a label it will save it in the $HOME directory before printing. Make sure $HOME is set to the correct directory and user has read and write access. Warning, if you use the same user account for more than one person and they use the account at the same time, you might have problems because the program uses $HOME/rwblabel file for the label file before printing. RWBarcode will execute command in the prtconf to print the label file. It can be almost any kind of command. It should be some kind of lpr like lpr -Pbarcode_printer $HOME/rwblabel command. The file to print will always be rwblabel file.
CONFIGURATION - PRTCONF FILE LAYOUT
The Following is an example of prtconf file:#
# Printer command for each label number
#
# label file is in the home dir, use $HOME
#
# max of 10 label codes
#
# label 1
lpr -Y
#
# label 2
lpr -Y
CONFIGURATION - RWBL# (# = 1 to 10) FILE LAYOUT
The RWBL# (# = 1 to 10) files are used to make the file to send to the barcode printer. This holds the printer command to print the labels. Think of these files as label templates used to make the rwblabel file. We use Cognitive Blaster barcode printer, but you can use any printer if you put the correct commands in the RWBL files. RWBarcode will replace the following keywords in RWBL# files:
<DESCR1> = item line 1 description
<DESCR2> = item line 2 description
<PRICE> = Item price
<DATE_CODE> = Encoded date
<WEIGHT_BARCODE> = Barcode number.
RWBL1 file example for Cognitive Blaster Advantage barcode printer:! 0 100 82 1
PITCH 100
WIDTH 234
MULTIPLE 2
S 3X5 5 2 <DESCR1>
S 3X5 5 10 <DESCR2>
S 9X12 25 18 <PRICE>
S 5X7 5 36 <DATE_CODE>
B F5 5 65 20 <WEIGHT_BARCODE>
S 3X5 4 76 Store Name
END
CONFIGURATION - ITEMLIST FILE
The last file is itemlist. It's a text file that contains a list of all items used by RWBarcode. When RWBarcode starts, it will load this text. You do not have to edit this file. But you can if you have a lot of items or you want to remove a large group of items. Adding, editing and deleting can be done with RWBarcode too. The choice is up to you.
Example:# Random Weight Barcode Version .32 Copyright 2023 Randy Butler
#
# THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
#
# Permission to use, copy, and distribute this software and its documentation for
# any purpose with or without fee is hereby granted, provided that above copyright
# notice appear in all copies and that both that copyright notice and this
# permission notice appear in supporting documentation. Permission to modify the
# software is granted, but not the right to distribute the modified code under
# the same program name.
#
# Maximum description size is 25 characters.
# Price can not be more than $99.99
#
# Date: 02/05/2004
#
# Barcode Number, Label Code, Description, Price Per Lb
#
"1000","1","Peanut Butter","1.39"
"5400","2","Smoked Cheddar","2.89"
FUTURE
Better documentation of the program would be a good start. Allow users to use arrow keys to edit input. Change kCRT number inputs fields to be right justifed. Increase item maximim to 10,000. Why 10,000? Because barcode layout allows item numbers to be 0000 to 9999, that's 10,000 items.