spotify library for scripting. Additional classes for playlist management and listening tracking
Go to file
2022-11-09 08:54:56 +00:00
.github/workflows reduced ci os targets 2021-03-20 17:59:33 +00:00
.vscode added filter tests, tweaked CI 2021-02-07 15:27:31 +00:00
spotframework tightening deduplication, more type checking 2022-11-09 08:54:56 +00:00
tests tightening deduplication, more type checking 2022-11-09 08:54:56 +00:00
.gitignore migrated to poetry dependency management 2021-01-27 01:44:16 +00:00
alarm.py concise method names, some generator filters 2020-08-12 09:28:41 +01:00
backup.py concise method names, some generator filters 2020-08-12 09:28:41 +01:00
generate_playlists.py single network request function, network error exception, using requests session 2020-06-22 20:15:22 +01:00
getaccesstoken.py single network request function, network error exception, using requests session 2020-06-22 20:15:22 +01:00
listener.py single network request function, network error exception, using requests session 2020-06-22 20:15:22 +01:00
pyproject.toml udpating click to v8 2022-05-01 13:54:14 +01:00
README.md change music link to mixonomer 2022-08-07 19:33:38 +01:00
scripts.py unittesting, removed key_code from audio features, batch audio features for retrieval 2021-02-05 21:44:59 +00:00
sort_playlist.py single network request function, network error exception, using requests session 2020-06-22 20:15:22 +01:00

spotframework

Python Tests

scripting framework for interacting with the spotify web api

  • alarm

unused at this point, obsolete since I've replaced the functionality with an iOS shortcut

daily script which finds this months playlist (eg. 'may 19') and starts playback on a specified device id. if the monthly playlist can't be found a fallback spotify uri is used.

the script is conditionally run after receiving a response from a ping sent to a phone's ip so the scipt is only run when i'm at home. as phones won't typically respond to pings unless the screen is on multiple pings are sent and the script is scheduled for the same time as my mobile alarm

  • backup

Script to pull all user created playlists and backup each to a separate csv file at the specified path. Ran on a cron job.

  • generate playlists

obsolete since the creation of Mixonomer

My spotify playlists are quite granular for different sub genres, this script takes groups of playlists and genereates one "super-playlist". took inspiriation from my main use of Paul Lamere's smarter playlists.

By default playlists are reverse release date sorted, adding a shuffle tag to the config will do so.

Example config schema:

{
  "playlists": [
    {
      "name": "ELECTRONIC",
      "id": "{spotify playlist id}",
      "playlists": [
        "house",
        "garage",
        "jungle",
        ...
      ]
    },
    {
      "name": "METAL",
      "id": "{spotify playlist id}",
      "shuffle": true,
      "playlists": [
        "metal",
        "death metal",
        "black metal",
        ...
      ]
    },
    ...