Git Product home page Git Product logo

loremflickr-streamdeck-plugin's Introduction

loremflickr-streamdeck-plugin

LoremFlickr website

loremflickr-streamdeck-plugin

Stream Deck Plugin for installing images from LoremFlickr to button.

LoremFlickr official website: https://loremflickr.com/

Requirements

Operating systems:

  • MacOS: 10.14 or later
  • Windows: 10 or later

Stream Deck application: 6.0, 6.1

Python: 3.8 or later

Installation

Python

If you have difficulty, then look at articles or videos on the Internet about it.

  1. Download Python from the official website and install it: https://www.python.org/downloads/

    ⚠️ Python version must be 3.8.0 or later.

  2. Check that Python is available from the command line:

    MacOS

    Open the Terminal application, enter the command below and press Return(Enter):

    python3 -V

    If you get a response that looks like Python 3.10.4, then you have done everything right.

    If there is no response, then you have installed Python incorrectly.

    Windows

    Open the Command Prompt application, enter the command below and press Return(Enter):

    python -V

    If you get a response that looks like Python 3.10.4, then you have done everything right.

    If there is no response, then you have installed Python incorrectly.

  3. Restart your computer.

Stream Deck

Download the Stream Deck app from the official website and install it: https://www.elgato.com/en/downloads

LoremFlickr Stream Deck Plugin

⚠️ During the installation of the plugin, you must have internet access.

Errors may occur during installation. If they are, then a message about it will appear on the screen.

Latest release: https://github.com/gri-gus/loremflickr-streamdeck-plugin/releases

You need to download a file called com.ggusev.loremflickr.streamDeckPlugin. Once downloaded, double-click on it. The Stream Deck application prompts you to install the plugin.

After installation, you will have a LoremFlickr category and actions:

category

Usage

⚠️ The button may not start working immediately after installing the plugin, but after about 20 seconds. At this time, dependencies are installed. If you do not receive an error message on the screen, but an exclamation mark is displayed when you click on the button, then the plugin is not fully installed yet, and you need to wait. This only happens after installing the plugin. There is no need to wait for the next use.

Drag the Set key image action from LoremFlickr category to the desired button.

Click on the button, and you will see the Property Inspector where you can adjust some settings. See the Manual section in the Property Inspector for more details.

setkeyimage_pi

Each time you press the button on the Stream Deck, the picture will be updated.

How does it work internally?

Stream Deck does not have the ability to run Python files, but it does have the ability to run .bat and .sh files.

But it all starts with the manifest.json file, which contains "CodePathMac": "run.sh" and "CodePathWin": "run.bat" . These are scripts that are run depending on the system.

Files run.sh for MacOS or run.bat for Windows: startup scripts, entry points. They set environment variables, check whether Python is installed (if not, an error window pops up), and run the init.py script. Based on the result from init.py, if everything is fine, then the main.py file is launched and the plugin is launched, and if not, then an error window pops up. This happens every time you restart the Stream Deck application and when you reinstall/update the plugin.

What is the init.py file? This is a script that is responsible for the virtual environment and dependencies. Why can't we immediately add venv to the built version of the plugin? Because a user with a system/hardware different from the one on which venv was made may encounter compatibility problems. Therefore, for Python, everyone should have their own virtual environment for each project. The init.py file is responsible for creating the virtual environment, installing dependencies from requirements.txt, and checking that everything is installed correctly. It also runs every time you restart the Stream Deck application and when you reinstall/update the plugin. But if the virtual environment has already been created and the dependencies are installed, then init.py simply checks that everything is installed correctly.

Later, the main.py file comes into play, which contains the plugin logic.

Dependencies

streamdeck-python-sdk

streamdeck-javascript-sdk

loremflickr-streamdeck-plugin's People

Contributors

gri-gus avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

loremflickr-streamdeck-plugin's Issues

Where is the Log file?

According to settings.py, it looks like the log file will be output,
Where can i find the exported log file?
mac os M1 max
Sonoma 14.3.1

PLUGIN_LOGS_DIR_PATH: Path = Path(os.environ["PLUGIN_LOGS_DIR_PATH"])
PLUGIN_NAME: str = os.environ["PLUGIN_NAME"]

LOG_FILE_PATH: Path = PLUGIN_LOGS_DIR_PATH / Path(f"{PLUGIN_NAME}.log")
LOG_LEVEL: int = logging.DEBUG

IMAGE_SIZE = 144
LOREM_FLICKR_URL = "https://loremflickr.com"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.