{"id":17658628,"url":"https://github.com/ruuda/hitsgame","last_synced_at":"2025-05-07T10:16:10.000Z","repository":{"id":214530029,"uuid":"736739251","full_name":"ruuda/hitsgame","owner":"ruuda","description":"Create your own version of the game Hitster","archived":false,"fork":false,"pushed_at":"2024-10-15T19:06:12.000Z","size":234,"stargazers_count":37,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T21:23:16.797Z","etag":null,"topics":["game","hitster","music"],"latest_commit_sha":null,"homepage":"https://codeberg.org/ruuda/hitsgame","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruuda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2023-12-28T18:27:20.000Z","updated_at":"2025-04-19T19:23:13.000Z","dependencies_parsed_at":"2023-12-28T19:36:03.859Z","dependency_job_id":"0f8d6b33-0482-4d15-873d-bfa7c60fb690","html_url":"https://github.com/ruuda/hitsgame","commit_stats":null,"previous_names":["ruuda/hitsgame"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fhitsgame","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fhitsgame/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fhitsgame/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruuda%2Fhitsgame/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruuda","download_url":"https://codeload.github.com/ruuda/hitsgame/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252856562,"owners_count":21814858,"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":["game","hitster","music"],"created_at":"2024-10-23T15:27:37.644Z","updated_at":"2025-05-07T10:16:09.973Z","avatar_url":"https://github.com/ruuda.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hitsgame\n\nBuild your own version of the game [Hitster][hitster]. The resulting cards\ncontain a QR code that point to an audio file on a webserver, no Spotify is\nneeded to play. The program generates a pdf with cards like this:\n\n![Two sides of an example output page](example.png)\n\n## Ingredients\n\nIngredients:\n\n * A collection of properly tagged flac files. These files must have the\n   `TITLE`, `ARTIST`, and `ORIGINALDATE` or `DATE` tags set.\n * A webserver that can serve static files.\n * Sheets of A4 paper, preferably 180 g/m².\n * Tokens from the original Hitster game, or a suitable replacement,\n   e.g. poker chips.\n\nHardware tools needed:\n\n * A printer.\n * Preferably a paper cutter, alternatively scissors.\n\nSoftware tools needed:\n\n * Either [Nix 2.17.0][nix217], which can provide all the needed packages,\n   run with `nix develop --command ./mkhitsgame.py`.\n * Or install manually:\n   * Python ≥ 3.11 with `qrcode==7.4.2` package.\n   * ffmpeg 5.1.3 or n6.1.\n   * rsvg-convert (from librsvg) 2.55.1 or 2.57.1.\n\n## Preparation\n\n 1. Create a directory named `tracks` and put the tracks in there that you want\n    to include.\n 2. Create a file named `mkhitsgame.toml` next to the `tracks` directory, and\n    add the configuration as shown in the next section.\n 3. Run `mkhitsgame.py`. It will print statistics about the track distribution\n    over years and decades, so you can tweak the track selection to balance out\n    the game.\n 4. You now have two new directories: `build` and `out`. `out` contains the\n    tracks, compressed and anonymized. These files contain no metadata, and the\n    file names are long enough to be virtually unguessable, so they are safe to\n    serve from a public webserver without additional authentication. `build`\n    contains the pdf with the cards, as well as intermediate svg files.\n 5. Upload the contents of `out` to your webserver.\n 6. Print `build/cards.pdf` and cut out the cards.\n\n## Configuration\n\nThe `mkhitsgame.toml` file follows the following format:\n\n```toml\n# The url prefix that your webserver will serve the track mp4s from.\nurl_prefix = \"https://example.com/\"\n\n# Font to use on the cards.\nfont = \"Cantarell\"\n\n# Whether to draw a grid around the cards. If you want to inspect the pdf on\n# your computer, or if you are cutting the cards with scissors, you probably\n# want to enable this. If you are cutting with a paper cutter, you should\n# disable the grid, because if you don't cut *exactly* on the line you'll end\n# up with ugly lines on the sides of the cards.\ngrid = true\n\n# Whether to include crop marks at the sides of the page. If you are cutting\n# with a paper cutter, you should enable this to know where to cut.\ncrop_marks = false\n```\n\nFor the webserver, you need to configure it to serve the `.mp4` files with\n`audio/mp4` MIME type. For Nginx, you can do this using the following snippet:\n\n```nginx\ntypes {\n  audio/mp4 mp4;\n}\n```\n\n## How to play\n\nRefer [the original game rules][howplay] for how to play the game itself. You\ndo not need to connect Spotify. Scanning a QR code will open the track in your\nbrowser. Most browsers will auto-play the track.\n\n## License\n\nHitsgame is free software. It is licensed under the\n[GNU General Public License][gplv3], version 3.\n\n[gplv3]:   https://www.gnu.org/licenses/gpl-3.0.html\n[hitster]: https://boardgamegeek.com/boardgame/318243/hitster\n[howplay]: https://hitstergame.com/en-us/how-to-play-premium/\n[nix217]:  https://nixos.org/download#nix-more\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruuda%2Fhitsgame","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruuda%2Fhitsgame","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruuda%2Fhitsgame/lists"}