Skip to content

Commit

Permalink
Remove broken m2r dependency, move installation instructions out of t…
Browse files Browse the repository at this point in the history
…he readme and into the regular documentation.
  • Loading branch information
abcminiuser committed Apr 12, 2020
1 parent 38b71fc commit 74dd4ff
Show file tree
Hide file tree
Showing 14 changed files with 177 additions and 180 deletions.
17 changes: 17 additions & 0 deletions LICENSE
@@ -0,0 +1,17 @@
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose is hereby granted without
fee, provided that the above copyright notice appear in all
copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.

The author disclaims all warranties with regard to this
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of
this software.
1 change: 1 addition & 0 deletions MANIFEST.in
Expand Up @@ -4,3 +4,4 @@ include src/example*.py
include *.md
include VERSION
include CHANGELOG
include LICENSE
97 changes: 8 additions & 89 deletions README.md
Expand Up @@ -11,6 +11,7 @@ front-ends, such as a custom control front-end for home automation software.

[Online Documentation](https://python-elgato-streamdeck.readthedocs.io)


## Status:

Working - you can enumerate devices, set the brightness of the panel(s), set
Expand All @@ -21,6 +22,7 @@ Currently the following StreamDeck product variants are supported:
* StreamDeck Mini
* StreamDeck XL


## Package Installation:

Install the library via pip:
Expand All @@ -30,79 +32,15 @@ pip install streamdeck
```

Alternatively, manually clone the project repository:
```
git clone https://github.com/abcminiuser/python-elgato-streamdeck.git

```

The included examples require the PIL fork `pillow`, although it can be swapped
out if desired by the user application for any other image manipulation library.
This can be installed via the `pip` package manager.

## HID Backend Installation

The library core is structured so that it can use one of (potentially) several
alternative HID backend libraries for the actual low level device
communications. You will need to install the dependencies appropriate to your
chosen backend for the library to work correctly.

### LibUSB HID Backend

This is the default and recommended backend - a cross platform library for
communicating with HID devices. Most systems will have this as a system package
available for easy installation.

#### Windows

Windows systems requires additional manual installation of a DLL in order to
function. The latest source for the `hidapi.dll` DLL is the
[releases page of the libUSB GitHub project](https://github.com/libusb/hidapi/releases).

#### MacOS (Darwin)

On MacOS systems, you can choose to either compile the
[HIDAPI project](https://github.com/libusb/hidapi/) yourself, or install it via
one of the multiple third party package managers (e.g. `brew install hidapi`,
when using Homebrew).

#### Linux (Ubuntu/Debian)

On Linux, the `libhidapi-libusb0` package is required can can be installed via
the system's package manager.

The following script has been verified working on a Raspberry Pi (Model 2 B)
running a stock Debian Buster image, to install all the required dependencies
needed by this project on a fresh system:

git clone https://github.com/abcminiuser/python-elgato-streamdeck.git
```
# Ensure system is up to date, upgrade all out of date packages
sudo apt update && sudo apt dist-upgrade -y
# Install the pip Python package manager
sudo apt install -y python3-pip python3-setuptools
# Install system packages needed for the default LibUSB HIDAPI backend
sudo apt install -y libudev-dev libusb-1.0-0-dev libhidapi-libusb0
# Install system packages needed for the Python Pillow package installation
sudo apt install -y libjpeg-dev zlib1g-dev

# Install python library dependencies
pip3 install wheel
pip3 install pillow
For detailed installation instructions, refer to the online documentation, or
build the documentation locally by running `make html` from the `docs`
directory.

# Add udev rule to allow all users non-root access to Elgato StreamDeck devices:
sudo tee /etc/udev/rules.d/10-streamdeck.rules << EOF
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0fd9", GROUP="users"
EOF
# Install the latest version of the StreamDeck library via pip
pip3 install streamdeck
```

Note that after adding the `udev` rule, a restart will be required in order for
it to take effect and allow access to the StreamDeck device without requiring
root privileges.

## Credits:

Expand All @@ -126,26 +64,7 @@ development and maintenance of this library:
If you've contributed in some manner, but I've accidentally missed you in the
list above, please let me know.

## License:

Released under the MIT license:
## License:

```
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose is hereby granted without
fee, provided that the above copyright notice appear in all
copies and that both that the copyright notice and this
permission notice and warranty disclaimer appear in supporting
documentation, and that the name of the author not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
The author disclaims all warranties with regard to this
software, including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any
special, indirect or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action,
arising out of or in connection with the use or performance of
this software.
```
Released under the [MIT license](LICENSE).
5 changes: 2 additions & 3 deletions doc/requirements.txt
@@ -1,3 +1,2 @@
Sphinx==2.4.0
sphinx-rtd-theme==0.4.3
m2r==0.2.1
Sphinx>=3.0.0
sphinx-rtd-theme>=0.4.3
83 changes: 8 additions & 75 deletions doc/source/conf.py
@@ -1,17 +1,10 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Configuration file for the Sphinx documentation builder.
#
# python-elgato-streamdeck documentation build configuration file, created by
# sphinx-quickstart on Sun Jan 14 18:41:12 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# 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
Expand Down Expand Up @@ -39,16 +32,15 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc', 'm2r']
extensions = ['sphinx.ext.autodoc']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = ['.rst', '.md']
source_suffix = ['.rst']

# The master toctree document.
master_doc = 'index'
Expand Down Expand Up @@ -106,8 +98,6 @@
# so a file named "default.css" will overwrite the built-in "default.css".
html_static_path = []

html_extra_path = [os.path.join(ROOT_PATH, 'ExampleDeck.jpg')]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
Expand All @@ -119,60 +109,3 @@
'searchbox.html',
]
}


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'python-elgato-streamdeckdoc'


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'python-elgato-streamdeck.tex', 'StreamDeck Package Documentation',
'Dean Camera', 'manual'),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'python-elgato-streamdeck', 'StreamDeck Package Documentation',
[author], 1)
]


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'python-elgato-streamdeck', 'StreamDeck Package Documentation',
author, 'python-elgato-streamdeck', 'Library to control Elgato StreamDeck devices.',
'Miscellaneous'),
]
27 changes: 23 additions & 4 deletions doc/source/index.rst
@@ -1,22 +1,41 @@
.. mdinclude:: ../../README.md
#####
About
#####

.. image:: ../../ExampleDeck.jpg
:alt: Example StreamDeck Device

This is an open source Python 3 library to control an `Elgato Stream Deck
<https://www.elgato.com/en/gaming/stream-deck>`_ directly, without the official
software. This can allow you to create your own custom front-ends, such as a
custom control front-end for home automation software.

#####
Index
#####

.. toctree::
:numbered:
:glob:
:hidden:

pages/installation.rst

modules/discovery.rst
modules/devices.rst
modules/transports.rst
modules/imagehelpers.rst

examples/deckinfo.rst
examples/basic.rst
examples/tiled.rst
examples/animated.rst
changelog.rst

pages/changelog.rst
pages/license.rst

##################
Indices and tables
==================
##################

* :ref:`genindex`
* :ref:`modindex`
8 changes: 6 additions & 2 deletions doc/source/modules/devices.rst
@@ -1,14 +1,16 @@
===========================
***************************
Modules: StreamDeck Devices
===========================
***************************

==========================
StreamDeck (Abstract Base)
==========================

.. automodule:: StreamDeck.Devices.StreamDeck
:members:


===================
StreamDeck Original
===================

Expand All @@ -17,6 +19,7 @@ StreamDeck Original
:show-inheritance:


===============
StreamDeck Mini
===============

Expand All @@ -25,6 +28,7 @@ StreamDeck Mini
:show-inheritance:


=============
StreamDeck XL
=============

Expand Down
5 changes: 3 additions & 2 deletions doc/source/modules/discovery.rst
@@ -1,7 +1,8 @@
=========================
*************************
Modules: Device Discovery
=========================
*************************

==============
Device Manager
==============

Expand Down
5 changes: 3 additions & 2 deletions doc/source/modules/imagehelpers.rst
@@ -1,7 +1,8 @@
======================
**********************
Modules: Image Helpers
======================
**********************

================
PIL Image Helper
================

Expand Down
6 changes: 4 additions & 2 deletions doc/source/modules/transports.rst
@@ -1,14 +1,16 @@
=================================
*********************************
Modules: Communication Transports
=================================
*********************************

=========================
Transport (Abstract Base)
=========================

.. automodule:: StreamDeck.Transport.Transport
:members:


=================================
'LibUSB HIDAPI' Library Transport
=================================

Expand Down

0 comments on commit 74dd4ff

Please sign in to comment.