Skip to content

mrcmrcmrc/SpotifyPlaylistGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpotifyPlaylistGenerator

Generate playlists for your spotify account from command line interface:

  • similar tracks to any track (Uses last.fm's similarTracks method)
  • your loved tracks from last.fm
  • your top tracks (weekly, monthly,...) from last.fm
  • top tracks by an artist, country or tag.

Installation

  1. Download repository
  2. Install requirements
  3. Fill config.ini file with your API keys
  4. Use one of the functions below

Note: On the first run, open given url with a browser and complete authorization. Then paste redirected url to the console.

Usage

Get Similar Tracks

parameters:

  • artist (required):
  • track (required):
  • count (optional): default = 20
  • playlistName (optional): default = "Similar Tracks to {track}"

main.py getsimilar --artist="tame impala" --track="let it happen" --count=20

main.py getsimilar --artist="empire of the sun" --track="we are the people" --count=10 --playlistName="example playlist"

Get Top Tracks

parameters:

  • lastFMUserName (required):
  • period (optional): 7day | 1month | 3month | 6month | 12month | overall. default = 1month
  • count (optional): default = 20
  • playlistName (optional): default = "{lastFMUserName}'s Top Songs"

main.py usertoptracks lastFMUserName="yourUserName" --period=6month --count=30

Get Loved Tracks

parameters:

  • lastFMUserName (required):
  • playlistName (optional): default = "Loved Songs by {lastFMUserName}"

main.py userlovedtracks "yourUserName"

Get Top Albums

parameters:

  • lastFMUserName (required):
  • period (optional): 7day | 1month | 3month | 6month | 12month | overall. default = 1month
  • count (optional): default = 20
  • playlistName (optional): default = "{lastFMUserName}'s Top Songs"

main.py usertopalbums lastFMUserName="yourUserName" --period=6month --count=30

Get Top Tracks by Country

Get the most popular tracks on Last.fm last week by country

parameters:

  • country (required):
  • count (optional): default = 50
  • playlistName (optional): default = "{country} Top {count}"

main.py toptracksbycountry --country=turkey --count=100

Get Top Tracks by an Artist

parameters:

  • artist (required):
  • count (optional): default = 20
  • playlistName (optional): default = "The best {artist} songs"

main.py toptracksbyartist --artist="muse" --count="10"

Get Top Tracks by Tag

Get the top tracks tagged by this tag.

parameters:

  • tag (required):
  • count (optional): default = 25
  • playlistName (optional): default = "Top {tag} songs"

main.py toptracksbytag --tag="indie"

Get Chart Top Tracks

Get the top tracks chart

parameters:

  • count (optional): default = 25
  • playlistName (optional): default = "Top songs by Last.FM"

main.py toptrackschart

Show Top Tags

Use this to view the most popular tags on Last.fm

main.py showtoptags

Show Top Tags For A Track

Returns the top tags for given track

parameters:

  • artist (required)
  • track (required)

main.py showtoptagsfortrack --artist="therion" --track="birt of venus illegitima"

Show Top Artists by Country

It shows the most popular artists on Last.FM by country.

parameters:

  • country (required)

main.py showtopartistsbycountry --country="turkey"

...

...

Requirements: