Primer commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,20 @@
|
||||
Copyright (c) 2010-2013 Thorsten Weimann
|
||||
Copyright (c) 2014 Alexander Shorin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,177 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: viivakoodi
|
||||
Version: 0.8.0
|
||||
Summary: Create standard barcodes with Python. No external modules needed (optional PIL support included).
|
||||
Home-page: https://github.com/kxepal/viivakoodi
|
||||
Author: Thorsten Weimann, Alexander Shorin
|
||||
Author-email: kxepal@gmail.com
|
||||
License: MIT
|
||||
Classifier: Development Status :: 4 - Beta
|
||||
Classifier: Environment :: Console
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: MIT License
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Programming Language :: Python :: 2
|
||||
Classifier: Programming Language :: Python :: 2.6
|
||||
Classifier: Programming Language :: Python :: 2.7
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.3
|
||||
Classifier: Programming Language :: Python :: 3.4
|
||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
||||
Classifier: Topic :: Multimedia :: Graphics
|
||||
License-File: LICENSE
|
||||
|
||||
Viivakoodi
|
||||
==========
|
||||
|
||||
`Viivakoodi` (`barcode in Suomi <https://fi.wikipedia.org/wiki/Viivakoodi>`_)
|
||||
is the fork of `pyBarcode <https://bitbucket.org/whitie/python-barcode/>`_
|
||||
project.
|
||||
|
||||
This library provides a simple way to create barcodes using only the
|
||||
Python standardlib. The barcodes where created as SVG objects.
|
||||
|
||||
Report bugs at https://github.com/kxepal/viivakoodi/issues/
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
- Setuptools/distribute for installation (new in version 0.7beta4)
|
||||
- Python 2.6 or above (including Python 3.x)
|
||||
- On Python 2.6, 3.0, 3.1: argparse (for the commandline script)
|
||||
- Program to open SVG objects (your browser should do it)
|
||||
- Optional: PIL to render barcodes as images (PNG, JPG, ...)
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Make sure you have setuptools/distribute installed.
|
||||
|
||||
Unpack the downloaded file, cd into the viivakoodi directory and run
|
||||
`python setup.py install`. Or just copy the barcode dir somewhere in
|
||||
your PYTHONPATH.
|
||||
|
||||
The best way is to use pip: `pip install viivakoodi`.
|
||||
|
||||
|
||||
Provided Barcodes
|
||||
-----------------
|
||||
|
||||
EAN-8, EAN-13, UPC-A, JAN, ISBN-10, ISBN-13, ISSN, Code 39, Code 128, PZN
|
||||
|
||||
|
||||
Todo
|
||||
----
|
||||
|
||||
- Add documentation
|
||||
- Add more codes
|
||||
- Improve Python 3 support
|
||||
- Add simple GUI
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
Interactive::
|
||||
|
||||
>>> import barcode
|
||||
>>> barcode.PROVIDED_BARCODES
|
||||
[u'code39', u'code128', u'ean', u'ean13', u'ean8', u'gs1', u'gtin',
|
||||
u'isbn', u'isbn10', u'isbn13', u'issn', u'jan', u'pzn', u'upc', u'upca']
|
||||
>>> EAN = barcode.get_barcode_class('ean13')
|
||||
>>> EAN
|
||||
<class 'barcode.ean.EuropeanArticleNumber13'>
|
||||
>>> ean = EAN(u'5901234123457')
|
||||
>>> ean
|
||||
<barcode.ean.EuropeanArticleNumber13 object at 0x00BE98F0>
|
||||
>>> fullname = ean.save('ean13_barcode')
|
||||
>>> fullname
|
||||
u'ean13_barcode.svg'
|
||||
# Example with PNG
|
||||
>>> from barcode.writer import ImageWriter
|
||||
>>> ean = EAN(u'5901234123457', writer=ImageWriter())
|
||||
>>> fullname = ean.save('ean13_barcode')
|
||||
u'ean13_barcode.png'
|
||||
# New in v0.4.2
|
||||
>>> from StringIO import StringIO
|
||||
>>> fp = StringIO()
|
||||
>>> ean.write(fp)
|
||||
# or
|
||||
>>> f = open('/my/new/file', 'wb')
|
||||
>>> ean.write(f) # PIL (ImageWriter) produces RAW format here
|
||||
# New in v0.5.0
|
||||
>>> from barcode import generate
|
||||
>>> name = generate('EAN13', u'5901234123457', output='barcode_svg')
|
||||
>>> name
|
||||
u'barcode_svg.svg'
|
||||
# with file like object
|
||||
>>> fp = StringIO()
|
||||
>>> generate('EAN13', u'5901234123457', writer=ImageWriter(), output=fp)
|
||||
>>>
|
||||
|
||||
Now open ean13_barcode.[svg|png] in a graphic app or simply in your browser
|
||||
and see the created barcode. That's it.
|
||||
|
||||
Commandline::
|
||||
|
||||
$ pybarcode{2,3} create "My Text" outfile
|
||||
New barcode saved as outfile.svg.
|
||||
$ pybarcode{2,3} create -t png "My Text" outfile
|
||||
New barcode saved as outfile.png.
|
||||
|
||||
Try `pybarcode -h` for help.
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
:v0.8: Code 128 added. Data for charsets and bars moved to subpackage
|
||||
barcode.charsets.
|
||||
|
||||
:v0.7: Fixed some issues with fontsize and fontalignment.
|
||||
Added Python 3 support. It's not well tested yet, but the tests
|
||||
run without errors with Python 3.3. Commandline script added.
|
||||
|
||||
:v0.6: Changed save and write methods to take the options as a dict
|
||||
not as keyword arguments (fix this in your code). Added option
|
||||
to left align the text under the barcode. Fixed bug with EAN13
|
||||
generation.
|
||||
|
||||
:v0.5.0: Added new generate function to do all generation in one step.
|
||||
Moved writer from a subpackage to a module (this breaks some
|
||||
existing code). UPC is now rendered as real UPC, not as EAN13
|
||||
with the leading "0".
|
||||
|
||||
:v0.4.3: Fixed bug in new write method (related to PIL) and updated docs.
|
||||
|
||||
:v0.4.2: Added write method to support file like objects as target.
|
||||
|
||||
:v0.4.1: Bugfix release. Removed redundancy in input validation.
|
||||
EAN8 was broken. It now works as expected.
|
||||
|
||||
:v0.4: Removed \*\*options from writers __init__ method. These options never
|
||||
had effect. They were always overwritten by default_options.
|
||||
New config option available: text_distance (the distance between
|
||||
barcode and text).
|
||||
|
||||
:v0.4b2: Basic documentation included. The barcode object now has a new
|
||||
attribute called `raw` to have the rendered output without saving
|
||||
to disk.
|
||||
|
||||
:v0.4b1: Support for rendering barcodes as images is implemented.
|
||||
PIL is required to use it.
|
||||
|
||||
:v0.3: Compression for SVG output now works.
|
||||
|
||||
:v0.3b1: Writer API has changed for simple adding new (own) writers.
|
||||
SVG output is now generated with xml.dom module instead of
|
||||
stringformatting (makes it more robust).
|
||||
|
||||
:v0.2.1: API of render changed. Now render takes keyword arguments
|
||||
instead of a dict.
|
||||
|
||||
:v0.2: More tests added.
|
||||
|
||||
:v0.1: First release.
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
../../../bin/pybarcode3,sha256=J5Ik6nh-6lSILoldSZNCn68o4KAgtuC7Si-Pg2Dk_W4,251
|
||||
barcode/DejaVuSansMono.ttf,sha256=v75F-6oUAS_ygis_rGeLib3WVXcKrBlr2pzNi6SzHQs,321524
|
||||
barcode/__init__.py,sha256=rMO2JiJ6nFubiqjy8341HWW623xK2b9z7t72eZQsC6A,2830
|
||||
barcode/__pycache__/__init__.cpython-311.pyc,,
|
||||
barcode/__pycache__/base.cpython-311.pyc,,
|
||||
barcode/__pycache__/codex.cpython-311.pyc,,
|
||||
barcode/__pycache__/ean.cpython-311.pyc,,
|
||||
barcode/__pycache__/errors.cpython-311.pyc,,
|
||||
barcode/__pycache__/isxn.cpython-311.pyc,,
|
||||
barcode/__pycache__/pybarcode.cpython-311.pyc,,
|
||||
barcode/__pycache__/upc.cpython-311.pyc,,
|
||||
barcode/__pycache__/writer.cpython-311.pyc,,
|
||||
barcode/base.py,sha256=ZVKka-E9uyfahKWFYlrD2KLSEVsYeSetiT6TXeIOyRo,2743
|
||||
barcode/charsets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
barcode/charsets/__pycache__/__init__.cpython-311.pyc,,
|
||||
barcode/charsets/__pycache__/code128.cpython-311.pyc,,
|
||||
barcode/charsets/__pycache__/code39.cpython-311.pyc,,
|
||||
barcode/charsets/__pycache__/ean.cpython-311.pyc,,
|
||||
barcode/charsets/code128.py,sha256=HWPUdR2O0z8HP_JGlzFVlrYQAZD_msV3a9_-6E1kNes,2896
|
||||
barcode/charsets/code39.py,sha256=LMKc5w7e9pdzm9nS97z7Pn49eJ0vjyF7VrjNDGUx77g,1264
|
||||
barcode/charsets/ean.py,sha256=K3wz_YLqKFoKqxAVQZqhN-TiJDmmN9traX-_NKOE-LU,634
|
||||
barcode/codex.py,sha256=W8VoPUvneY8eGOt_p_8vRfWAL8lD9ikqh_-OITWPscQ,7633
|
||||
barcode/ean.py,sha256=gGMKfMOv0FrwWfEch9nCLde1CnFRAnnortVQEERZkb4,4606
|
||||
barcode/errors.py,sha256=_ORPUAWplsGemcSrQflSoSpRtrJy2WrUxJxTG6Kg-Xg,714
|
||||
barcode/isxn.py,sha256=n1Wx0K-B4j_tIj4y56-dY4Foj6hqlpoEB1EemIGgiJc,3686
|
||||
barcode/pybarcode.py,sha256=RDN524h4TFBi7Wk0BSAY2EUiYhEPqJJx10KSIVb0oFU,3701
|
||||
barcode/upc.py,sha256=CJkO4zT6xt8zl4Un5JEU0PpOnDuPnJGOsL6dnCV73MY,1051
|
||||
barcode/writer.py,sha256=7ppxoeYmfv9eAuhk__JTNThdojfLtsmilhP6y08pJfw,10376
|
||||
viivakoodi-0.8.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
viivakoodi-0.8.0.dist-info/LICENSE,sha256=Wp371AuhNE8TO0tQd7wvxiTpuo1JnZfMdzEN0XoD2j8,1101
|
||||
viivakoodi-0.8.0.dist-info/METADATA,sha256=QSDifStwk1IqULkw5c5Z7aOPZ2OaEocfvERa-S1uwrs,5789
|
||||
viivakoodi-0.8.0.dist-info/RECORD,,
|
||||
viivakoodi-0.8.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
||||
viivakoodi-0.8.0.dist-info/entry_points.txt,sha256=w81gsDLjHKK4Bypy6ymK8nHFaUb5yrEIO0EciEX-Ivs,54
|
||||
viivakoodi-0.8.0.dist-info/top_level.txt,sha256=9je9uAx-6If9_--f_JipSJNQtNSMguKDPsSF-MbsxUs,8
|
||||
@@ -0,0 +1,5 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.42.0)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
[console_scripts]
|
||||
pybarcode3 = barcode.pybarcode:main
|
||||
@@ -0,0 +1 @@
|
||||
barcode
|
||||
Reference in New Issue
Block a user