Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
  • hammy/syng
  • falk.rehse/syng
2 results
Select Git revision
Loading items
Show changes
Commits on Source (329)
Showing
with 5666 additions and 1315 deletions
name: Check
on:
push:
workflow_dispatch:
jobs:
mypy:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install and poetry and all dependencies
run: |
pip install poetry --quiet
poetry install --all-extras
- name: Run mypy
run: poetry run mypy syng --strict
ruff:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install ruff
run: pip install ruff --quiet
- name: Run ruff
run: ruff check syng
name: Build for windows and docker and create a release
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-windows:
# The type of runner that the job will run on
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
repository: christofsteel/syng
- name: Install 7-Zip
run: choco install -y 7zip
- name: Download and extract latest MPV nightly
run: |
Invoke-WebRequest -Uri https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/20241121/mpv-dev-x86_64-20241121-git-4b11f66.7z -OutFile mpv.7z
7z x mpv.7z
- name: Download and extract FFMPEG 7.1
run: |
Invoke-WebRequest -Uri https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-7.1-full_build.7z -OutFile ffmpeg-release-full.7z
7z x ffmpeg-release-full.7z
- name: Populate workdir
run: |
mkdir work
Copy-Item -Recurse -Verbose syng work/syng
Copy-Item -Verbose requirements-client.txt work/requirements.txt
Copy-Item -Verbose resources/icons/syng.ico work/
Copy-Item -Verbose syng/static/background.png work/
Copy-Item -Verbose syng/static/background20perc.png work/
Copy-Item -Verbose libmpv-2.dll work/
Copy-Item -Verbose ffmpeg-7.1-full_build/bin/ffmpeg.exe work/
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: 3.12
- name: Install poetry
run: pip install poetry
- name: Extract version from Poetry
id: get_version
run: echo "VERSION=$(poetry version -s)" >> $GITHUB_ENV
shell: bash
- name: Install PyInstaller
run: pip install pyinstaller
- name: Bundle Syng
run: |
pip install -r requirements.txt
pyinstaller -n "syng-${{ env.VERSION }}" -F -w -i'.\syng.ico' --add-data='.\syng.ico;.' --add-data='.\background.png;.' --add-data='.\background20perc.png;.' --add-binary '.\libmpv-2.dll;.' --add-binary '.\ffmpeg.exe;.' syng/main.py
working-directory: ./work
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Syng Version ${{ env.VERSION }}
path: work/dist/syng-${{ env.VERSION }}.exe
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
repository: christofsteel/syng
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: ./resources/docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
name: Build appimage
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# container:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
repository: christofsteel/syng
- name: Install poetry
run: pip install poetry
- name: Extract version from Poetry
id: get_version
run: echo "VERSION=$(poetry version -s)" >> $GITHUB_ENV
shell: bash
- name: Preparing Build dir
run: |
mkdir -p app/bin
cp "${{ github.workspace }}/resources/appimage/build.sh" app/build.sh
cp "${{ github.workspace }}/resources/appimage/bin/syng" app/bin/
cp "${{ github.workspace }}/resources/appimage/bin/yt-dlp" app/bin/
- name: Building AppDir
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/christofsteel/syng-appimage-builder:main
options: -v ${{ github.workspace }}/app:/app
run: |
/app/build.sh
export APPIMAGE_EXTRACT_AND_RUN=1
/app/linuxdeploy-x86_64.AppImage --plugin qt --appdir /app/AppDir --output appimage
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Syng Version ${{ env.VERSION }} AppImage
path: "${{ github.workspace }}/app/Syng-x86_64.AppImage"
name: Build docker container for appimage building
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-appimage-builder
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
repository: christofsteel/syng
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: ./resources/appimage/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
name: Build docker container
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
repository: christofsteel/syng
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: ./resources/docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
name: Build for windows
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-windows:
# The type of runner that the job will run on
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
repository: christofsteel/syng
- name: Install 7-Zip
run: choco install -y 7zip
- name: Download and extract latest MPV nightly
run: |
Invoke-WebRequest -Uri https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/20250702/mpv-dev-x86_64-20250702-git-a043624.7z -OutFile mpv.7z
7z x mpv.7z
- name: Download and extract FFMPEG 7.1
run: |
Invoke-WebRequest -Uri https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z -OutFile ffmpeg-release-full.7z
7z x ffmpeg-release-full.7z
- name: Populate workdir
run: |
mkdir work
mkdir work/portable
Copy-Item -Verbose requirements-client.txt work/requirements.txt
Copy-Item -Recurse -Verbose syng work/portable/syng
Copy-Item -Verbose resources/icons/syng.ico work/portable/
Copy-Item -Verbose syng/static/background.png work/portable/
Copy-Item -Verbose syng/static/background20perc.png work/portable/
Copy-Item -Verbose libmpv-2.dll work/portable/
Copy-Item -Verbose ffmpeg-7.1.1-full_build/bin/ffmpeg.exe work/portable/
# mkdir work/install
# Copy-Item -Recurse -Verbose syng work/install/syng
# Copy-Item -Verbose requirements-client.txt work/install/requirements.txt
# Copy-Item -Verbose resources/icons/syng.ico work/install/
# Copy-Item -Verbose syng/static/background.png work/install/
# Copy-Item -Verbose syng/static/background20perc.png work/install/
# Copy-Item -Verbose libmpv-2.dll work/install/
# Copy-Item -Verbose ffmpeg-7.1-full_build/bin/ffmpeg.exe work/install/
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: 3.13
- name: Install poetry
run: pip install poetry
- name: Extract version from Poetry
id: get_version
run: echo "VERSION=$(poetry version -s)" >> $GITHUB_ENV
shell: bash
- name: Install PyInstaller
run: pip install pyinstaller
- name: Installing requirements
run: pip install -r requirements.txt
working-directory: ./work
- name: Bundle Syng (portable)
run:
pyinstaller -n "syng-${{ env.VERSION }}" -F -w -i'.\syng.ico' --add-data='.\syng.ico;.' --add-data='.\background.png;.' --add-data='.\background20perc.png;.' --add-binary '.\libmpv-2.dll;.' --add-binary '.\ffmpeg.exe;.' syng/main.py
working-directory: ./work/portable
# - name: Bundle Syng (install)
# run:
# pyinstaller -D --contents-directory data -w -i'.\syng.ico' --add-data='.\syng.ico;.' --add-data='.\background.png;.' --add-data='.\background20perc.png;.' --add-binary '.\libmpv-2.dll;.' --add-binary '.\ffmpeg.exe;.' -n syng syng/main.py
# working-directory: ./work/install
#
# # build msi
# - name: Add msbuild to PATH
# uses: microsoft/setup-msbuild@v2
# - name: Install WiX
# run: |
# dotnet tool install --global wix --version 5.0.2
# wix extension add -g WixToolset.UI.wixext/5.0.2
# - name: Copy wix file to dist
# run: |
# Copy-Item -Verbose resources/windows/syng.wxs work/install/dist/syng.wxs
# Copy-Item -Verbose resources/windows/agpl-3.0.rtf work/install/dist/agpl-3.0.rtf
# - name: Build WiX on Windows
# run: wix build -ext WixToolset.UI.wixext .\syng.wxs
# working-directory: ./work/install/dist
# - name: Upload artifact (portable)
# uses: actions/upload-artifact@v4
# with:
# name: Syng Version ${{ env.VERSION }} portable
# path: work/portable/dist/syng-${{ env.VERSION }}.exe
- name: Upload artifact (portable)
uses: actions/upload-artifact@v4
with:
name: Syng Version ${{ env.VERSION }}
path: work/portable/dist/syng-${{ env.VERSION }}.exe
docs/build docs/build
dist
build
__pycache__ __pycache__
.venv .venv
.idea .idea
.flatpak-builder
repo
image: python:3-alpine image: python:3.12
variables:
MYPYPATH: "stubs/"
mypy: mypy:
stage: test stage: test
script: script:
- pip install mypy types-Pillow types-PyYAML --quiet - pip install poetry
- mypy syng --strict - poetry install --all-extras
- poetry run mypy syng --strict
ruff: ruff:
stage: test stage: test
script: script:
- pip install ruff --quiet - pip install ruff --quiet
- ruff syng - ruff check syng
# Syng <p align="center">
<img src="https://raw.githubusercontent.com/christofsteel/syng/refs/heads/main/resources/icons/hicolor/512x512/apps/rocks.syng.Syng.png"
height="130">
Syng is an all-in-one karaoke software, consisting of a *backend server*, a *web frontend* and a *playback client*. _Easily host karaoke events_
<p align="center">
[![Matrix](https://img.shields.io/matrix/syng%3Amatrix.org?logo=matrix&label=%23syng%3Amatrix.org)](https://matrix.to/#/#syng:matrix.org)
[![Mastodon Follow](https://img.shields.io/mastodon/follow/113266262154630635?domain=https%3A%2F%2Ffloss.social&style=flat&logo=mastodon&logoColor=white)](https://floss.social/@syng)
[![PyPI - Version](https://img.shields.io/pypi/v/syng?logo=pypi)](https://pypi.org/project/syng/)
[![Flathub Version](https://img.shields.io/flathub/v/rocks.syng.Syng?logo=flathub)](https://flathub.org/apps/rocks.syng.Syng)
[![PyPI - License](https://img.shields.io/pypi/l/syng)](https://www.gnu.org/licenses/agpl-3.0.en.html)
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fsyng.rocks%2F&label=syng.rocks)](https://syng.rocks)
[![Forgejo Pipeline Status](https://git.k-fortytwo.de/christofsteel/syng/badges/workflows/check.yaml/badge.svg?logo=python&label=mypy%2Bruff)](https://git.k-fortytwo.de/christofsteel/syng)
**Syng** is an all-in-one karaoke software, consisting of a *backend server*, a *web frontend* and a *playback client*.
Karaoke performers can search a library using the web frontend, and add songs to the queue. Karaoke performers can search a library using the web frontend, and add songs to the queue.
The playback client retrieves songs from the backend server and plays them in order. The playback client retrieves songs from the backend server and plays them in order.
Currently, songs can be accessed using the following sources: You can play songs from **YouTube**, an **S3** storage or simply share local **files**.
The playback client uses [mpv](https://mpv.io/) for playback and can therefore play a variety of file formats, such as `mp3+cdg`, `webm`, `mp4`, ...
Join our [matrix room](https://matrix.to/#/#syng:matrix.org) or follow us on [mastodon](https://floss.social/@syng) for update notifications and support.
# Screenshots
<img src="https://raw.githubusercontent.com/christofsteel/syng/b963d09aee58531ab7ea61ddf04ee169fba57a63/resources/screenshots/syng.png" alt="Main Window" height=200/> <img src="https://raw.githubusercontent.com/christofsteel/syng/b963d09aee58531ab7ea61ddf04ee169fba57a63/resources/screenshots/syng_advanced.png" alt="Main Window (Advanced)" height=200/>
<img src="https://raw.githubusercontent.com/christofsteel/syng/b963d09aee58531ab7ea61ddf04ee169fba57a63/resources/screenshots/syng_web2.png" alt="Web Interface" height=200/> <img src="https://raw.githubusercontent.com/christofsteel/syng/b963d09aee58531ab7ea61ddf04ee169fba57a63/resources/screenshots/syng_mobile_search.png" alt="Web Interface on Mobile" height=200/>
<img src="https://raw.githubusercontent.com/christofsteel/syng/b963d09aee58531ab7ea61ddf04ee169fba57a63/resources/screenshots/syng_player_next_up.png" alt="Player (next up)" height=200/> <img src="https://raw.githubusercontent.com/christofsteel/syng/b963d09aee58531ab7ea61ddf04ee169fba57a63/resources/screenshots/syng_player_song.png" alt="Player playing a song" height=200/>
# Client
[![Get in on Flathub](https://flathub.org/api/badge?locale=en)](https://flathub.org/apps/rocks.syng.Syng)
To host a karaoke event, you only need to use the playback client. You can use the publicly available instance at https://syng.rocks as your server.
## Installation
### Linux
The preferred way to install the client is via [Flathub](https://flathub.org/apps/rocks.syng.Syng).
Alternatively Syng can be installed via the _Python Package Index_ (PyPI). When installing the client it is mandatory to include the `client` flag:
pip install 'syng[client]'
This installs both the playback client (`syng client`) and a configuration GUI (`syng gui`).
**Note:** When installing via PyPI, you need to have [libmpv](https://mpv.io/) installed on machine of the playback client.
The Syng client is also packaged for Arch Linux in the [Arch Linux user repository](https://aur.archlinux.org/packages/syng-client)
### Windows
Windows support is experimental, but you can download the current version from [Releases](https://github.com/christofsteel/syng/releases). No installation necessary, you can just run the `exe`.
## Configuration
You can host karaoke events using the default configuration. But if you need more advanced configuration, you can either configure Syng using the GUI or via a text editor by editing `~/.config/syng/config.yaml`. There are the following settings:
* `server`: URL of the server to connect to.
* `room`: The room code for your karaoke event. Can be chosen arbitrarily, but must be unique. Unused rooms will be deleted after some time. _Note:_ Everyone, that has access to the room code can join the karaoke event.
* `secret`: The admin password for your karaoke event. If you want to reconnect with a playback client to a room, these must match. Additionally, this unlocks admin capabilities to a web client, when given under "Advanced" in the web client.
* `waiting_room_policy`: One of `none`, `optional`, `forced`. When a performer wants to be added to the playback queue, but has already a song queued, they can be added to the _waiting room_. `none` disables this behavior and performers can have multiple songs in the queue, `optional` gives the performer a notification, and they can decide for themselves, and `forced` puts them in the waiting room every time. Once the current song of a performer leaves the queue, the song from the waiting room will be added to the queue.
* `last_song`: `none` or a time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). When a song is added to the queue, and its ending time exceeds this value, it is rejected.
* `preview_duration`: Before every song, there is a short slide for the next performer. This sets how long it is shown in seconds.
* `key`: If the server, you want to connect to is in _private_ or _restricted_ mode, this will authorize the client. Private server reject unauthorized playback clients, restricted servers limit the searching to be _client only_.
* `buffer_in_advance`: How many songs should be buffered in advanced.
* `qr_box_size`: The size of one box (think pixel) of the QR Code in the playback window.
* `qr_position`: Position of the QR Code in the playback window. One of `bottom-left`, `bottom-right`, `top-left`, `top-right`.
* `show_advanced`: Show advanced options in the configuration GUI.
In addition to the general config, has its own configuration under the `sources` key of the configuration.
### YouTube
Configuration is done under `sources``youtube` with the following settings:
* `enabled`: `true` or `false`.
* `channels`: list of YouTube channels. If this is a nonempty list, Syng will only search these channels, otherwise YouTube will be searched as a whole.
* `tmp_dir`: YouTube videos will be downloaded before playback. This sets the directory, where YouTube videos are stored.
* `max_res`: Maximum resolution of a video.
* `start_streaming`: `true` or `false`. If `true`, videos will be streamed directly using `mpv`, if the video is not cached beforehand. Otherwise, Syng waits for the video to be downloaded.
* `seach_suffix`: A string that is appended to each search query. Default is "karaoke".
* `max_duration`: Maximum length of accepted videos in seconds. Default is 1800 (30 minutes)
### S3
Configuration is done under `sources``s3` with the following settings:
* `enabled`: `true` or `false`.
* `extensions`: List of extensions to be searched. For karaoke songs, that separate audio and video (e.g. CDG files), you can use `mp3+cdg` to signify, that the audio part is a `mp3` file and the video is a `cdg` file. For karaoke songs, that do not separate this (e.g. mp4 files), you can simply use `mp4`.
* `endpoint`: Endpoint of the s3.
* `access_key` Access key for the s3.
* `secret_key`: Secret key for the s3.
* `secure`: If `true` uses `ssl`, otherwise not.
* `bucket`: Bucket for the karaoke files.
* `index_file`: Cache file, that contains the filenames of the karaoke files in the s3.
* `tmp_dir`: Temporary download directory of the karaoke files.
### Files
Configuration is done under `sources``files` with the following settings:
* `enabled`: `true` or `false`.
* `extensions`: List of extensions to be searched. For karaoke songs, that separate audio and video (e.g. CDG files), you can use `mp3+cdg` to signify, that the audio part is a `mp3` file and the video is a `cdg` file. For karaoke songs, that do not separate this (e.g. mp4 files), you can simply use `mp4`.
* `dir`: Directory, where the karaoke files are stored.
### Default configuration
```
config:
key: ''
last_song: null
preview_duration: 3
room: <Random room code>
secret: <Random secret>
server: https://syng.rocks
waiting_room_policy: none
show_advanced: false
buffer_in_advance: 2
qr_box_size: 5
qr_position: bottom-right
next_up_time: 20
sources:
files:
dir: .
enabled: false
extensions:
- mp3+cdg
s3:
access_key: ''
bucket: ''
enabled: false
endpoint: ''
extensions:
- mp3+cdg
index_file: ${XDG_CACHE_DIR}/syng/s3-index
secret_key: ''
secure: true
tmp_dir: ${XDG_CACHE_DIR}/syng
youtube:
channels: []
enabled: true
start_streaming: false
max_res: 720
tmp_dir: ${XDG_CACHE_DIR}/syng
search_suffix: karaoke
max_duration: 1800
```
# Web client
The web client consists of three columns on desktop and three tabs on mobile:
- **Search:** Users can search for karaoke songs and get the results here. You can also directly add a YouTube video by using its link. Search results for YouTube videos have a second button to preview the song.
- **Queue:** Shows the current queue. The current song is highlighted at the top and each item is equipped with an ETA. If you are on an admin connection, you can drag and drop to change the order of the queue and delete items from the queue.
- **Recent:** This shows all previously played songs.
When connecting to the web client, you can give yourself a name with which your songs are queued. You can change your name by changing it in the footer. If no name is selected, a name is queried each time a song is added.
In the advanced options, you can add the admin password, that corresponds with the admin password on the playback client, to elevate this connection to an admin connection.
# Server
If you want to host your own Syng server, you can do that, but you can also use the publicly available Syng instance at https://syng.rocks.
## Python Package Index
You can install the server via pip:
pip install syng
and then run via:
syng server
The server is also automatically available if you install the client.
There exists one optional dependency for the server: `alt-profanity-check`. If this package is installed, each username is checked for profanity, otherwise no such check happens.
## Docker
Alternatively you can run the server using docker. It listens on port 8080 and reads a key file at `/app/keys.txt` when configured as private or restricted.
docker run --rm -v /path/to/your/keys.txt:/app/keys.txt -p 8080:8080 ghcr.io/christofsteel/syng -H 0.0.0.0
- **YouTube.** The backend server queries YouTube for the song and forwards the URL to the playback client. The playback client then downloads the video from YouTube for playback. ## Arch Linux
- **S3.** The backend server holds a list of all file paths accessible through the s3 storage, and forwards the chosen path to the playback client. The playback client then downloads the needed files from the s3 for playback.
- **Files.** Same as S3, but all files reside locally on the playback client.
The playback client uses `mpv` for playback and can therefore play a variety of file formats, such as `mp3+cdg`, `webm`, `mp4`, ... The Syng server is also packaged for Arch Linux in the [Arch Linux user repository](https://aur.archlinux.org/packages/syng-server)
# Installation ## Configuration
## Server Configuration is done via command line arguments, see `syng server --help` for an overview.
pip install "syng[server] @ git+https://github.com/christofsteel/syng.git" ## Public, Restricted, Private and keys.txt
This installs the server part (`syng-server`), if you want to self-host a syng server. There is a publicly available syng instance at https://syng.rocks. Syng can run in three modes: public, restricted and private. This restricts which playback clients can start an event and what capabilities the event has.
This has no bearing on the web clients. Every web client, that has access to the room code can join the event.
Authorization is done via an entry in the `keys.txt`
## Client - Public means, that there are no restrictions. Every playback client can start an event and has support for all features
- Restricted means, that every playback client can start an event, but server side searching is limited to authorized clients. For unauthorized clients, a search request is forwarded to the playback client, that handles that search.
- Private means, that only authorized clients can start an event.
pip install "syng[client] @ git+https://github.com/christofsteel/syng.git" The `keys.txt` file is a simple text file holding one `sha256` encrypted password per line. Passwords are stored as their hex value and only the first 64 characters per line are read by the server. You can use the rest to add comments.
To add a key to the file, you can simply use `echo -n "PASSWORD" | sha256sum | cut -d ' ' -f 1 >> keys.txt`.
This installs both the playback client (`syng-client`) and a configuration GUI (`syng-gui`).
Source diff could not be displayed: it is too large. Options to address this: view the blob.
[tool.poetry] [tool.poetry]
name = "syng" name = "syng"
version = "2.0.0" version = "2.2.0"
description = "" description = "Easily host karaoke events"
authors = ["Christoph Stahl <christoph.stahl@tu-dortmund.de>"] authors = ["Christoph Stahl <christoph.stahl@tu-dortmund.de>"]
license = "GPL3" license = "AGPL-3.0-or-later"
readme = "README.md" readme = "README.md"
include = ["syng/static"] include = ["syng/static"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Environment :: X11 Applications :: Qt",
"Framework :: AsyncIO",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.9",
"Topic :: Multimedia :: Sound/Audio :: Players",
"Topic :: Multimedia :: Video :: Display",
"Typing :: Typed"
]
homepage = "https://syng.rocks"
repository = "https://github.com/christofsteel/syng"
keywords = ["karaoke", "youtube", "web", "audio", "video", "player", "qt"]
[tool.poetry.scripts] [tool.poetry.scripts]
syng-client = "syng.client:main" syng = "syng.main:main"
syng-server = "syng.server:main"
syng-gui = "syng.gui:main"
# syng-shell = "syng.webclientmockup:main"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.8" python = "^3.10"
python-socketio = "^5.10.0" python-socketio = "^5.10.0"
aiohttp = "^3.9.1" aiohttp = "^3.9.1"
pytube = { version = "*", optional = true } # yarl = "<1.14.0"
platformdirs = "^4.0.0"
yt-dlp = { version = ">=2024.11.18", extras = ["default"] }
minio = { version = "^7.2.0", optional = true } minio = { version = "^7.2.0", optional = true }
mutagen = { version = "^1.47.0", optional = true }
# aiocmd = "^0.1.5"
pillow = { version = "^10.1.0", optional = true} pillow = { version = "^10.1.0", optional = true}
yt-dlp = { version = "*", optional = true}
customtkinter = { version = "^5.2.1", optional = true}
qrcode = { version = "^7.4.2", optional = true } qrcode = { version = "^7.4.2", optional = true }
pymediainfo = { version = "^6.1.0", optional = true } pymediainfo = { version = "^6.1.0", optional = true }
pyyaml = { version = "^6.0.1", optional = true } pyyaml = { version = "^6.0.1", optional = true }
# async-tkinter-loop = "^0.9.2" alt-profanity-check = {version = "^1.4.1", optional = true}
tkcalendar = { version = "^1.6.1", optional = true } pyqt6 = {version=">=6.7.1", optional = true}
tktimepicker = { version = "^2.0.2", optional = true } mpv = {version = "^1.0.7", optional = true}
platformdirs = { version = "^4.0.0", optional = true } qasync = {version = "^0.27.1", optional = true}
packaging = {version = "^23.2", optional = true}
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
types-pyyaml = "^6.0.12.12" types-pyyaml = "^6.0.12.12"
types-pillow = "^10.1.0.2" types-pillow = "^10.1.0.2"
mypy = "^1.10.0"
pylint = "^3.2.7"
requirements-parser = "^0.11.0"
[tool.poetry.extras] [tool.poetry.extras]
client = ["minio", "mutagen", "pillow", "yt-dlp", client = ["minio", "pillow", "qrcode", "pymediainfo", "pyyaml", "pyqt6", "mpv", "qasync"]
"customtkinter", "qrcode", "pymediainfo", "pyyaml",
"tkcalendar", "tktimepicker", "platformdirs", "packaging"]
server = ["pytube"]
[build-system] [build-system]
requires = ["poetry-core"] requires = ["poetry-core"]
...@@ -57,9 +70,13 @@ disable = '''too-many-lines, ...@@ -57,9 +70,13 @@ disable = '''too-many-lines,
too-many-ancestors too-many-ancestors
''' '''
[tool.mypy]
mypy_path = "typings"
[[tool.mypy.overrides]] [[tool.mypy.overrides]]
module = [ module = [
"yt_dlp", "yt_dlp",
"yt_dlp.utils",
"pymediainfo", "pymediainfo",
"minio", "minio",
"qrcode", "qrcode",
...@@ -74,3 +91,6 @@ ignore_missing_imports = true ...@@ -74,3 +91,6 @@ ignore_missing_imports = true
[tool.ruff] [tool.ruff]
line-length = 100 line-length = 100
[tool.black]
line-length = 100
This diff is collapsed.
This diff is collapsed.
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN sed -i 's/htt[p|ps]:\/\/archive.ubuntu.com\/ubuntu\//mirror:\/\/mirrors.ubuntu.com\/mirrors.txt/g' /etc/apt/sources.list
RUN apt update && apt install -y git \
build-essential \
pkg-config \
ninja-build \
libgl1-mesa-dev \
autotools-dev \
autoconf \
libtool \
libfribidi-dev \
libharfbuzz-dev \
libfontconfig1-dev \
libx11-dev \
nasm \
libxv-dev \
libva-dev \
liblcms2-dev \
libdrm-dev \
libasound2-dev \
libgnutls28-dev \
libmp3lame-dev \
libvorbis-dev \
libopus-dev \
libtheora-dev \
libvpx-dev \
libx264-dev \
libx265-dev \
libpulse-dev \
libxext-dev \
libxpresent-dev \
libxrandr-dev \
libxss-dev \
libwebp-dev \
libxkbcommon-dev \
libpulse-dev \
libxkbcommon-x11-dev \
binutils \
python3-pip \
fuse3 \
libpipewire-0.2-dev \
libfreetype-dev \
glslang-dev \
wget \
libxcb-cursor0 libxcb-ewmh2 libxcb-icccm4 luajit libluajit-5.1-dev libpcsclite1 libxcb-keysyms1 libxcb-shape0 libjpeg-dev \
libfontconfig1-dev \
libfreetype-dev \
libgtk-3-dev \
libx11-dev \
libx11-xcb-dev \
libxcb-cursor-dev \
libxcb-glx0-dev \
libxcb-icccm4-dev \
libxcb-image0-dev \
libxcb-keysyms1-dev \
libxcb-randr0-dev \
libxcb-render-util0-dev \
libxcb-shape0-dev \
libxcb-shm0-dev \
libxcb-sync-dev \
libxcb-util-dev \
libxcb-xfixes0-dev \
libxcb-xkb-dev \
libxcb1-dev \
libxext-dev \
libxfixes-dev \
libxi-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
libxrender-dev \
libmediainfo0v5
RUN pip3 install meson
RUN useradd -m builder
RUN wget https://github.com/Kitware/CMake/releases/download/v4.0.3/cmake-4.0.3-linux-x86_64.sh -O /tmp/cmake.sh
RUN chmod +x /tmp/cmake.sh && /tmp/cmake.sh --skip-license --prefix=/usr
RUN git clone https://github.com/google/shaderc.git /deps/shaderc && cd /deps/shaderc && /deps/shaderc/utils/git-sync-deps && mkdir -p /deps/shaderc/build && cd /deps/shaderc/build && \
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DSHADERC_SKIP_TESTS=ON -DSHADERC_SKIP_EXAMPLES=ON \
/deps/shaderc && \
ninja && ninja install && rm -rf /deps/shaderc
RUN git clone https://github.com/Cyan4973/xxHash.git /deps/xxHash && cd /deps/xxHash && make && make install && rm -rf /deps/xxHash
RUN git clone https://code.videolan.org/videolan/dav1d.git /deps/dav1d && cd /deps/dav1d && git checkout 1.5.1 && \
mkdir -p /deps/dav1d/build && cd /deps/dav1d/build && \
meson setup .. --default-library=static --buildtype=release --prefix=/usr && \
ninja && ninja install && rm -rf /deps/dav1d
#RUN git clone https://gitlab.freedesktop.org/wayland/wayland.git /deps/wayland
#RUN cd /deps/wayland && git checkout 1.24 && \
# meson setup build --prefix=/usr -Ddocumentation=false -Ddtd_validation=false && \
# ninja -C build install
#RUN git clone https://gitlab.freedesktop.org/wayland/wayland-protocols.git /deps/wayland-protocols
#RUN cd /deps/wayland-protocols && git checkout 1.45 && \
# meson setup build --prefix=/usr -Dtests=false && \
# ninja -C build install
RUN wget https://download.qt.io/official_releases/qt/6.9/6.9.1/single/qt-everywhere-src-6.9.1.tar.xz -O /tmp/qt.tar.xz && tar -xf /tmp/qt.tar.xz -C /deps && rm /tmp/qt.tar.xz && mkdir /deps/qt-build && cd /deps/qt-build && \
/deps/qt-everywhere-src-6.9.1/configure -opensource -confirm-license -nomake examples -nomake tests -release -prefix /usr -skip qtwayland -skip qtwebengine -skip qtwebview -skip qt3d -skip qtdeclarative -skip qtscript -skip qtserialport -skip qttools -skip qtquick3d -skip qtxmlpatterns -skip qtcanvas3d -skip qtgraphs -skip qtlocation -skip qtdoc -skip qtlottie -skip qt5compat -skip qtmqtt -skip qtopcua -skip qtquick3dphysics -skip qtquickeffectmaker -skip qtquicktimeline -skip qttranslations -skip qtvirtualkeyboard -skip qtactiveqt -skip qtshadertools -skip qtmultimedia -skip qtspeech -skip qtcoap -skip qtconnectivity -skip qtdatavis3d -skip qtcharts -skip qtgrpc -skip qtwebsockets -skip qthttpserver -skip qtlanguageserver -skip qtpositioning -skip qtnetworkauth -skip qtremoteobjects -skip qtscmxml -skip qtsensors -skip qtserialbus -skip qtwebchannel -skip qtscxml && \
cd /deps/qt-build && cmake --build . --parallel && cmake --install . && rm -rf /deps/qt-everywhere-src-6.9.1 /deps/qt-build
RUN git clone https://github.com/mpv-player/mpv-build.git /deps/mpv-build/ && cd /deps/mpv-build && echo "-Djavascript=disabled" > mpv_options \
&& echo "--disable-debug" > ffmpeg_options \
&& echo "--disable-doc" >> ffmpeg_options \
&& echo "--enable-encoder=png" >> ffmpeg_options \
&& echo "--enable-gnutls" >> ffmpeg_options \
&& echo "--enable-gpl" >> ffmpeg_options \
&& echo "--enable-version3" >> ffmpeg_options \
&& echo "--enable-libass" >> ffmpeg_options \
&& echo "--enable-libdav1d" >> ffmpeg_options \
&& echo "--enable-libfreetype" >> ffmpeg_options \
&& echo "--enable-libmp3lame" >> ffmpeg_options \
&& echo "--enable-libopus" >> ffmpeg_options \
&& echo "--enable-libtheora" >> ffmpeg_options \
&& echo "--enable-libvorbis" >> ffmpeg_options \
&& echo "--enable-libvpx" >> ffmpeg_options \
&& echo "--enable-libx264" >> ffmpeg_options \
&& echo "--enable-libx265" >> ffmpeg_options \
&& echo "--enable-libwebp" >> ffmpeg_options \
&& /deps/mpv-build/rebuild -j32 \
&& cp /deps/mpv-build/build_libs/bin/ffmpeg /usr/bin/ffmpeg \
&& cp /deps/mpv-build/mpv/build/libmpv.so.2.5.0 /usr/lib/libmpv.so.2.5.0 \
&& rm -rf /deps/mpv-build
#! /bin/bash
# If running from an extracted image, then export ARGV0 and APPDIR
if [ -z "${APPIMAGE}" ]; then
export ARGV0="$0"
self=$(readlink -f -- "$0") # Protect spaces (issue 55)
here="${self%/*}"
tmp="${here%/*}"
export APPDIR="${tmp%/*}"
fi
# Resolve the calling command (preserving symbolic links).
export APPIMAGE_COMMAND=$(command -v -- "$ARGV0")
# Export TCl/Tk
export TCL_LIBRARY="${APPDIR}/usr/share/tcltk/tcl8.6"
export TK_LIBRARY="${APPDIR}/usr/share/tcltk/tk8.6"
export TKPATH="${TK_LIBRARY}"
# Export SSL certificate
export SSL_CERT_FILE="${APPDIR}/opt/_internal/certs.pem"
# Call Python
export PATH="$APPDIR/usr/bin:$PATH"
export LD_LIBRARY_PATH="$APPDIR/usr/lib:$LD_LIBRARY_PATH"
export PYTHONPATH="$APPDIR/usr/lib/python3.13/site-packages"
"$APPDIR/opt/python3.13/bin/python3.13" -m syng "$@"
#! /bin/bash
# If running from an extracted image, then export ARGV0 and APPDIR
if [ -z "${APPIMAGE}" ]; then
export ARGV0="$0"
self=$(readlink -f -- "$0") # Protect spaces (issue 55)
here="${self%/*}"
tmp="${here%/*}"
export APPDIR="${tmp%/*}"
fi
# Resolve the calling command (preserving symbolic links).
export APPIMAGE_COMMAND=$(command -v -- "$ARGV0")
# Export TCl/Tk
export TCL_LIBRARY="${APPDIR}/usr/share/tcltk/tcl8.6"
export TK_LIBRARY="${APPDIR}/usr/share/tcltk/tk8.6"
export TKPATH="${TK_LIBRARY}"
# Export SSL certificate
export SSL_CERT_FILE="${APPDIR}/opt/_internal/certs.pem"
# Call Python
export PATH="$APPDIR/usr/bin:$PATH"
export LD_LIBRARY_PATH="$APPDIR/usr/lib:$LD_LIBRARY_PATH"
export PYTHONPATH="$APPDIR/usr/lib/python3.13/site-packages"
"$APPDIR/opt/python3.13/bin/python3.13" -m yt_dlp "$@"
#!/usr/bin/env bash
PKGDIR=usr/lib/python3.13/site-packages
cd /app
if [ ! -x /app/python3.13.5-cp313-cp313-manylinux2014_x86_64.AppImage ]; then
echo "Downloading Python 3.13 AppImage..."
wget https://github.com/niess/python-appimage/releases/download/python3.13/python3.13.5-cp313-cp313-manylinux2014_x86_64.AppImage
chmod +x python3.13.5-cp313-cp313-manylinux2014_x86_64.AppImage
else
echo "Python 3.13 AppImage already exists."
fi
if [ ! -x /app/linuxdeploy-x86_64.AppImage ]; then
echo "Downloading linuxdeploy AppImage..."
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
else
echo "linuxdeploy AppImage already exists."
fi
if [ ! -x /app/linuxdeploy-plugin-qt-x86_64.AppImage ]; then
echo "Downloading linuxdeploy-plugin-qt AppImage..."
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/1-alpha-20250213-1/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
else
echo "linuxdeploy-plugin-qt AppImage already exists."
fi
if [ ! -d /app/syng ]; then
echo "Cloning Syng repository..."
git clone https://github.com/christofsteel/syng.git /app/syng
else
echo "Syng repository already exists."
fi
# if [ ! -x /app/mpv/mpv-build/mpv/build/libmpv.so.2.5.0 ]; then
# echo "Building MPV..."
# mkdir -p /app/mpv
# cd /app/mpv
# git clone https://github.com/mpv-player/mpv-build.git
# cd mpv-build
# echo "-Dlibmpv=true" > mpv_options
# echo "-Djavascript=disabled" >> mpv_options
# echo "--disable-debug" > ffmpeg_options
# echo "--disable-doc" >> ffmpeg_options
# echo "--enable-encoder=png" >> ffmpeg_options
# echo "--enable-gnutls" >> ffmpeg_options
# echo "--enable-gpl" >> ffmpeg_options
# echo "--enable-version3" >> ffmpeg_options
# echo "--enable-libass" >> ffmpeg_options
# echo "--enable-libdav1d" >> ffmpeg_options
# echo "--enable-libfreetype" >> ffmpeg_options
# echo "--enable-libmp3lame" >> ffmpeg_options
# echo "--enable-libopus" >> ffmpeg_options
# echo "--enable-libtheora" >> ffmpeg_options
# echo "--enable-libvorbis" >> ffmpeg_options
# echo "--enable-libvpx" >> ffmpeg_options
# echo "--enable-libx264" >> ffmpeg_options
# echo "--enable-libx265" >> ffmpeg_options
# echo "--enable-libwebp" >> ffmpeg_options
# # echo "--enable-vulkan" >> ffmpeg_options
# ./rebuild -j32
#
# cd /app
# else
# echo "MPV build already exists."
# fi
if [ ! -d /app/AppDir ]; then
echo "Extracting Python AppImage..."
/app/python3.13.5-cp313-cp313-manylinux2014_x86_64.AppImage --appimage-extract
mv /app/squashfs-root /app/AppDir
echo "Copy FFmpeg and MPV libraries..."
cp /usr/bin/ffmpeg /app/AppDir/usr/bin/ffmpeg
cp /usr/lib/libmpv.so.2.5.0 /app/AppDir/usr/lib/libmpv.so.2.5.0
cp /usr/bin/ld /app/AppDir/usr/bin/ld
ln -s libmpv.so.2.5.0 /app/AppDir/usr/lib/libmpv.so.2
ln -s libmpv.so.2 /app/AppDir/usr/lib/libmpv.so
echo "Copy xcb libraries..."
# qt6 needs them
cp /usr/lib/x86_64-linux-gnu/libxcb-ewmh* /app/AppDir/usr/lib/
cp /usr/lib/x86_64-linux-gnu/libxcb-icccm* /app/AppDir/usr/lib/
cp /usr/lib/x86_64-linux-gnu/libxcb-keysyms* /app/AppDir/usr/lib/
cp /usr/lib/x86_64-linux-gnu/libxcb* /app/AppDir/usr/lib/
/app/AppDir/opt/python3.13/bin/python3.13 -m pip install syng[client] --no-binary pillow --target=/app/AppDir/$PKGDIR
echo "Modifying AppDir structure..."
rm /app/AppDir/python3.13.5.desktop /app/AppDir/python.png /app/AppDir/usr/share/applications/python3.13.5.desktop
cat <<EOF > /app/AppDir/usr/share/applications/rocks.syng.Syng.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Syng
Comment=An all-in-one karaoke player
Exec=syng
Icon=rocks.syng.Syng
Categories=AudioVideo
EOF
cp /app/syng/resources/icons/hicolor/256x256/apps/rocks.syng.Syng.png /app/AppDir/usr/share/icons/hicolor/256x256/apps/
cp /app/bin/syng /app/AppDir/usr/bin/syng
cp /app/bin/yt-dlp /app/AppDir/usr/bin/yt-dlp
cp /usr/bin/ld /app/AppDir/usr/bin/ld
chmod +x /app/AppDir/usr/bin/syng
rm /app/AppDir/AppRun
cp /app/syng/resources/flatpak/rocks.syng.Syng.yaml /app/AppDir/usr/share/metainfo/rocks.syng.Syng.appdata.xml
else
echo "Python AppImage already extracted."
fi
echo "Patching mpv.py..."
patch -p0 < libmpv.patch
echo "Removing unnecessary files..."
for plugin in assetimporters generic help "imageformats/libqpdf.so" networkinformation position qmllint renderers sceneparsers sensors tls wayland-graphics-integration-client sqldrivers webview egldeviceintegrations geometryloaders multimedia platforminputcontexts printsupport qmlls renderplugins scxmldatamodel texttospeech wayland-decoration-client wayland-shell-integration; do
rm -rf /app/AppDir/usr/lib/python3.13/site-packages/PyQt6/Qt6/plugins/$plugin
done
for lib in libavcodec.so.61 libQt6PdfQuick.so.6 libQt6Quick3DIblBaker.so.6 libQt6QuickControls2Material.so.6 libQt6QuickTimeline.so.6 libQt6Test.so.6 \
libavformat.so.61 libQt6Help.so.6 libQt6Pdf.so.6 libQt6Quick3DParticles.so.6 libQt6QuickControls2MaterialStyleImpl.so.6 libQt6QuickVectorImageGenerator.so.6 libQt6TextToSpeech.so.6 \
libavutil.so.59 libQt6LabsAnimation.so.6 libQt6PdfWidgets.so.6 libQt6Quick3DPhysicsHelpers.so.6 libQt6QuickControls2.so.6 libQt6QuickVectorImage.so.6 \
libQt6LabsFolderListModel.so.6 libQt6PositioningQuick.so.6 libQt6Quick3DPhysics.so.6 libQt6QuickControls2Universal.so.6 libQt6QuickWidgets.so.6 libQt6WaylandEglClientHwIntegration.so.6 \
libQt6LabsPlatform.so.6 libQt6Positioning.so.6 libQt6Quick3DRuntimeRender.so.6 libQt6QuickControls2UniversalStyleImpl.so.6 libQt6RemoteObjectsQml.so.6 libQt6WebChannelQuick.so.6 \
libQt6LabsQmlModels.so.6 libQt6PrintSupport.so.6 libQt6Quick3D.so.6 libQt6QuickDialogs2QuickImpl.so.6 libQt6RemoteObjects.so.6 libQt6WebChannel.so.6 \
libQt6Bluetooth.so.6 libQt6LabsSettings.so.6 libQt6QmlMeta.so.6 libQt6Quick3DSpatialAudio.so.6 libQt6QuickDialogs2.so.6 libQt6SensorsQuick.so.6 libQt6WebSockets.so.6 \
libQt6Concurrent.so.6 libQt6LabsSharedImage.so.6 libQt6QmlModels.so.6 libQt6Quick3DUtils.so.6 libQt6QuickDialogs2Utils.so.6 libQt6Sensors.so.6 \
libQt6LabsWavefrontMesh.so.6 libQt6Qml.so.6 libQt6Quick3DXr.so.6 libQt6QuickEffects.so.6 libQt6SerialPort.so.6 libQt6WlShellIntegration.so.6 \
libQt6MultimediaQuick.so.6 libQt6QmlWorkerScript.so.6 libQt6QuickControls2Basic.so.6 libQt6QuickLayouts.so.6 libQt6ShaderTools.so.6 \
libQt6Designer.so.6 libQt6Multimedia.so.6 libQt6Quick3DAssetImport.so.6 libQt6QuickControls2BasicStyleImpl.so.6 libQt6QuickParticles.so.6 libQt6SpatialAudio.so.6 \
libQt6FFmpegStub-crypto.so.3 libQt6MultimediaWidgets.so.6 libQt6Quick3DAssetUtils.so.6 libQt6QuickControls2Fusion.so.6 libQt6QuickShapes.so.6 libQt6Sql.so.6 libswresample.so.5 \
libQt6FFmpegStub-ssl.so.3 libQt6Network.so.6 libQt6Quick3DEffects.so.6 libQt6QuickControls2FusionStyleImpl.so.6 libQt6Quick.so.6 libQt6StateMachineQml.so.6 libswscale.so.8 \
libQt6FFmpegStub-va-drm.so.2 libQt6Nfc.so.6 libQt6Quick3DGlslParser.so.6 libQt6QuickControls2Imagine.so.6 libQt6QuickTemplates2.so.6 libQt6StateMachine.so.6 \
libQt6FFmpegStub-va.so.2 libQt6Quick3DHelpersImpl.so.6 libQt6QuickControls2ImagineStyleImpl.so.6 libQt6QuickTest.so.6 \
libQt6FFmpegStub-va-x11.so.2 libQt6OpenGLWidgets.so.6 libQt6Quick3DHelpers.so.6 libQt6QuickControls2Impl.so.6 libQt6QuickTimelineBlendTrees.so.6 libQt6WaylandClient.so.6; do
echo "Removing Qt library: $lib"
rm /app/AppDir/usr/lib/python3.13/site-packages/PyQt6/Qt6/lib/$lib
done
for platform in libqeglfs.so libqlinuxfb.so libqminimalegl.so libqminimal.so libqoffscreen.so libqvkkhrdisplay.so libqvnc.so libqwayland-egl.so libqwayland-generic.so; do
echo "Removing Qt platform plugin: $platform"
rm /app/AppDir/usr/lib/python3.13/site-packages/PyQt6/Qt6/plugins/platforms/$platform
done
for lib in QtHelp.abi3.so QtNfc.abi3.so QtPdfWidgets.abi3.so QtQuick3D.abi3.so QtSensors.abi3.so QtStateMachine.abi3.so QtTextToSpeech.abi3.so \
QtMultimedia.abi3.so QtPositioning.abi3.so QtQuick.abi3.so QtSerialPort.abi3.so QtWebChannel.abi3.so \
QtDesigner.abi3.so QtMultimediaWidgets.abi3.so QtOpenGLWidgets.abi3.so QtPrintSupport.abi3.so QtQuickWidgets.abi3.so QtSpatialAudio.abi3.so QtWebSockets.abi3.so \
QtBluetooth.abi3.so QtNetwork.abi3.so QtPdf.abi3.so QtQml.abi3.so QtRemoteObjects.abi3.so QtSql.abi3.so QtTest.abi3.so; do
echo "Removing PyQt6 library: $lib"
rm /app/AppDir/usr/lib/python3.13/site-packages/PyQt6/$lib
done
# rm /app/AppDir/usr/lib/python3.13/site-packages/PyQt6/Qt6/translations/*
echo "Removing unnecessary QML files..."
rm -rf /app/AppDir/usr/lib/python3.13/site-packages/PyQt6/Qt6/qml/
# ln -s python3.13/site-packages/PyQt6/Qt6/ /app/AppDir/usr/lib/qt6
# for file in /app/AppDir/usr/lib/python3.13/site-packages/PyQt6/Qt6/lib/*; do
# echo "Linking $file to /app/AppDir/usr/lib/$(basename $file)"
# relative_path=$(realpath --relative-to=/app/AppDir/usr/lib/ $file)
# ln -s "$relative_path" /app/AppDir/usr/lib/$(basename $file)
# done
# echo "Creating AppImage..."
# /app/linuxdeploy-x86_64.AppImage --plugin qt --appdir /app/AppDir --output appimage
FROM python:3.12-bullseye
RUN useradd -m -d /app syng
USER syng
ENV PATH="/app/.local/bin:${PATH}"
WORKDIR /app/
RUN pip install --user alt-profanity-check
RUN pip install --user "syng[server]@git+https://github.com/christofsteel/syng.git"
RUN touch /app/keys.txt
EXPOSE 8080
ENTRYPOINT ["syng", "server", "-k", "/app/keys.txt"]
#!/usr/bin/env bash
./flatpak-pip-generator --build-only --yaml poetry-core
./flatpak-pip-generator --build-only --yaml expandvars
./flatpak-pip-generator --yaml cffi
AWK_PROG='
BEGIN { inside_block = 0 }
# Handle continuation lines
/\\$/ {
if (inside_block == 0 && $0 ~ package) { inside_block = 1 }
if (inside_block == 1) { next }
}
{
# End of a multi-line block
if (inside_block == 1 && !/\\$/) { inside_block = 0; next }
if (inside_block == 0 && $0 ~ package) { next }
print
}'
awk -v package="pyqt6" "$AWK_PROG" "../../requirements-client.txt" \
| awk -v package="brotlicffi" "$AWK_PROG" \
| awk -v package="colorama" "$AWK_PROG" \
> "requirements-client.txt"
./flatpak-pip-generator --requirements-file requirements-client.txt --ignore-pkg cffi==1.17.1 --yaml
This diff is collapsed.