Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ehpale/elaphe
https://github.com/ehpale/elaphe
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ehpale/elaphe
- Owner: ehpale
- License: other
- Created: 2016-05-24T20:40:54.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-07-04T18:34:28.000Z (5 months ago)
- Last Synced: 2024-11-16T08:19:01.029Z (26 days ago)
- Language: PostScript
- Size: 722 KB
- Stars: 8
- Watchers: 2
- Forks: 8
- Open Issues: 12
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
- starred-awesome - elaphe - (PostScript)
README
======
Elaphe
======Elaphe is a python binding of Barcode Writer In Pure PostScript
(http://www.terryburton.co.uk/barcodewriter/).
It generates barcode symbol as PostScript code fragment using
BWIPP. The generated code is then embedded in encapsulated
PostScript image which can be handled by PIL.Prerequisites
==============* Python 2.7 or later (functional decorators, ternary operator, and
generator expressions are used)... note::
Except ``setup.py test``, code may still work on 2.5-2.6.
* If you want to render barcode into bitmap image, EpsImagePlugin of
Python Imaging Library (http://www.pythonware.com/products/pil) or
Pillow is required. Note that EpsImagePlugin requires Ghostscript is
correctly installed.Simple Usage
=============The following example::
>>> from elaphe import barcode
>>> barcode('qrcode',
... 'Hello Barcode Writer In Pure PostScript.',
... options=dict(version=9, eclevel='M'),
... margin=10, data_mode='8bits')) # Generates PIL.EpsImageFile instance
>>> _.show() # Show rendered bitmapwill invoke some viewer which shows a QRcode symbol with 10px margin.
Remember, barcode() returns PIL image object.