Mirror of sanic. Find the original here: https://gitlab.com/XenGi/sanic https://sanic.club.berlin.ccc.de
Go to file
2024-08-09 10:00:21 +02:00
aur small improvements; aur package 2024-04-06 18:57:43 +02:00
static finish work on sse 2024-08-09 10:00:21 +02:00
.editorconfig foo 2023-10-24 18:17:36 +02:00
.gitignore add remove track from queue 2024-04-06 15:28:00 +02:00
.gitlab-ci.yml switch from websockets to sse 2024-08-07 23:35:16 +02:00
architecture.drawio.svg Update architecture.drawio.svg 2024-07-17 10:46:45 +00:00
config.ini switch from websockets to sse 2024-08-07 23:35:16 +02:00
Dockerfile quadlet added 2024-08-08 00:05:49 +02:00
favicon.xcf add mpd status messages 2023-12-10 21:33:54 +01:00
flake.lock switch from websockets to sse 2024-08-07 23:35:16 +02:00
flake.nix 🔥 2024-07-15 20:00:18 +02:00
go.mod switch from websockets to sse 2024-08-07 23:35:16 +02:00
go.sum switch from websockets to sse 2024-08-07 23:35:16 +02:00
gomod2nix.toml switch from websockets to sse 2024-08-07 23:35:16 +02:00
LICENSE Initial commit 2023-10-16 17:42:09 +02:00
Makefile switch from websockets to sse 2024-08-07 23:35:16 +02:00
mpd.conf add mpd config 2023-10-18 00:40:17 +02:00
mpd.go add docstrings to go code 2024-07-15 10:49:26 +02:00
NOTES.md add search db feature 2024-04-29 00:14:39 +02:00
README.md fix architecture 2024-08-08 10:07:20 +02:00
sanic.container add caps to container and nix 2024-08-08 00:50:33 +02:00
server.go switch from websockets to sse 2024-08-07 23:35:16 +02:00
services.nix add caps to container and nix 2024-08-08 00:50:33 +02:00
sse.go finish work on sse 2024-08-09 10:00:21 +02:00

maintained Gitea Release

🦔 sanic

chaos music control inspired by relaxx player

Features

  • mpd web gui
    • search music
    • organize playlists
    • control current playback queue
  • no authentication required to control music playback
  • add playlists from internet radios (*.m3u, *.pls)
  • add music from other sources like youtube (youtube-dl)

👩‍💻 Installation

❄️ NixOS (flakes)

Example flake setup (untested):

{
  description = "Example Flake to install sanic on your host";
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    sanic = {
      url = "gitlab.com/XenGi/sanic";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
  outputs = { self, nixpkgs, sanic }:
  let
    system = "x86_64-linux";
    pkgs = import nixpkgs { inherit system; };
  in
  {
    nixosConfigurations."myhostname".nixpkgs.lib.nixosSystem = {
      inherit system;
      modules = [
        { environment.systemPackages = [ sanic.packages.${system}.default ]; }
      ];
    };
  };
}

🇦 Arch Linux

Install from the AUR:

yay -S sanic

🐳 Container

Run as daemon:

podman run -d -v ./config.ini:/config.ini -p 8080:8080 registry.gitlab.com/XenGi/sanic:latest

🛠️ Development

sanic is developed using Nix, but you can also just use the usual Golang tooling.

Run local MPD instance for testing with make mpd.

Update go dependencies like this:

go get -u  # or `make update`
go mod tidy  # or `make tidy`
gomod2nix  # sync go deps with nix

❄️ w/ Nix

Enter development shell (also has mpc client installed for testing):

nix develop

Build sanic:

nix build

🐧 w/o Nix

Use these Make targets for your convenience:

  • run: Run project
  • build: Compile project
  • tidy: Add missing and remove unused modules
  • verify: Verify dependencies have expected content
  • format: Format go code
  • lint: Run linter (staticcheck)
  • test: Run tests
  • cert: Create https certificate for local testing

🐳 Container

You can run sanic in a container. Use these Make targets for convenience:

  • build-container: Build container image
  • run-container: Run container image

🗺️ Architecture

Architecture


Made with ❤️ and golang logo.