Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/boennemann/barcodes
generate austrian supermarket club card barcodes
https://github.com/boennemann/barcodes
Last synced: about 1 month ago
JSON representation
generate austrian supermarket club card barcodes
- Host: GitHub
- URL: https://github.com/boennemann/barcodes
- Owner: boennemann
- License: mit
- Created: 2014-01-22T12:46:23.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-10-25T21:19:28.000Z (about 8 years ago)
- Last Synced: 2024-10-13T18:29:15.493Z (2 months ago)
- Language: CoffeeScript
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Barcodes
The purpose of this module is to *demonstrate* how easy it is to generate barcodes for austrian supermarket club cards.
Therefore the names of the vendors are anonymized.## Installation
```bash
npm install supermarket-barcodes
```## Sample Usage
How to generate "a few" barcodes from Vendor3:
```js
var barcodes = require('supermarket-barcodes');
var rescode = require('rescode');rescode.loadModules(['ean2', 'ean5', 'ean8', 'ean13']);
for (var i = 3200000; i <= 3217000; i++) {
vendor = new barcodes.Vendor3(i);
console.log("Customer ID:\t " + vendor.customerID);
console.log("Code:\t " + vendor.code);
console.log("Checksum:\t " + vendor.checkSum);
fs.writeFile(vendor.customerID + ".png", rescode.create('ean13', vendor.code), function() {
console.log('Barcode written');
});
}
```## Build
You need node.js and git installed on your machine.
```bash
git clone [email protected]:boennemann/barcodes.git
npm install
npm install -g grunt-cli
grunt
```## Attribution
The code is based on [nocard.info](https://nocard.info/).