spotify library for scripting. Additional classes for playlist management and listening tracking
Go to file
2020-02-22 18:28:23 +00:00
spotframework improving logging, added null description catching 2020-01-26 14:08:07 +00:00
.gitignore added listener, changed env var names 2019-12-23 12:16:03 +00:00
alarm.py added listener, changed env var names 2019-12-23 12:16:03 +00:00
backup.py added listener, changed env var names 2019-12-23 12:16:03 +00:00
generate_playlists.py added listener, changed env var names 2019-12-23 12:16:03 +00:00
getaccesstoken.py added listener, changed env var names 2019-12-23 12:16:03 +00:00
listener.py split listener into own object 2019-12-24 10:25:32 +00:00
README.md update README 2020-02-22 18:28:23 +00:00
requirements.txt added listener, changed env var names 2019-12-23 12:16:03 +00:00
sort_playlist.py added listener, changed env var names 2019-12-23 12:16:03 +00:00

spotframework

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