diff --git a/Makefile b/Makefile index cc241439..ca15b0b4 100644 --- a/Makefile +++ b/Makefile @@ -30,12 +30,12 @@ check: @echo "Checking library/${LIBRARY_NAME}/__init__.py" @cat library/${LIBRARY_NAME}/__init__.py | grep "^__version__ = '${LIBRARY_VERSION}'" -python-readme: library/README.rst +python-readme: library/README.md python-license: library/LICENSE.txt -library/README.rst: README.md - pandoc --from=markdown --to=rst -o library/README.rst README.md +library/README.md: README.md + cp README.md library/README.md library/LICENSE.txt: LICENSE cp LICENSE library/LICENSE.txt diff --git a/library/CHANGELOG.txt b/library/CHANGELOG.txt index 56ba834c..1331eb8e 100644 --- a/library/CHANGELOG.txt +++ b/library/CHANGELOG.txt @@ -1,3 +1,11 @@ +1.2.0 +----- + +* inky impression set_border support +* fix inky impression orange colour +* fix inky impression ivnalid arg bug for Python 2 +* add inky impression simulator + 1.1.1 ----- diff --git a/library/README.rst b/library/README.rst deleted file mode 100644 index ba3a3805..00000000 --- a/library/README.rst +++ /dev/null @@ -1,146 +0,0 @@ -Inky -==== - -`Build Status `__ `Coverage -Status `__ -`PyPi Package `__ `Python -Versions `__ - -Python library for the `Inky -pHAT `__ and `Inky -wHAT `__ e-paper displays. - -Inky pHAT ---------- - -`Inky pHAT `__ is a -212x104 pixel e-paper display, available in red/black/white, -yellow/black/white and black/white. It’s great for nametags and -displaying very low frequency information such as a daily calendar or -weather overview. - -Inky wHAT ---------- - -`Inky wHAT `__ is a -400x300 pixel e-paper display available in red/black/white, -yellow/black/white and black/white. It’s got tons of resolution for -detailed daily todo lists, multi-day weather forecasts, bus timetables -and more. - -Installation -============ - -The Python pip package is named inky, on the Raspberry Pi install with: - -:: - - pip3 install inky[rpi,fonts] - -This will install Inky along with dependencies for the Raspberry Pi, -plus fonts used by the examples. - -If you want to simulate Inky on your desktop, use: - -:: - - pip3 install inky - -You may need to use ``sudo pip3`` or ``sudo pip`` depending on your -environment and Python version. - -Usage -===== - -Auto Setup ----------- - -Inky can try to automatically detect your board and set up accordingly: - -.. code:: python - - from inky.auto import auto - board = auto() - -You can then get the colour and resolution from the board: - -.. code:: python - - board.colour - board.resolution - -Manual Setup ------------- - -The Inky library contains modules for both the pHAT and wHAT, load the -InkyPHAT one as follows: - -.. code:: python - - from inky import InkyPHAT - -You’ll then need to pick your colour, one of ‘red’, ‘yellow’ or ‘black’ -and instantiate the class: - -.. code:: python - - inkyphat = InkyPHAT('red') - -If you’re using the wHAT you’ll need to load the InkyWHAT class from the -Inky library like so: - -.. code:: python - - from inky import InkyWHAT - inkywhat = InkyWHAT('red') - -Once you’ve initialised Inky, there are only three methods you need to -be concerned with: - -Set Image ---------- - -Set a PIL image, numpy array or list to Inky’s internal buffer. The -image dimensions should match the dimensions of the pHAT or wHAT you’re -using. - -.. code:: python - - inkyphat.set_image(image) - -You should use ``PIL`` to create an image. ``PIL`` provides an -``ImageDraw`` module which allow you to draw text, lines and shapes over -your image. See: -https://pillow.readthedocs.io/en/stable/reference/ImageDraw.html - -Set Border ----------- - -Set the border colour of you pHAT or wHAT. - -.. code:: python - - inkyphat.set_border(colour) - -``colour`` should be one of ``inky.RED``, ``inky.YELLOW``, -``inky.WHITE`` or ``inky.BLACK`` with available colours depending on -your display type. - -Update The Display ------------------- - -Once you’ve prepared and set your image, and chosen a border colour, you -can update your e-ink display with: - -.. code:: python - - inkyphat.show() - -Migrating -========= - -If you’re migrating code from the ``inkyphat`` library you’ll find that -much of the drawing and image manipulation functions have been removed -from Inky. These functions were always supplied by PIL, and the -recommended approach is to use PIL to create and prepare your image -before setting it to Inky with ``set_image()``. diff --git a/library/inky/__init__.py b/library/inky/__init__.py index 66116e12..5da573aa 100644 --- a/library/inky/__init__.py +++ b/library/inky/__init__.py @@ -8,7 +8,7 @@ from .inky_uc8159 import Inky as Inky7Colour # noqa: F401 from .auto import auto # noqa: F401 -__version__ = '1.1.1' +__version__ = '1.2.0' try: from pkg_resources import declare_namespace diff --git a/library/setup.py b/library/setup.py index 03ca2bf5..ee7a7311 100755 --- a/library/setup.py +++ b/library/setup.py @@ -38,11 +38,12 @@ setup( name='inky', - version='1.1.1', + version='1.2.0', author='Philip Howard', author_email='phil@pimoroni.com', description='Inky pHAT Driver', - long_description=open('README.rst').read() + '\n' + open('CHANGELOG.txt').read(), + long_description=open('README.md').read() + '\n' + open('CHANGELOG.txt').read(), + long_description_content_type="text/markdown", license='MIT', keywords='Raspberry Pi e-paper display driver', url='http://www.pimoroni.com',