soma-songs


Namesoma-songs JSON
Version 1.0.3 PyPI version JSON
download
home_page
SummarySave song data from somafm.com as JSON
upload_time2023-08-26 14:11:41
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT
keywords music scraper json somafm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Soma Songs

[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![PyPI: Python Version](https://img.shields.io/pypi/pyversions/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](https://somafm.com/defcon/songhistory.html) 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 `beets` library (maybe adjust for popularity?!)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "soma-songs",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "music scraper json somafm",
    "author": "",
    "author_email": "inktrap <inktrap@inktrap.org>",
    "download_url": "https://files.pythonhosted.org/packages/75/ce/060a2c9513ebf6d7fc345d507bdd89d66b272f2fd1682940ae62841f599e/soma_songs-1.0.3.tar.gz",
    "platform": null,
    "description": "# Soma Songs\n\n[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n![PyPI: Python Version](https://img.shields.io/pypi/pyversions/soma-songs)\n\nSave songs from <https://somafm.com> as JSON.\n\n\n## How does it work?\n\nMost somafm radiostations publish their tracklist. F.e. the police `scanner`-channel doesn't, while [def con radio](https://somafm.com/defcon/songhistory.html) does. But this overview only includes the last hour(s) and is not easily machine-readable.\n\nSo why not archive this for all the channels, all the time, clean up the data a little bit and make it more useable?\n\n- results are stored in a `tinydb`, well, two, actually, these are just JSON files\n- 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.\n- the somafm amazon links are not relative anymore and are also included to support <https://somafm.com>\n\n\n# How do you use/run this?\n\nWell, you don't have to :) because I already created inktrap/somafm-json which contains the output.\n\nBut you can, by:\n\n```\npipx install somafm-songs\n```\n\nIf 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.\n\nIf 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:\n\n```\n30 * * * * /path/to/soma-songs -q && cd ~/somafm-json && git commit -am $(date) && git push\n```\n\nThanks to somafm and to all the amazing DJ(ane)s :)\n\n\n# What can you do with this?\n\nYou get a nice archive of great radio channels, what else do you want? Well, you could:\n\n- train your own music recommendation tool for each channel, just for fun <https://github.com/mattmurray/music_recommender>\n- match albums/artists with musicbrainz-identifiers to find more info\n- look for overlap/similarity of channels\n- create your own rankings (per channel/artist/genre/year/\u2026)\n- you could check for each channel how many artists/albums/songs are in your `beets` library (maybe adjust for popularity?!)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Save song data from somafm.com as JSON",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/inktrap/soma-songs"
    },
    "split_keywords": [
        "music",
        "scraper",
        "json",
        "somafm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cce6e7efd4462751d034ab436e0d583b09e8c670bf117c83c065b274cd10cf31",
                "md5": "3c58d3a6abc06dfb182e9e937bef8c4b",
                "sha256": "ad3e9cb6287b7f57453428c6b14ad9742154d1def228f265d981ee36eb400157"
            },
            "downloads": -1,
            "filename": "soma_songs-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3c58d3a6abc06dfb182e9e937bef8c4b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7139,
            "upload_time": "2023-08-26T14:11:40",
            "upload_time_iso_8601": "2023-08-26T14:11:40.088208Z",
            "url": "https://files.pythonhosted.org/packages/cc/e6/e7efd4462751d034ab436e0d583b09e8c670bf117c83c065b274cd10cf31/soma_songs-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "75ce060a2c9513ebf6d7fc345d507bdd89d66b272f2fd1682940ae62841f599e",
                "md5": "012c6cdece51b9d5bae0c09a81cc1d83",
                "sha256": "8bebca51ef8becad3a223a08c79cedeaa5f52d26b04dbcadd72aeb7f4d57a45a"
            },
            "downloads": -1,
            "filename": "soma_songs-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "012c6cdece51b9d5bae0c09a81cc1d83",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6408,
            "upload_time": "2023-08-26T14:11:41",
            "upload_time_iso_8601": "2023-08-26T14:11:41.777025Z",
            "url": "https://files.pythonhosted.org/packages/75/ce/060a2c9513ebf6d7fc345d507bdd89d66b272f2fd1682940ae62841f599e/soma_songs-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-26 14:11:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "inktrap",
    "github_project": "soma-songs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "soma-songs"
}
        
Elapsed time: 0.77762s