spotify library for scripting. Additional classes for playlist management and listening tracking
Go to file
2019-08-04 02:02:30 +01:00
spotframework handling for playlist references 2019-08-04 02:02:30 +01:00
.gcloudignore integrated cloud function, removed implied environment variables 2019-08-02 12:02:24 +01:00
.gitignore moved request to separate message, added logging 2019-05-14 12:39:17 +01:00
alarm.py integrated cloud function, removed implied environment variables 2019-08-02 12:02:24 +01:00
backup.py integrated cloud function, removed implied environment variables 2019-08-02 12:02:24 +01:00
generateplaylists.py integrated cloud function, removed implied environment variables 2019-08-02 12:02:24 +01:00
getaccesstoken.py integrated cloud function, removed implied environment variables 2019-08-02 12:02:24 +01:00
google_test.py handling for playlist references 2019-08-04 02:02:30 +01:00
main.py integrated cloud function, removed implied environment variables 2019-08-02 12:02:24 +01:00
README.md Create README.md 2019-05-26 20:28:54 +00:00
requirements.txt integrated cloud function, removed implied environment variables 2019-08-02 12:02:24 +01:00

pyfmframework

scripting framework for interacting with the spotify web api

  • alarm

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 owned playlists and backup each to a separate csv file at the specified path

  • generate playlists

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