diff --git a/.gitignore b/.gitignore index 37fcd87..3743efb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,9 @@ *.swp *~ .coverage +.idea/ .tox/ MANIFEST build/ dist/ -.idea/ +xunit-*.xml diff --git a/MANIFEST.in b/MANIFEST.in index b325d23..a597401 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,5 +5,9 @@ include MANIFEST.in include README.rst include mopidy_touchscreen/ext.conf include mopidy_touchscreen/icomoon.ttf +include tox.ini recursive-include tests *.py + +prune docs +prune mopidy_touchscreen/fonts diff --git a/README.rst b/README.rst index a636f03..63cf288 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,6 @@ -**************************** +****************** Mopidy-Touchscreen -**************************** +****************** .. image:: https://img.shields.io/pypi/v/Mopidy-Touchscreen.svg?style=flat :target: https://pypi.python.org/pypi/Mopidy-Touchscreen/ @@ -10,7 +10,7 @@ Mopidy-Touchscreen :target: https://pypi.python.org/pypi/Mopidy-Touchscreen/ :alt: Number of PyPI downloads -.. image:: https://img.shields.io/travis/9and3r/mopidy-touchscreen/master.png?style=flat +.. image:: https://img.shields.io/travis/9and3r/mopidy-touchscreen/master.svg?style=flat :target: https://travis-ci.org/9and3r/mopidy-touchscreen :alt: Travis CI build status @@ -18,10 +18,12 @@ Mopidy-Touchscreen :target: https://coveralls.io/r/9and3r/mopidy-touchscreen?branch=master :alt: Test coverage -Extension for displaying track info and controlling Mopidy from a touch screen using `PyGame `_/SDL. +Extension for displaying track info and controlling Mopidy from a touch screen +using `PyGame `_/SDL. Cover images are downloaded from `last.fm `_ + Dependencies ============ @@ -29,6 +31,7 @@ Dependencies - ``Pykka`` >= 1.1 - ``pygame`` + Installation ============ @@ -55,13 +58,24 @@ Mopidy-Touchscreen to your Mopidy configuration file:: cache_dir = $XDG_CACHE_DIR/mopidy/touchscreen The following configuration values are available: - -- ``touchscreen/enabled``: If the Touchscreen extension should be enabled or not. -- ``touchscreen/screen_width``: The width of the resolution you want to use in pixels. -- ``touchscreen/screen_height``: The width of the resolution you want to use in pixels. -- ``touchscreen/cursor``: If the mouse cursor should be shown. (If you use a touchscreen it should be false) -- ``touchscreen/fullscreen``: If you want to be shown as a window or in fullscreen. -- ``touchscreen/screen_width``: The folder to be used as cache. Defaults to ``$XDG_CACHE_DIR/mopidy/touchscreen``, which usually means + +- ``touchscreen/enabled``: If the Touchscreen extension should be enabled or + not. + +- ``touchscreen/screen_width``: The width of the resolution you want to use in + pixels. + +- ``touchscreen/screen_height``: The width of the resolution you want to use in + pixels. + +- ``touchscreen/cursor``: If the mouse cursor should be shown. (If you use a + touchscreen it should be false) + +- ``touchscreen/fullscreen``: If you want to be shown as a window or in + fullscreen. + +- ``touchscreen/screen_width``: The folder to be used as cache. Defaults to + ``$XDG_CACHE_DIR/mopidy/touchscreen``, which usually means ``~/.cache/mopidy/touchscreen`` @@ -84,30 +98,31 @@ Add to the config the next variables:: sdl_fbdev = /dev/fb1 sdl_mousdrv = TSLIB sdl_mousedev = event0 - + This is just an example. It may work but each LCD Shield seems to have its own configuration. To find your values find an example of using pygame with your LCD Shield and it should be something like this in the code:: os.environ["SDL_FBDEV"] = "/dev/fb1" os.environ["SDL_MOUSEDRV"] = "TSLIB" os.environ["SDL_MOUSEDEV"] = "event0" - -Run mopidy with root privileges + +Run Mopidy with root privileges ``````````````````````````````` - + You can use ``sudo mopidy``. In case you are using musicbox edit ``/etc/init.d/mopidy`` file. Change ``DAEMON_USER=mopidy`` to ``DAEMON_USER=root`` Do not forget that this is a workaround and that mopidy will run with root privileges. - - + + Help ==== You can use `mopidy discuss `_ or send an email to `9and3r@gmail.com `_ + Features ======== @@ -132,16 +147,19 @@ Planned * Use keyboard or GPIO buttons instead of touchscreen + Screenshots =========== .. image:: http://i60.tinypic.com/qqsait.jpg + Video ===== `Example video running the extension `_ + Project resources ================= @@ -153,25 +171,26 @@ Project resources Changelog ========= -v0.3.2 ----------------------------------------- +v0.4.0 (UNRELEASED) +------------------- + +- Require Mopidy v1.0 +- Update to work with changed core playback API in Mopidy 1.0 + +v0.3.2 (2015-01-09) +------------------- - Bug Fixes - UI changes - Smoth text scrolling - Search albums, artist or songs (Not fully implemented. Basic functionality) -v0.2.1 ----------------------------------------- +v0.2.1 (2014-08-02) +------------------- - Font will be included on installation -v0.2.0 ----------------------------------------- +v0.2.0 (2014-08-02) +------------------- - First working version - -v0.1.0 (UNRELEASED) ----------------------------------------- - -- Initial release. diff --git a/mopidy_touchscreen/__init__.py b/mopidy_touchscreen/__init__.py index 043819a..4fa7bde 100644 --- a/mopidy_touchscreen/__init__.py +++ b/mopidy_touchscreen/__init__.py @@ -7,7 +7,7 @@ from mopidy import config, ext from .touch_screen import TouchScreen -__version__ = '0.3.2' +__version__ = '0.4.0' class Extension(ext.Extension): diff --git a/setup.py b/setup.py index f0521e8..92a8418 100644 --- a/setup.py +++ b/setup.py @@ -6,9 +6,9 @@ from setuptools import find_packages, setup def get_version(filename): - content = open(filename).read() - metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content)) - return metadata['version'] + with open(filename) as fh: + metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", fh.read())) + return metadata['version'] setup( diff --git a/setuptools-5.4.2.zip b/setuptools-5.4.2.zip deleted file mode 100644 index 6be4f21..0000000 Binary files a/setuptools-5.4.2.zip and /dev/null differ diff --git a/tox.ini b/tox.ini index 25991bd..cb2b756 100644 --- a/tox.ini +++ b/tox.ini @@ -4,12 +4,18 @@ envlist = py27, flake8 [testenv] sitepackages = true deps = - coverage mock - nose mopidy==dev + pytest + pytest-cov + pytest-xdist install_command = pip install --allow-unverified=mopidy --pre {opts} {packages} -commands = nosetests -v --with-xunit --xunit-file=xunit-{envname}.xml --with-coverage --cover-package=mopidy_touchscreen +commands = + py.test \ + --basetemp={envtmpdir} \ + --junit-xml=xunit-{envname}.xml \ + --cov=mopidy_touchpanel --cov-report=term-missing \ + {posargs} [testenv:flake8] deps =