Soma Songs
Save songs from https://somafm.com as JSON.
How does it work?
Most somafm radiostations publish their tracklist. F.e. the police scanner-channel doesn't, while def con radio does. But this overview only includes the last hour(s) and is not easily machine-readable.
So why not archive this for all the channels, all the time, clean up the data a little bit and make it more useable?
- results are stored in a
tinydb, well, two, actually, these are just JSON files - the timestamp also includes a date and has a timezone annotation. Btw., if you want to get into the details: https://somafm.com is based in San Francisco, the IANA time zone identifier is America/Los_Angeles. Currently they use PDT (Pacific Daylight Time), which is UTC-7. PST (Pacific Standard Time) would be UTC-8.
- the somafm amazon links are not relative anymore and are also included to support https://somafm.com
How do you use/run this?
Well, you don't have to :) because I already created inktrap/somafm-json which contains the output.
But you can, by:
pipx install somafm-songs
If you call somafm-songs you'll see that ~/somafm-json/meta.json contains the channel meta data and ~/somafm-json/music.json contains tracks/songs.
If you want to keep your results in git and push them to a remote you have to turn that directory into a git repository with a remote and create a cron-job which does (and is allowed to do) the git commit/push spiel. I haven't tested this yet, but a cronjob like this could work:
30 * * * * /path/to/soma-songs -q && cd ~/somafm-json && git commit -am $(date) && git push
Thanks to somafm and to all the amazing DJ(ane)s :)
What can you do with this?
You get a nice archive of great radio channels, what else do you want? Well, you could:
- train your own music recommendation tool for each channel, just for fun https://github.com/mattmurray/music_recommender
- match albums/artists with musicbrainz-identifiers to find more info
- look for overlap/similarity of channels
- create your own rankings (per channel/artist/genre/year/…)
- you could check for each channel how many artists/albums/songs are in your
beetslibrary (maybe adjust for popularity?!)
Metadata
Release files for soma-songs 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| soma_songs-1.0.3.tar.gz | 6.4 kB | Without provenance | Details for soma_songs-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| soma_songs-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for soma_songs-1.0.3-py3-none-any.whl |
Total release size: 13.5 kB
Release files / soma_songs-1.0.3.tar.gz
| Download URL | soma_songs-1.0.3.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8bebca51ef8becad3a223a08c79cedeaa5f52d26b04dbcadd72aeb7f4d57a45a
|
|
BLAKE2b-256 checksum How to use checksums |
75ce060a2c9513ebf6d7fc345d507bdd89d66b272f2fd1682940ae62841f599e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.8.2 CPython/3.11.3
|
Release files / soma_songs-1.0.3-py3-none-any.whl
| Download URL | soma_songs-1.0.3-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad3e9cb6287b7f57453428c6b14ad9742154d1def228f265d981ee36eb400157
|
|
BLAKE2b-256 checksum How to use checksums |
cce6e7efd4462751d034ab436e0d583b09e8c670bf117c83c065b274cd10cf31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.8.2 CPython/3.11.3
|
Security for soma-songs 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.