Infoscreen/HTPC with webinterface
Go to file
Peder Bergebakken Sundt d10db19d7d flake.lock: Update
Flake lock file updates:

• Updated input 'fix-python':
    'github:GuillaumeDesforges/fix-python/f7f4b33e22414071fc1f9cbf68072c413c3a7fdf' (2024-04-23)
  → 'github:GuillaumeDesforges/fix-python/2926402234c3f99aa8e4608c51d9ffa73ea403c0' (2024-09-04)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/f1010e0469db743d14519a1efd37e23f8513d714' (2024-05-09)
  → 'github:NixOS/nixpkgs/c04d5652cfa9742b1d519688f65d1bbccea9eb7e' (2024-09-19)
2024-09-20 21:51:51 +02:00
dist Whoops, fixed the xorg service file 2019-03-09 21:27:12 +01:00
grzegorz limit to 1080p 2024-05-18 17:26:39 +02:00
.envrc fix 2024-05-10 20:03:52 +02:00
.gitignore fix 2024-05-10 20:03:52 +02:00
README.md upgrade to sanic-ext 2023-08-27 00:51:10 +02:00
deploy.bash Move config.py to default_config.py and make deplay.bash not delete config.py on the remote 2018-04-12 19:03:36 +02:00
flake.lock flake.lock: Update 2024-09-20 21:51:51 +02:00
flake.nix Update inputs 2024-05-10 20:03:52 +02:00
poetry.lock bump sanic, poetry lock 2024-09-20 21:51:45 +02:00
pyproject.toml bump sanic, poetry lock 2024-09-20 21:51:45 +02:00

README.md

Grzegorz API

grzegorz is simple REST API for managing an instance of MPV. Why "Grzegorz"? Great taste in humor of course!

When grzegorz starts, it launches an instance of MPV and maintains it. It is designed to be used as an info screen or HTPC, and supports multiple users to push changes to the MPV instance.

The API is described and can be tested at http:/localhost:8080/docs/swagger while the server is running. All API endpoints are available under /api

How install and run it

Gregorz manages a MPV process, meaning you need to have MPV installed on your system. Look for it in your package manager.

sudo pip install git+https://github.com/Programvareverkstedet/grzegorz#master
sanic grzegorz.app --host :: --port 8080

Details are over here.

Development server

Setup local virtual environment and run with auto-reload:

poetry install
poetry run sanic grzegorz.app --host localhost --port 8000 --debug

The server should now be available at http://localhost:8000/.

A word of caution

Grzegors will make a unix socket in the current working directory. Make sure it is somewhere writeable!

Making grzegorz run on boot

When setting up a info screen or HTPC using Grzegors, you may configure it to run automatically on startup.

We recommend installing a headless linux, and create a user for grzegorz to run as. (We named ours grzegorz, obviously) Clone this repo into the home directory. Then make systemd automatically spin up a X session to run grzegorz in: Copy the files in the folder dist into the folder $HOME/.config/systemd/user and run the following commands as your user:

$ systemctl --user enable grzegorz@0.service
$ systemctl --user start grzegorz@0.service