- -
-- Local copy of documentation for {{ project }} Version {{ release }}. - View online documentation - -
- -{% endif %} -{% endblock %} diff --git a/docs/sphinx/api/api.rst b/docs/sphinx/api/api.rst deleted file mode 100644 index 117fe92f6..000000000 --- a/docs/sphinx/api/api.rst +++ /dev/null @@ -1,20 +0,0 @@ ----------------------- -Developers API ----------------------- - -Developers API Introduction - -.. toctree:: - :maxdepth: 2 - :caption: The Python packages: - - plugs - publishing - rpc_server - cfghandler - playlist - utils - volume - controls - callingback - gpioz/gpioz diff --git a/docs/sphinx/api/callingback.rst b/docs/sphinx/api/callingback.rst deleted file mode 100644 index f913b41fd..000000000 --- a/docs/sphinx/api/callingback.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. RPI Jukebox RFID Version 3 -.. Copyright (c) See file LICENSE in project root folder - -------------------------------- -Generic Callback Handler -------------------------------- - -.. automodule:: jukebox.callingback - :members: diff --git a/docs/sphinx/api/cfghandler.rst b/docs/sphinx/api/cfghandler.rst deleted file mode 100644 index cfdcd078d..000000000 --- a/docs/sphinx/api/cfghandler.rst +++ /dev/null @@ -1,5 +0,0 @@ -Config Handler -***************** - -.. automodule:: jukebox.cfghandler - :members: diff --git a/docs/sphinx/api/controls.rst b/docs/sphinx/api/controls.rst deleted file mode 100644 index 1ad0a2956..000000000 --- a/docs/sphinx/api/controls.rst +++ /dev/null @@ -1,19 +0,0 @@ - -Controls based on EvDev input devices -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -Common -************************* - -.. automodule:: components.controls.common.evdev_listener - :members: - :private-members: _filter_by_device_name, _filter_by_mandatory_keys - -Bluetooth audio buttons -************************* - -See also the corresponding user guide :ref:`userguide/bluetooth_audio_buttons:Bluetooth audio buttons` - -.. automodule:: components.controls.bluetooth_audio_buttons - :members: diff --git a/docs/sphinx/api/gpioz/connector.rst b/docs/sphinx/api/gpioz/connector.rst deleted file mode 100644 index eb547de55..000000000 --- a/docs/sphinx/api/gpioz/connector.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. RPI Jukebox RFID Version 3 -.. Copyright (c) See file LICENSE in project root folder - -------------------------------- -GPIOZ Connector Functions -------------------------------- - -.. automodule:: components.gpio.gpioz.plugin.connectivity - -.. currentmodule:: components.gpio.gpioz.plugin.connectivity - -Common -^^^^^^^^ - -.. autoattribute:: components.gpio.gpioz.plugin.connectivity.BUZZ_TONE - -RFID -^^^^^ - -.. autofunction:: register_rfid_callback - - -Volume -^^^^^^^^ - -.. autofunction:: register_volume_led_callback - -.. autofunction:: register_volume_rgbled_callback - -.. autofunction:: register_volume_buzzer_callback - -Audio output sink -^^^^^^^^^^^^^^^^^^ - -.. autofunction:: register_audio_sink_change_callback - -Status -^^^^^^^^ -.. autofunction:: register_status_led_callback - -.. autofunction:: register_status_buzzer_callback - -.. autofunction:: register_status_tonalbuzzer_callback - - diff --git a/docs/sphinx/api/gpioz/converter.rst b/docs/sphinx/api/gpioz/converter.rst deleted file mode 100644 index d65e4b595..000000000 --- a/docs/sphinx/api/gpioz/converter.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. RPI Jukebox RFID Version 3 -.. Copyright (c) See file LICENSE in project root folder - -------------------------------- -GPIOZ Converters -------------------------------- - -.. automodule:: components.gpio.gpioz.core.converter - :members: - :special-members: +__call__ - - - diff --git a/docs/sphinx/api/gpioz/gpioz.rst b/docs/sphinx/api/gpioz/gpioz.rst deleted file mode 100644 index 024fd90ee..000000000 --- a/docs/sphinx/api/gpioz/gpioz.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. RPI Jukebox RFID Version 3 -.. Copyright (c) See file LICENSE in project root folder - ----------------------- -GPIOZ ----------------------- - -The GPIOZ plugin connects to GPIO devices such as Buttons, LEDs, Buzzers. It utilizes GPIOZero to do so. - -.. toctree:: - :maxdepth: 2 - :caption: The GPIOZ packages: - - input_devices - output_devices - connector - converter diff --git a/docs/sphinx/api/gpioz/input_devices.rst b/docs/sphinx/api/gpioz/input_devices.rst deleted file mode 100644 index ba29d70f5..000000000 --- a/docs/sphinx/api/gpioz/input_devices.rst +++ /dev/null @@ -1,42 +0,0 @@ -.. RPI Jukebox RFID Version 3 -.. Copyright (c) See file LICENSE in project root folder - -------------------------------- -GPIOZ Input Devices -------------------------------- - -.. automodule:: components.gpio.gpioz.core.input_devices - -.. currentmodule:: components.gpio.gpioz.core.input_devices - -Button -^^^^^^^^ - -.. autoclass:: Button - :members: on_press, set_rpc_actions, close, value, pull_up, pin, hold_time, hold_repeat - -Long press Button -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. autoclass:: LongPressButton - :members: on_press, set_rpc_actions, close, value, pull_up, pin, hold_time, hold_repeat - -Short + Long press Button -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. autoclass:: ShortLongPressButton - :members: on_short_press, on_long_press, set_rpc_actions, close, value, pull_up, pin, hold_time, hold_repeat - -Twin Button -^^^^^^^^^^^^^^^^^^^ - -.. autoclass:: TwinButton - :members: on_short_press_a, on_short_press_b, on_short_press_ab, on_long_press_a, on_long_press_b, on_long_press_ab, value, is_active, hold_repeat, hold_time, close - -Rotary Encoder -^^^^^^^^^^^^^^^^^^ - -.. autoclass:: RotaryEncoder - :members: on_rotate_clockwise, on_rotate_counter_clockwise, set_rpc_actions, close, pin_a, pin_b - - diff --git a/docs/sphinx/api/gpioz/output_devices.rst b/docs/sphinx/api/gpioz/output_devices.rst deleted file mode 100644 index a30986f03..000000000 --- a/docs/sphinx/api/gpioz/output_devices.rst +++ /dev/null @@ -1,44 +0,0 @@ -.. RPI Jukebox RFID Version 3 -.. Copyright (c) See file LICENSE in project root folder - -------------------------------- -GPIOZ Output Devices -------------------------------- - -.. automodule:: components.gpio.gpioz.core.output_devices - -.. py:currentmodule:: components.gpio.gpioz.core.output_devices - - -LED -^^^ - -.. autoclass:: LED(pin, *, active_high=True, initial_value=False, pin_factory=None, name=None) - :members: flash, on, off, toggle, blink, pin, is_lit, value - -PWMLED -^^^^^^^ - -.. autoclass:: PWMLED(pin, *, active_high=True, initial_value=0, frequency=100, pin_factory=None, name=None) - :members: flash, on, off, toggle, blink, pulse, pin, is_lit, value - - -RGBLED -^^^^^^^ - -.. autoclass:: RGBLED(red, green, blue, *, active_high=True, initial_value=(0, 0, 0), pwm=True, pin_factory=None, name=None) - :members: flash, on, off, toggle, blink, pulse, red, green, blue, is_lit, color, value - - -Buzzer -^^^^^^^ - -.. autoclass:: Buzzer(pin, *, active_high=True, initial_value=False, pin_factory=None, name=None) - :members: flash, on, off, toggle, beep, pin, is_active, value - - -TonalBuzzer -^^^^^^^^^^^^^^ - -.. autoclass:: TonalBuzzer(pin, *, initial_value=None, mid_tone=Tone('A5'), octaves=2, pin_factory=None, name=None) - :members: melody, flash, play, stop, octaves, min_tone, mid_tone, max_tone, tone, is_active, value diff --git a/docs/sphinx/api/playlist.rst b/docs/sphinx/api/playlist.rst deleted file mode 100644 index febeb4c0f..000000000 --- a/docs/sphinx/api/playlist.rst +++ /dev/null @@ -1,11 +0,0 @@ -Playlist Generator -********************** - -.. automodule:: jukebox.playlistgenerator - -.. autoclass:: jukebox.playlistgenerator.PlaylistCollector - :members: - :private-members: _exclude_endings - - - diff --git a/docs/sphinx/api/plugs.rst b/docs/sphinx/api/plugs.rst deleted file mode 100644 index 73f2e1043..000000000 --- a/docs/sphinx/api/plugs.rst +++ /dev/null @@ -1,6 +0,0 @@ ----------------------------- -Plugs: The Plugin Package ----------------------------- - -.. automodule:: jukebox.plugs - :members: diff --git a/docs/sphinx/api/publishing.rst b/docs/sphinx/api/publishing.rst deleted file mode 100644 index 607d9e8d3..000000000 --- a/docs/sphinx/api/publishing.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. automodule:: jukebox.publishing.server - - jukebox.publishing - ------------------- - - .. autofunction:: jukebox.publishing.get_publisher - - jukebox.publishing.server - ------------------------- - - .. autoclass:: jukebox.publishing.server.Publisher - :members: diff --git a/docs/sphinx/api/rpc_server.rst b/docs/sphinx/api/rpc_server.rst deleted file mode 100644 index 634adf763..000000000 --- a/docs/sphinx/api/rpc_server.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. automodule:: jukebox.rpc.server - - jukebox.rpc.server - ------------------------- - - .. autoclass:: jukebox.rpc.server.RpcServer - :members: diff --git a/docs/sphinx/api/utils.rst b/docs/sphinx/api/utils.rst deleted file mode 100644 index 17ba7500c..000000000 --- a/docs/sphinx/api/utils.rst +++ /dev/null @@ -1,6 +0,0 @@ ----------------------------- -Jukebox utility functions ----------------------------- - -.. automodule:: jukebox.utils - :members: diff --git a/docs/sphinx/api/volume.rst b/docs/sphinx/api/volume.rst deleted file mode 100644 index 4bf700832..000000000 --- a/docs/sphinx/api/volume.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. RPI Jukebox RFID -.. RPI Jukebox RFID -.. Copyright (c) See file LICENSE in project root folder - -------------------------------- -Volume and Audio Sink Control -------------------------------- - -.. automodule:: components.volume - -.. autoclass:: components.volume.PulseMonitor - :members: - :inherited-members: Thread - -.. autoclass:: components.volume.PulseVolumeControl - :members: - :inherited-members: Thread diff --git a/docs/sphinx/conf.py b/docs/sphinx/conf.py deleted file mode 100644 index 79b9476bd..000000000 --- a/docs/sphinx/conf.py +++ /dev/null @@ -1,67 +0,0 @@ -# Configuration file for the Sphinx documentation builder. -# -# 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 -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -import os -import sys -import sphinx_rtd_theme -sys.path.insert(0, os.path.abspath('../../src/jukebox')) -# This is needed for autodoc to load components.plugins with regular import - i.e. w/o going through plugs.load(...) -import jukebox.plugs # noqa: E402 -jukebox.plugs.ALLOW_DIRECT_IMPORTS = True -import jukebox.utils # noqa: E402 - - -# -- Project information ----------------------------------------------------- - -project = 'RPi Jukebox RFID' -copyright = '2021-2022, The RPi Jukebox RFID Community' -author = 'The RPi Jukebox RFID Community' - -# The full version, including alpha/beta/rc tags -release = jukebox.version() -version = release - -# -- General configuration --------------------------------------------------- - -# 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', 'sphinx.ext.autosectionlabel'] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] - - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# html_theme = 'alabaster' -html_theme = 'sphinx_rtd_theme' -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - -# 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, -# so a file named "default.css" will overwrite the builtin "default.css". -# There are none yet: Comment out to suppress warning -# html_static_path = ['_static'] - -# --------------------------------------------------- - -# Prefix document path to section labels, to use: -# `path/to/file:heading` instead of just `heading` -autosectionlabel_prefix_document = True diff --git a/docs/sphinx/developer/coreapps.rst b/docs/sphinx/developer/coreapps.rst deleted file mode 100644 index 887b8d143..000000000 --- a/docs/sphinx/developer/coreapps.rst +++ /dev/null @@ -1,61 +0,0 @@ -Jukebox Apps -=============== - -The Jukebox's core apps are located in ``src/jukebox``. Run the following command to learn more about each app and its parameters: - -.. code-block:: bash - - $ ./run_app_name.py -h - -Jukebox Core -***************** - -run_jukebox.py ---------------- - -.. automodule:: run_jukebox - -Configuration Tools -******************** - -Before running the configuration tools, stop the Jukebox Core service. -See :ref:`userguide/configuration:Best practice procedure`. - -run_configure_audio.py ------------------------------ - -.. automodule:: run_configure_audio - -run_register_rfid_reader.py ------------------------------ - -.. automodule:: run_register_rfid_reader - -Developer Tools -***************** - -run_rpc_tool.py ---------------- - -.. automodule:: run_rpc_tool - -run_publicity_sniffer.py -------------------------- - -.. automodule:: run_publicity_sniffer - -run_sphinx.sh -------------------------- - -This command rebuilds the documentation using a Sphinx flow, located in the main directory. - -The documentation is built partially from auto-generated RST-files. -Thee files contain the :ref:`userguide/rpc_command_reference:RPC Command Reference` -and :ref:`userguide/rpc_command_alias_reference:RPC Command Alias Reference`. - -.. code-block:: bash - - run_jukebox.py -a - -The above command regenerate these RST files. This only needs to be done when -the RPC call references need to be updated within the documentation flow. diff --git a/docs/sphinx/developer/developer_issues.rst b/docs/sphinx/developer/developer_issues.rst deleted file mode 100644 index dd3a511fd..000000000 --- a/docs/sphinx/developer/developer_issues.rst +++ /dev/null @@ -1,80 +0,0 @@ -Developer Issues -****************** - -.. contents:: - -Building the Webapp on the PI -================================== - -JavaScript heap out of memory --------------------------------- - -While (re-) building the Web App, you get the following output: - -.. code-block:: bash - :emphasize-lines: 12 - - pi@MusicPi:~/RPi-Jukebox-RFID/src/webapp $ npm run build - - > webapp@0.1.0 build - > react-scripts build - - Creating an optimized production build... - - [...] - - <--- JS stacktrace ---> - - FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory - - -**Reason** - -Not enough memory for Node - -**Solution** - -Prior to building set the node memory environment variable. - - #. Make sure the value is less than the total available space on the system, or you may run into the next issue. (Not always though!) - Check memory availability with ``free -mt``. - #. We also experience trouble, when the space is set too small a value. 512 always works, 256 sometimes does, sometimes does not. - If your free memory is small, consider increasing the swap size of your system! - -.. code-block:: bash - - export NODE_OPTIONS=--max-old-space-size=512 - npm run build - -Alternatively, use the provided script, which sets the variable for you (provided your swap size is large enough): - -.. code-block:: bash - - $ ./run_rebuild.sh - - -Process exited too early // kill -9 ---------------------------------------- - -.. code-block:: bash - :emphasize-lines: 8,9 - - pi@MusicPi:~/RPi-Jukebox-RFID/src/webapp $ npm run build - - > webapp@0.1.0 build - > react-scripts build - - ... - - The build failed because the process exited too early. - This probably means the system ran out of memory or someone called 'kill -9' on the process. - -**Reason** - -Node tried to allocate more memory than available on the system. - -**Solution** - -Adjust the node memory variable as described in :ref:`developer/developer_issues:JavaScript heap out of memory`. -But make sure to allocate less memory than the available memory. -If that is not sufficient, increase the swap file size of your system and try again. diff --git a/docs/sphinx/developer/development_environment.rst b/docs/sphinx/developer/development_environment.rst deleted file mode 100644 index 243584eb7..000000000 --- a/docs/sphinx/developer/development_environment.rst +++ /dev/null @@ -1,73 +0,0 @@ -Development Environment -************************ - -You have 3 development options: - -.. contents:: - -Directly on Raspberry Pi ------------------------- - -The full setup is running on the RPi and you access files via SSH. Pretty easy to set up as -you simply do a normal install and switch to the ``future3/develop`` branch. - -Steps to install -```````````````` - -We recommend to use at least a Pi 3 or Pi Zero 2 for development. This hardware won't be needed -in production, but it can be slow while developing. - -1. Install the latest Pi OS on a SD card. -2. Boot up your Raspberry Pi. -3. :ref:`Install-- - diff --git a/run_sphinx.sh b/run_sphinx.sh deleted file mode 100755 index 972860cbe..000000000 --- a/run_sphinx.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -usage() { - echo "Runner script for sphinx documentation build" - echo -e "\nWarnings are treated as errors as preparation for documentation releases.\n" - echo "Usage:" - echo " ./run_sphinx.sh : incremental build" - echo " ./run_sphinx.sh -c : clean re-build" - echo " ./run_sphinx.sh -n : Don't escalate warning to errors (for debug only!)" - exit 1 -} - -# Change working directory to location of script -SOURCE=${BASH_SOURCE[0]} -SCRIPT_DIR="$(dirname "$SOURCE")" -cd "$SCRIPT_DIR/docs/sphinx" || (echo "Could not change to docs directory" && exit 1) - -BUILD_DIR=_build - -CLEAN_BUILD=false -SPHINX_OPTS="-W --keep-going -T" -while getopts ":chn" opt; -do - case ${opt} in - c ) CLEAN_BUILD=true - ;; - h ) usage - ;; - n ) SPHINX_OPTS="-T" - ;; - \? ) usage - ;; - esac -done - - -if [[ $CLEAN_BUILD = true ]]; then - echo "Cleaning $BUILD_DIR" - rm -rf $BUILD_DIR - SPHINX_OPTS="$SPHINX_OPTS -a -E" -fi - -echo "Building docs [ sphinx-build $SPHINX_OPTS -b html . ${BUILD_DIR}/html/docs ]" -sphinx-build $SPHINX_OPTS -b html . ${BUILD_DIR}/html/docs - diff --git a/src/jukebox/components/controls/bluetooth_audio_buttons/README.rst b/src/jukebox/components/controls/bluetooth_audio_buttons/README.rst index 290b0c6b1..87a7eab2b 100644 --- a/src/jukebox/components/controls/bluetooth_audio_buttons/README.rst +++ b/src/jukebox/components/controls/bluetooth_audio_buttons/README.rst @@ -52,4 +52,4 @@ The RPC command follows the regular RPC command rules as defined in :ref:`usergu Key codes can be found in the log files. Press the various buttons on your headset, while watching the -logs with e.g. ``tail -f shared/logs/app.log``. Look for entries like ``No callback registered for button ...``. \ No newline at end of file +logs with e.g. ``tail -f shared/logs/app.log``. Look for entries like ``No callback registered for button ...``. diff --git a/src/jukebox/components/gpio/gpioz/README.rst b/src/jukebox/components/gpio/gpioz/README.rst index 9d6d7020b..46ab0250a 100644 --- a/src/jukebox/components/gpio/gpioz/README.rst +++ b/src/jukebox/components/gpio/gpioz/README.rst @@ -462,5 +462,3 @@ Simply change the header in the configuration file to enable it. Host is the IP pigpio.PiGPIOFactory: kwargs: host: 192.168.178.32 - - diff --git a/src/jukebox/components/rfid/hardware/template_new_reader/README.rst b/src/jukebox/components/rfid/hardware/template_new_reader/README.rst index 228f3039a..e20e4452b 100644 --- a/src/jukebox/components/rfid/hardware/template_new_reader/README.rst +++ b/src/jukebox/components/rfid/hardware/template_new_reader/README.rst @@ -27,8 +27,7 @@ Your new reader is a python subpackage with these three mandatory files +- description.py <-- A description module w/o dependencies. Do not change the filename! +- README.rst <-- The Readme -The module documentation must go into a separate file so we can import it into the Sphinx document generation flow -without loading the Python module. +The module documentation must go into a separate file, named README.MD. Conventions ^^^^^^^^^^^^^^^^^^ diff --git a/src/jukebox/jukebox/daemon.py b/src/jukebox/jukebox/daemon.py index 0c3805eeb..e847428e2 100755 --- a/src/jukebox/jukebox/daemon.py +++ b/src/jukebox/jukebox/daemon.py @@ -230,13 +230,10 @@ def run(self): if self.write_artifacts: # This writes out - # rpc_command_reference.rst # rpc_command_reference.txt - # rpc_command_alias_reference.rst # rpc_command_alias_reference.txt artifacts_dir = '../../shared/artifacts/' - sphinx_dir = '../../docs/sphinx/userguide' try: os.mkdir(artifacts_dir) @@ -250,14 +247,6 @@ def run(self): with open(os.path.join(artifacts_dir, 'rpc_command_alias_reference.txt'), 'w') as stream: jukebox.utils.generate_cmd_alias_reference(stream) - # Write RST files directly into Sphinx directory - - with open(os.path.join(sphinx_dir, 'rpc_command_reference.rst'), 'w') as stream: - plugin.generate_help_rst(stream) - - with open(os.path.join(sphinx_dir, 'rpc_command_alias_reference.rst'), 'w') as stream: - jukebox.utils.generate_cmd_alias_rst(stream) - # Start the RPC Server self.rpc_server.run() From 7406085aa8f960c202d933073390aef99c9f4a49 Mon Sep 17 00:00:00 2001 From: s-martinUps! Looks like your documentation has not been build!
-No reason to panic. Please run through the following steps: -
-
-- -
cd /home/pi/RPi-Jukebox-RFID
- -
./run_sphinx.sh -c
- Reload this page
-Or check out the online documentation at Read The Docs. -
Why not try again from the top-level of
diff --git a/resources/html/runbuildui.html b/resources/html/runbuildui.html index 04f92c704..6ade7bb0a 100755 --- a/resources/html/runbuildui.html +++ b/resources/html/runbuildui.html @@ -12,11 +12,11 @@No reason to panic. Please run through the following steps:
cd ~/RPi-Jukebox-RFID/src/webapp
./run_rebuild.sh -u
cd ~/RPi-Jukebox-RFID/src/webapp
./run_rebuild.sh -u
Reload this page
In case of trouble when building the Web UI, consult the documentation! +
In case of trouble when building the Web UI, consult the official documentation!