{"id":15718663,"url":"https://github.com/ali-raheem/jukebox-rust","last_synced_at":"2026-01-07T16:09:31.254Z","repository":{"id":138314491,"uuid":"44062116","full_name":"ali-raheem/jukebox-rust","owner":"ali-raheem","description":"🎹 Implementation of my jukebox application in rust.","archived":false,"fork":false,"pushed_at":"2022-01-20T13:43:59.000Z","size":3028,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T11:50:13.598Z","etag":null,"topics":["database","jukebox","rfid-tags"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ali-raheem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-11T17:27:50.000Z","updated_at":"2023-03-05T01:11:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"d3215e7f-003d-4117-8518-b24a37bf4f04","html_url":"https://github.com/ali-raheem/jukebox-rust","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-raheem%2Fjukebox-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-raheem%2Fjukebox-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-raheem%2Fjukebox-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ali-raheem%2Fjukebox-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ali-raheem","download_url":"https://codeload.github.com/ali-raheem/jukebox-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247615481,"owners_count":20967182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","jukebox","rfid-tags"],"created_at":"2024-10-03T21:53:38.395Z","updated_at":"2026-01-07T16:09:31.249Z","avatar_url":"https://github.com/ali-raheem.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jukebox-rust\n\nRust application that links RFID tags to scripts - tap a card to play an album, open a picture, or trigger any action.\n\nGPLv2 | v0.3.0\n\n## Usage\n\n```\njukebox [options]\n\nOptions:\n    -h, --help          Print this usage information.\n    -n, --new           Start new database.\n    -a, --add           Add mode, add new action triggers to database.\n    -f, --database PATH Database file (default: ./jukebox.db)\n    -p, --port PATH     Serial port (default: /dev/ttyACM0)\n    -s, --split START:LENGTH\n                        Key trimming parameters (default: 3:10)\n    -d, --scripts PATH  Script directory (default: /etc/jukebox.d)\n```\n\n## Building\n\nRequires sqlite3 development libraries:\n```bash\n# Fedora/RHEL\nsudo dnf install libsqlite3x-devel\n\n# Debian/Ubuntu\nsudo apt install libsqlite3-dev\n```\n\nBuild:\n```bash\ncargo build --release\n```\n\n## Setup\n\n### 1. Create script directory\n\n```bash\nsudo mkdir -p /etc/jukebox.d\nsudo chown root:root /etc/jukebox.d\nsudo chmod 755 /etc/jukebox.d\n```\n\n### 2. Add scripts\n\nCreate executable scripts for each action. Example:\n\n```bash\n# /etc/jukebox.d/play_jazz\n#!/bin/bash\nmpv /music/jazz/\n```\n\nMake scripts executable:\n```bash\nsudo chmod +x /etc/jukebox.d/*\n```\n\n### 3. Create database and register cards\n\n```bash\njukebox -n -a\n```\n\nThis creates a new database and enters add mode. The available scripts are listed. Tap a card, then enter the script name to associate with it. Repeat for each card. Press Ctrl+C when done.\n\n### 4. Run in production\n\n```bash\njukebox -f /etc/jukebox.db\n```\n\n## Security\n\nThis version uses a **script directory approach** instead of arbitrary shell commands:\n\n- Only scripts in the designated directory (`/etc/jukebox.d`) can be executed\n- Script names cannot contain path separators (no `../` attacks)\n- Scripts are executed directly (no shell interpretation)\n\nRecommendations:\n- **Do not run jukebox as root** - spawned scripts inherit privileges\n- Make scripts root-owned: `sudo chown root:root /etc/jukebox.d/*`\n- Make database root-owned but world-readable\n- Add your user to the `dialout` group for serial device access:\n  ```bash\n  sudo usermod -a -G dialout $USER\n  ```\n\n## Migrating from 0.2.x\n\nVersion 0.3.0 introduces breaking changes:\n\n1. Commands are no longer stored in the database - only script names\n2. You must create scripts in `/etc/jukebox.d/` (or custom `-d` path)\n3. Re-register your cards with `jukebox -a` using script names\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali-raheem%2Fjukebox-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fali-raheem%2Fjukebox-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fali-raheem%2Fjukebox-rust/lists"}