From 1009cf898887ae910ae3e4a49a95e376321ee32c Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 8 Mar 2016 15:20:12 +0100 Subject: [PATCH 01/10] PCKG exclude dist/ and build/ from repository --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 6c58997..c2841b4 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ temp # packaging and testing .tox/ *.egg-info/ +build/ +dist/ From fee650faba58d6822c72650ef990836796989c91 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 8 Mar 2016 15:47:40 +0100 Subject: [PATCH 02/10] PCKG rework and streamline Readme-file --- README | 45 ------------------------------------ README.rst | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 45 deletions(-) delete mode 100644 README create mode 100644 README.rst diff --git a/README b/README deleted file mode 100644 index 337de1b..0000000 --- a/README +++ /dev/null @@ -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 - diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..56491f0 --- /dev/null +++ b/README.rst @@ -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 `_. + +Contributing +------------ + +This project is open for any contribution! From 7fdccb7245050de60bf3cd6c9e58d9486e284050 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 8 Mar 2016 16:34:20 +0100 Subject: [PATCH 03/10] PCKG add CONTRIBUTING document to repository and documentation --- CONTRIBUTING.rst | 13 +++++++++++++ README.rst | 2 +- doc/_static/.gitignore | 0 doc/dev/contributing.rst | 1 + doc/index.rst | 5 +++++ 5 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 CONTRIBUTING.rst create mode 100644 doc/_static/.gitignore create mode 100644 doc/dev/contributing.rst diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000..ea9f2c3 --- /dev/null +++ b/CONTRIBUTING.rst @@ -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 `_. + +For further best practices and tips on contributing please see the +`contribution-guide `_. \ No newline at end of file diff --git a/README.rst b/README.rst index 56491f0..adae38d 100644 --- a/README.rst +++ b/README.rst @@ -64,4 +64,4 @@ The full project-documentation is available on `Read the Docs Date: Tue, 8 Mar 2016 16:37:42 +0100 Subject: [PATCH 04/10] PCKG unify 'readme' in documentation and repository --- doc/index.rst | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index 86bb983..755deb4 100644 --- a/doc/index.rst +++ b/doc/index.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 ------- From 1a2b8f1df23886c4d1b13e5da6865c5a5ddda490 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 8 Mar 2016 17:07:27 +0100 Subject: [PATCH 05/10] PCKG refactor changelog and add to documentation --- CHANGELOG | 48 ------------------------------ CHANGELOG.rst | 69 +++++++++++++++++++++++++++++++++++++++++++ doc/dev/changelog.rst | 1 + doc/index.rst | 1 + 4 files changed, 71 insertions(+), 48 deletions(-) delete mode 100644 CHANGELOG create mode 100644 CHANGELOG.rst create mode 100644 doc/dev/changelog.rst diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 421a510..0000000 --- a/CHANGELOG +++ /dev/null @@ -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 - -* 2015-07-06 - Version 1.0.6 -- Merge pull request #53 from ldos/master - . Extended params for serial printers - . Sent by ldos - -* 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 -- Updated README - -* 2016-01-24 - Version 1.0.9 -- fix constant definition for PC1252 -- move documentation to Sphinx - diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..ca598cb --- /dev/null +++ b/CHANGELOG.rst @@ -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 +- 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 + +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 + +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 diff --git a/doc/dev/changelog.rst b/doc/dev/changelog.rst new file mode 100644 index 0000000..6f90edd --- /dev/null +++ b/doc/dev/changelog.rst @@ -0,0 +1 @@ +.. include:: ../../CHANGELOG.rst \ No newline at end of file diff --git a/doc/index.rst b/doc/index.rst index 755deb4..4997e51 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -25,6 +25,7 @@ Content :caption: Developer Documentation dev/contributing + dev/changelog .. toctree:: :maxdepth: 1 From 086b407b625ffc42428867c4d1edf2c7f641c0b2 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 8 Mar 2016 17:21:27 +0100 Subject: [PATCH 06/10] DOC use sphinx-rtd-theme even if built locally --- doc/conf.py | 14 ++++++++++++-- doc/requirements.txt | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index da6d7f0..9ecb8cf 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -14,6 +14,7 @@ import sys import os +on_rtd = os.getenv('READTHEDOCS') == 'True' # 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 @@ -56,7 +57,7 @@ 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 @@ -110,7 +111,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 diff --git a/doc/requirements.txt b/doc/requirements.txt index 56c7e15..1cdf7f4 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,4 +1,5 @@ pyusb Pillow>=2.0 qrcode>=4.0 -pyserial \ No newline at end of file +pyserial +sphinx-rtd-theme \ No newline at end of file From f6767821303f63b22006f4b7058c64d544b118a4 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 8 Mar 2016 17:26:01 +0100 Subject: [PATCH 07/10] DOC add favicon --- doc/conf.py | 2 +- doc/pyescpos.ico | Bin 0 -> 165662 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 doc/pyescpos.ico diff --git a/doc/conf.py b/doc/conf.py index 9ecb8cf..8e26290 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -144,7 +144,7 @@ else: # 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, diff --git a/doc/pyescpos.ico b/doc/pyescpos.ico new file mode 100644 index 0000000000000000000000000000000000000000..772df93f608f2546536b45473b801e531a487258 GIT binary patch literal 165662 zcmeI534k0$xyL7juv}pQK_DC(Kn@=!;SlBUu?i~c;}X;dDiUuH6yza-Jl*9MK|mDn z0D=L0s669=0t#dW6%gb;1aeHcj}VqCEVAtS`}a;~dwaWjx_i23c6PoG|J&X5Ree?U zulnlho>(eP;J=%1F7bD2X~k2QE4{f?Ds2e}DxE!HD4bgpW55_N28;n?z!)$Fi~(c7 z7%&Em0b{@zFb0ePW55_N28;n?z!)$Fi~(c77%&Em0b{@zFb0ePW55_N28;n?z!)$F zi~(c77%&Em0b{@zFb0ePW55_N28;n?z!)$Fi~(c77%&Em0b{@zFb0ePW55_N28;n? zpdJjYOeWiccY_T;7U5sdF);=*Gq4IN^-nSF2aW`@4Y&xL295^r1#1KI9Y~0fcEUQrN5DsOg!DtPhIpTk_c(K)6f`2%8Kf%Yzx}mX+3i6b1 zV$9VRi_vMl<uBv`ZUXlL?X}YIaUJoefL0RK_i2!n@2v42A&-q3M6CMgg$e7Zy~JFg zwcv+<*7wuE4q#uPGoQPFe5M)~>YK-aT6{!lqxR<2@_vSNKL)#j)xbm$EXQ&@PXgw_f*aPTw_Ol^SUy2j;E1k)y{@Ta-HlnVYe`GhSs2|@AqHKr5RL8%9FMv0LG@?GQ zec3tSMG&^_KPwNlZL9eRRgRQB3H7-NUNwF;YCec8s3TDR87z0yz50awD2q%b(ceIn zT|Z3go1H)wk*_WSzOA_HiNves+eymMNu)R*`4{@PCNb0kahlmbwx)e_zT@gs&!d|O zYCXf0Z=DUaUvcI21iDQ@TG3p!1i0)fTx-IEK_0$=8B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nCZ>%6&N6L^mbIx^kRngL5%e}{Bk zgRE~@8hGoJkdDacD9%8~sB{Dz@2&N@3ELdfd4z>^#}m+9S@EXPo#@#tcW{ve>eoK_ zBmpc_I;B8{b%PyVK$Nb}(`eB%I$dvdIbk z3#S|EA>Ab!e3VU3r*&4BLpQX@k50#us)Lq@%&%9ybF{9jOl0{VcfuBSl5Wk{5f? zI`+5JBvQu$+FR?7D2r^CJGJnZuaq4+t;-{H?5Dl8w^r|g`pG7x&_=sN`wr{0GNu=i zs4QLQKxtT4uITuO_0V;<^^VqQ&5lknhtu`&M5y`_I*mlbx-w7d58a+lxsTSBJsru{ u9o7w2q_4D^x~bmt}SLbtA51JK{O`V7ee1!}m?Z%fA7}C#=H& literal 0 HcmV?d00001 From e49c35abc1b16ba2111a14e6e0bddd462e584e59 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Tue, 8 Mar 2016 18:26:23 +0100 Subject: [PATCH 08/10] PCKG fix setup.py and improve Manifest --- MANIFEST | 8 -------- MANIFEST.in | 11 +++++++++++ doc/.gitignore | 2 +- setup.py | 2 +- 4 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 MANIFEST create mode 100644 MANIFEST.in diff --git a/MANIFEST b/MANIFEST deleted file mode 100644 index 4a00445..0000000 --- a/MANIFEST +++ /dev/null @@ -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 diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..997ee7b --- /dev/null +++ b/MANIFEST.in @@ -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 diff --git a/doc/.gitignore b/doc/.gitignore index b2f10c4..69fa449 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1 +1 @@ -_build +_build/ diff --git a/setup.py b/setup.py index de7cfac..2727221 100755 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ setup( 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'], From 64e63b0180c6690cee17534de2a4fbff204d55ae Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Wed, 9 Mar 2016 12:01:02 +0100 Subject: [PATCH 09/10] PCKG automatically generate version from git-tags * uses setuptools_scm --- doc/conf.py | 6 ++++-- doc/requirements.txt | 3 ++- setup.py | 5 ++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 8e26290..fe25835 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -15,11 +15,13 @@ 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 ------------------------------------------------ @@ -64,9 +66,9 @@ copyright = u'2016, Manuel F Martinez and others' # 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. diff --git a/doc/requirements.txt b/doc/requirements.txt index 1cdf7f4..fd5f86f 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -2,4 +2,5 @@ pyusb Pillow>=2.0 qrcode>=4.0 pyserial -sphinx-rtd-theme \ No newline at end of file +sphinx-rtd-theme +setuptools-scm \ No newline at end of file diff --git a/setup.py b/setup.py index 2727221..b2f2ba4 100755 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ 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', @@ -72,6 +72,9 @@ setup( 'pyserial', 'six', ], + setup_requires=[ + 'setuptools_scm', + ], tests_require=['tox', 'nose'], cmdclass={'test': Tox}, ) From b2ff39b6b1dedaeead2d85510bcacdc703509793 Mon Sep 17 00:00:00 2001 From: Patrick Kanzler Date: Thu, 10 Mar 2016 13:36:47 +0100 Subject: [PATCH 10/10] DOC add templates for issues and pull-requests These templates are inspired by OpenWhisperSystems fixes #91 --- .github/ISSUE_TEMPLATE.md | 22 ++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 10 ++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..a7eb764 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,22 @@ + + + +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 + + **Printer:** Manufacturer Model XVI + + **python-escpos version:** 0.0.0 + + **operating system:** diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..32544d2 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ +### Contributor checklist + +- [ ] 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