Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/radio4000/r5
https://github.com/radio4000/r5
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/radio4000/r5
- Owner: radio4000
- Created: 2024-11-03T15:40:45.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-29T10:32:44.000Z (about 1 month ago)
- Last Synced: 2024-11-29T11:24:32.806Z (about 1 month ago)
- Language: Svelte
- Homepage:
- Size: 9.22 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## THIS IS JUST A TEST
A web app with a local PostgreSQL database that can more or less sync with R4 and Matrix remotes.
## Ideas
- use a worker when using the db https://pglite.dev/examples/opfs
- maintain a local log of changes in a format that we can later apply to R4 supabase and/or Matrix## Developing
```bash
npm install
npm run dev
```## Building
To create a production version of your app:
```bash
npm run build
npm run preview
```## Credits
- https://pglite.dev/docs/api
- https://github.com/hellogreg/firava
- https://icons.obra.studio/
- [`sv`](https://github.com/sveltejs/cli) svelte cli## Import from v1
1. Open the Firebase console, find the realtime database and export all channels to `/static/radio4000-channels-export.json`
2. Serialize the v1 channels into v2 schema using this `jq` command. It currently filters out channels with less than 10 tracks.```bash
jq 'to_entries | .[0:99999] | map({firebase_id: .key, created_at: .value.created, updated_at: .value.updated, slug: .value.slug, name: .value.title, description: .value.body, image: .value.image, track_count: (.value.tracks | if . then length else 0 end), track_ids: (.value.tracks | if . then (to_entries | map(.key)) else [] end) }) | map(select(.track_count > 10)) ' static/radio4000-channels-export.json > static/r5-channels.json
```