Save song data from somafm.com as JSON
Project description
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.
* 30 * * * ~/path/to/somafm-songs && cd ~/somafm-songs && git commit -am $(date) && git push
Thanks to somafm and to all these 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:
- look for overlap/similarity of channels
- create your own rankings (per channel/artist/genre/year/…)
- match albums/artists with musicbrainz-identifiers to find more info
- train your own music recommendation tool for each channel, just for fun https://github.com/mattmurray/music_recommender
- you could check for each channel how many artists/albums/songs are in your
beets
library (maybe adjust for popularity?!)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for soma_songs-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bfdc9980dddcc1ac0012d47245936eba4abbe61439d8d3aecc2ea5bdb322e94 |
|
MD5 | 4c5ac3cfad98d443ba96bbcb6cd38b99 |
|
BLAKE2b-256 | 53f0cacfc1b22c1dedd5dcf81b898c1ad4ecdb33ec1462efffdfcbc7e88ed262 |