Merge pull request #102 from python-escpos/improve-packaging
Improve packaging
This commit is contained in:
commit
e43e95bcff
|
@ -0,0 +1,22 @@
|
|||
<!--
|
||||
Please feel free to delete any sections that aren't relevant.
|
||||
-->
|
||||
|
||||
<!-- mark with x between the [ ] -->
|
||||
I have:
|
||||
- [ ] searched open and closed issues for duplicates
|
||||
|
||||
### Bug description
|
||||
|
||||
### Steps to reproduce
|
||||
- add your steps here
|
||||
- as a list
|
||||
- using hyphens
|
||||
|
||||
### Device info
|
||||
<!-- Replace examples with your info -->
|
||||
**Printer:** Manufacturer Model XVI
|
||||
|
||||
**python-escpos version:** 0.0.0
|
||||
|
||||
**operating system:**
|
|
@ -0,0 +1,10 @@
|
|||
### Contributor checklist
|
||||
<!-- mark with x between the brackets -->
|
||||
- [ ] I have read the CONTRIBUTING.rst
|
||||
- [ ] I have tested my contribution on these devices:
|
||||
* e.g. Epson TM-T88II
|
||||
- [ ] My contribution is ready to be merged as is
|
||||
|
||||
----------
|
||||
|
||||
### Description
|
|
@ -12,3 +12,5 @@ temp
|
|||
# packaging and testing
|
||||
.tox/
|
||||
*.egg-info/
|
||||
build/
|
||||
dist/
|
||||
|
|
48
CHANGELOG
48
CHANGELOG
|
@ -1,48 +0,0 @@
|
|||
CHANGELOG
|
||||
|
||||
* 2012-11-15 - Version 1.0
|
||||
- Issue #2: Added ethernet support
|
||||
- Issue #3: Added compatibility with libusb-1.0.1
|
||||
- Issue #4: Fixed typo in escpos.py
|
||||
|
||||
* 2013-03-14 - Version 1.0.1
|
||||
- Issue #8: Fixed set font
|
||||
- Added QR support
|
||||
|
||||
* 2013-12-30 - Version 1.0.2
|
||||
- Issue #5: Fixed vertical tab
|
||||
- Issue #9: Fixed identation inconsistence
|
||||
|
||||
* 2014-02-23 - Version 1.0.3
|
||||
- Issue #18: Added quad-area characters (Sent by syncman1x@gmail.com)
|
||||
- Added exception for PIL import
|
||||
|
||||
* 2014-05-20 - Version 1.0.4
|
||||
- Issue #20: Added Density support (Sent by thomas.erbacher@ragapack.de)
|
||||
- Added charcode tables
|
||||
- Fixed Horizontal Tab
|
||||
- Fixed code tabulators
|
||||
|
||||
* 2015-04-21 - Version 1.0.5
|
||||
- Merge pull request #45 from Krispy2009/master
|
||||
. Raising the right error when wrong charcode is used
|
||||
. Sent by Kristi <Krispy2009@gmail.com>
|
||||
|
||||
* 2015-07-06 - Version 1.0.6
|
||||
- Merge pull request #53 from ldos/master
|
||||
. Extended params for serial printers
|
||||
. Sent by ldos <cafeteria.ldosalzira@gmail.com>
|
||||
|
||||
* 2015-08-22 - Version 1.0.7
|
||||
- Issue #57: Fixed transparent images
|
||||
|
||||
* 2015-10-27 - Version 1.0.8
|
||||
- Merge pull request #59 from zouppen/master
|
||||
. Support for images vertically longer than 256 pixels
|
||||
. Sent by Joel Lehtonen <joel.lehtonen@koodilehto.fi>
|
||||
- Updated README
|
||||
|
||||
* 2016-01-24 - Version 1.0.9
|
||||
- fix constant definition for PC1252
|
||||
- move documentation to Sphinx
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
*********
|
||||
Changelog
|
||||
*********
|
||||
|
||||
2016-01-24 - Version 1.0.9
|
||||
--------------------------
|
||||
|
||||
- fix constant definition for PC1252
|
||||
- move documentation to Sphinx
|
||||
|
||||
2015-10-27 - Version 1.0.8
|
||||
--------------------------
|
||||
|
||||
- Merge pull request #59 from zouppen/master
|
||||
- Support for images vertically longer than 256 pixels
|
||||
- Sent by Joel Lehtonen <joel.lehtonen@koodilehto.fi>
|
||||
- Updated README
|
||||
|
||||
2015-08-22 - Version 1.0.7
|
||||
--------------------------
|
||||
|
||||
- Issue #57: Fixed transparent images
|
||||
|
||||
2015-07-06 - Version 1.0.6
|
||||
--------------------------
|
||||
|
||||
- Merge pull request #53 from ldos/master
|
||||
- Extended params for serial printers
|
||||
- Sent by ldos <cafeteria.ldosalzira@gmail.com>
|
||||
|
||||
2015-04-21 - Version 1.0.5
|
||||
--------------------------
|
||||
|
||||
- Merge pull request #45 from Krispy2009/master
|
||||
- Raising the right error when wrong charcode is used
|
||||
- Sent by Kristi <Krispy2009@gmail.com>
|
||||
|
||||
2014-05-20 - Version 1.0.4
|
||||
--------------------------
|
||||
|
||||
- Issue #20: Added Density support (Sent by thomas.erbacher@ragapack.de)
|
||||
- Added charcode tables
|
||||
- Fixed Horizontal Tab
|
||||
- Fixed code tabulators
|
||||
|
||||
2014-02-23 - Version 1.0.3
|
||||
--------------------------
|
||||
|
||||
- Issue #18: Added quad-area characters (Sent by syncman1x@gmail.com)
|
||||
- Added exception for PIL import
|
||||
|
||||
2013-12-30 - Version 1.0.2
|
||||
--------------------------
|
||||
|
||||
- Issue #5: Fixed vertical tab
|
||||
- Issue #9: Fixed identation inconsistence
|
||||
|
||||
2013-03-14 - Version 1.0.1
|
||||
--------------------------
|
||||
|
||||
- Issue #8: Fixed set font
|
||||
- Added QR support
|
||||
|
||||
2012-11-15 - Version 1.0
|
||||
------------------------
|
||||
|
||||
- Issue #2: Added ethernet support
|
||||
- Issue #3: Added compatibility with libusb-1.0.1
|
||||
- Issue #4: Fixed typo in escpos.py
|
|
@ -0,0 +1,13 @@
|
|||
************
|
||||
Contributing
|
||||
************
|
||||
|
||||
This project is open to any kind of contribution. This spans from issues to documentation to pull requests.
|
||||
In order to reduce the amount of work for everyone please try to adhere to good practice.
|
||||
|
||||
The pull requests and issues will be prefilled with templates. Please fill in your information where applicable.
|
||||
|
||||
This project uses `semantiv versioning <http://semver.org/>`_.
|
||||
|
||||
For further best practices and tips on contributing please see the
|
||||
`contribution-guide <http://www.contribution-guide.org/>`_.
|
8
MANIFEST
8
MANIFEST
|
@ -1,8 +0,0 @@
|
|||
# file GENERATED by distutils, do NOT edit
|
||||
README
|
||||
setup.py
|
||||
escpos/__init__.py
|
||||
escpos/constants.py
|
||||
escpos/escpos.py
|
||||
escpos/exceptions.py
|
||||
escpos/printer.py
|
|
@ -0,0 +1,11 @@
|
|||
include *.rst
|
||||
include *.txt
|
||||
include COPYING
|
||||
include INSTALL
|
||||
include tox.ini
|
||||
recursive-include doc *.bat
|
||||
recursive-include doc *.ico
|
||||
recursive-include doc *.py
|
||||
recursive-include doc *.rst
|
||||
recursive-include doc *.txt
|
||||
recursive-include doc Makefile
|
45
README
45
README
|
@ -1,45 +0,0 @@
|
|||
ESCPOS
|
||||
======
|
||||
|
||||
Python library to manipulate ESC/POS Printers.
|
||||
|
||||
------------------------------------------------------------------
|
||||
1. Description
|
||||
|
||||
Python ESC/POS is a library which lets the user have access to all
|
||||
those printers handled by ESC/POS commands, as defined by Epson,
|
||||
from a Python application.
|
||||
|
||||
The standard usage is send raw text to the printer, but in also
|
||||
helps the user to enhance the experience with those printers by
|
||||
facilitating the bar code printing in many different standards,
|
||||
as well as manipulating images so they can be printed as brand
|
||||
logo or any other usage images migh have.
|
||||
|
||||
Text can be aligned/justified and fonts can be changed by size,
|
||||
type and weight.
|
||||
|
||||
Also, this module handles some hardware functionalities like, cut
|
||||
paper, carrier return, printer reset and others concerned to the
|
||||
carriage alignment.
|
||||
|
||||
------------------------------------------------------------------
|
||||
2. Documentation
|
||||
|
||||
Please visit project documentation at:
|
||||
https://python-escpos.readthedocs.org/en/latest
|
||||
|
||||
------------------------------------------------------------------
|
||||
3. Donations
|
||||
|
||||
There are some different prints I'd like to acquire, but unfortunately
|
||||
not all, even used, are cheaper and easy to get.
|
||||
|
||||
If you want to help funding money to get more printers or just want to
|
||||
donate because you like the project, please be in touch and I'll be
|
||||
sending my PayPal info so you can donate.
|
||||
|
||||
Thank you!
|
||||
|
||||
Manuel F Martinez <manpaz@bashlinux.com>
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
#############################################################
|
||||
python-escpos - Python library to manipulate ESC/POS Printers
|
||||
#############################################################
|
||||
|
||||
.. image:: https://travis-ci.org/python-escpos/python-escpos.svg?branch=master
|
||||
:target: https://travis-ci.org/python-escpos/python-escpos
|
||||
:alt: Continous Integration
|
||||
|
||||
.. image:: https://www.quantifiedcode.com/api/v1/project/95748b89a3974700800b85e4ed3d32c4/badge.svg
|
||||
:target: https://www.quantifiedcode.com/app/project/95748b89a3974700800b85e4ed3d32c4
|
||||
:alt: Code issues
|
||||
|
||||
.. image:: https://landscape.io/github/python-escpos/python-escpos/master/landscape.svg?style=flat
|
||||
:target: https://landscape.io/github/python-escpos/python-escpos/master
|
||||
:alt: Code Health
|
||||
|
||||
.. image:: https://readthedocs.org/projects/python-escpos/badge/?version=stable
|
||||
:target: http://python-escpos.readthedocs.org/en/latest/?badge=stable
|
||||
:alt: Documentation Status
|
||||
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
Python ESC/POS is a library which lets the user have access to all those printers handled
|
||||
by ESC/POS commands, as defined by Epson, from a Python application.
|
||||
|
||||
The library tries to implement the functions provided by the ESC/POS-commandset and supports sending text, images,
|
||||
barcodes and qr-codes to the printer.
|
||||
|
||||
Text can be aligned/justified and fonts can be changed by size, type and weight.
|
||||
|
||||
Also, this module handles some hardware functionalities like cutting paper, control characters, printer reset
|
||||
and similar functions.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
This library makes use of:
|
||||
|
||||
* pyusb for USB-printers
|
||||
* Pillow for image printing
|
||||
* qrcode for the generation of QR-codes
|
||||
* pyserial for serial printers
|
||||
|
||||
Documentation and Usage
|
||||
-----------------------
|
||||
|
||||
The basic usage is:
|
||||
|
||||
.. code:: python
|
||||
|
||||
from escpos import *
|
||||
|
||||
""" Seiko Epson Corp. Receipt Printer M129 Definitions (EPSON TM-T88IV) """
|
||||
Epson = escpos.Escpos(0x04b8,0x0202,0)
|
||||
Epson.text("Hello World")
|
||||
Epson.image("logo.gif")
|
||||
Epson.barcode('1324354657687','EAN13',64,2,'','')
|
||||
Epson.cut()
|
||||
|
||||
The full project-documentation is available on `Read the Docs <https://python-escpos.readthedocs.org>`_.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
This project is open for any contribution! Please see CONTRIBUTING.rst for more information.
|
|
@ -1 +1 @@
|
|||
_build
|
||||
_build/
|
||||
|
|
22
doc/conf.py
22
doc/conf.py
|
@ -14,11 +14,14 @@
|
|||
|
||||
import sys
|
||||
import os
|
||||
on_rtd = os.getenv('READTHEDOCS') == 'True'
|
||||
from setuptools_scm import get_version
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
sys.path.insert(0, os.path.abspath('..'))
|
||||
root = os.path.relpath(os.path.join(os.path.dirname(__file__), '..'))
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
|
@ -56,16 +59,16 @@ master_doc = 'index'
|
|||
|
||||
# General information about the project.
|
||||
project = u'python-escpos'
|
||||
copyright = u'2015, Manuel F Martinez and others'
|
||||
copyright = u'2016, Manuel F Martinez and others'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '1.0.8'
|
||||
version = get_version(root=root)
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '1.0.8'
|
||||
release = version
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -110,7 +113,16 @@ pygments_style = 'sphinx'
|
|||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
if on_rtd:
|
||||
html_theme = 'default'
|
||||
else:
|
||||
try:
|
||||
import sphinx_rtd_theme
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
except ImportError:
|
||||
print("no sphinx_rtd_theme found, switching to nature")
|
||||
html_theme = 'default'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
|
@ -134,7 +146,7 @@ html_theme = 'default'
|
|||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
html_favicon = 'pyescpos.ico'
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
.. include:: ../../CHANGELOG.rst
|
|
@ -0,0 +1 @@
|
|||
.. include:: ../../CONTRIBUTING.rst
|
|
@ -3,27 +3,7 @@
|
|||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to python-escpos's documentation!
|
||||
=========================================
|
||||
|
||||
Python ESC/POS is a library which lets the user have access to all those printers handled by ESC/POS commands, as defined by Epson, from a Python application.
|
||||
|
||||
The standard usage is send raw text to the printer, but in also helps the user to enhance the experience with those printers by facilitating the bar code printing in many different standards,as well as manipulating images so they can be printed as brand logo or any other usage images migh have.
|
||||
|
||||
Text can be justified and fonts can be changed by size, type and weight.
|
||||
|
||||
Also, this module handles some hardware functionalists like, cut paper, cash drawer kicking, printer reset, carriage return and others concerned to the carriage alignment.
|
||||
|
||||
------------
|
||||
|
||||
There are some different printers I'd like to acquire, unfortunately
|
||||
not all, even used, are cheaper and easy to get.
|
||||
|
||||
If you want to help funding money to get more printers or just want to
|
||||
donate because you like the project, please be in touch and I'll be
|
||||
sending my PayPal info so you can donate.
|
||||
|
||||
Thank you!
|
||||
.. include:: ../README.rst
|
||||
|
||||
Content
|
||||
-------
|
||||
|
@ -40,6 +20,12 @@ Content
|
|||
user/todo
|
||||
user/usage
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:caption: Developer Documentation
|
||||
|
||||
dev/contributing
|
||||
dev/changelog
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 162 KiB |
|
@ -2,3 +2,5 @@ pyusb
|
|||
Pillow>=2.0
|
||||
qrcode>=4.0
|
||||
pyserial
|
||||
sphinx-rtd-theme
|
||||
setuptools-scm
|
7
setup.py
7
setup.py
|
@ -39,12 +39,12 @@ class Tox(TestCommand):
|
|||
|
||||
setup(
|
||||
name='python-escpos',
|
||||
version='1.0.9-dev',
|
||||
use_scm_version=True,
|
||||
url='https://github.com/python-escpos/python-escpos',
|
||||
download_url='https://github.com/python-escpos/python-escpos/archive/master.zip',
|
||||
description='Python library to manipulate ESC/POS Printers',
|
||||
license='GNU GPL v3',
|
||||
long_description=read('README'),
|
||||
long_description=read('README.rst'),
|
||||
author='Manuel F Martinez',
|
||||
author_email='manpaz@bashlinux.com',
|
||||
platforms=['linux'],
|
||||
|
@ -72,6 +72,9 @@ setup(
|
|||
'pyserial',
|
||||
'six',
|
||||
],
|
||||
setup_requires=[
|
||||
'setuptools_scm',
|
||||
],
|
||||
tests_require=['tox', 'nose'],
|
||||
cmdclass={'test': Tox},
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue