Skip to content
/ gigpy Public

Coverts upcoming gigs into a playlist for various Australian cities.

License

Notifications You must be signed in to change notification settings

bgriffen/gigpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gigpy

Click on any of the following:

About

This code updates playlists in Spotify based on upcoming music found in your local area. The data source is Bands In Town. It should capture most bands, but maybe not all. If there is ambiguity over a band name for instance, it may mistakenly put the wrong band in the playlist -- sorry about that.

It should be rare and so the overwhelming majority are bands playing LIVE near you soon.

Enjoy =)

Installation

Clone the repository:

git clone https://github.com/bgriffen/gigpy.git

Change directory into the cloned repository:

cd gigpy
pip install -r requirements.txt

Also set these environment variables in your ~/.bashrc or whichever you're using. You can get these from Spotify but you also need to click "Edit Settings" for your app and add the redirect uri below:

export SPOTIFY_CLIENT_ID='SPOTIPY_CLIENT_ID'
export SPOTIFY_CLIENT_SECRET='SPOTIPY_CLIENT_SECRET'
export SPOTIFY_REDIRECT_URI='http://localhost:8899/callback'
export SPOTIFY_CLIENT_PLAYLISTID='SPOTIFY_CLIENT_PLAYLISTID'
export SPOTIFY_USER_ID='SPOTIFY_USER_ID'

Getting Started

You then need to ensure your cities are in the cities.yaml file. You can obtain the city ID by going to bandsintown.com and checking the URL for the the city_id=2158177 tag.

# cities.yaml
cities:
  - name: Brisbane
    id: 2174003                      # get ID from bandsintown.com URL
    playlist: "3PjTtXAvsLe3C59Uabcd" # change to your own spotify playlist

Then you can run:

import gigpy
gigpy.generate_playlists_for_city("Brisbane")

When you first run, you will be asked to login to provide the scope. Once you login, your program will progress.

Tested on Mac OS X 13.2.1 Ventura with Python 3.8. This should work on other platforms, however.

License

This project is licensed under the MIT License. See LICENSE for details.

About

Coverts upcoming gigs into a playlist for various Australian cities.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages