spotify library for scripting. Additional classes for playlist management and listening tracking
Go to file
2021-02-06 00:38:16 +00:00
.github/workflows added badge 2021-02-06 00:38:16 +00:00
.vscode adding to tests, first github workflow 2021-02-06 00:33:49 +00:00
spotframework adding to tests, first github workflow 2021-02-06 00:33:49 +00:00
tests adding to tests, first github workflow 2021-02-06 00:33:49 +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 unittesting, removed key_code from audio features, batch audio features for retrieval 2021-02-05 21:44:59 +00:00
README.md added badge 2021-02-06 00:38:16 +00: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 Music Tools

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",
        ...
      ]
    },
    ...