Giter VIP home page Giter VIP logo

raven's Introduction

Raven CircleCI

CLI tools to manage your Spotify library.

Requires:

  • Python >3.x
  • spotipy
  • python-dotenv
  • fire
  • requests
  • tqdm

Installation:

  1. Install Python 3.4.3

  2. Install Git through your terminal

    Mac OS X: brew install git

    Fedora: sudo dnf install git-all

    Debian: sudo apt-get install git-all

  3. Clone this repository with git clone https://github.com/bhavika/raven.git

  4. Navigate into the raven directory with cd raven

  5. Install the required libraries: pip install -r requirements.txt

  6. Create an app on the Spotify Developer Console.

    Click on Create an App and fill in the following:

    Application Name: raven

    Redirect URIs: http://locahost/

    Click on Save.

    Copy the Client ID and Client Secret.

  7. Navigate into the raven directory where you cloned the repository.

  8. Create a file and name it .env, refer to the sample.env for the format. Populate the SPOTIPY_REDIRECT_URI, USERNAME, SPOTIPY_CLIENT_ID and SPOTIPY_CLIENT_SECRET from step 1.

    Save the .env file.

Run:

The first time you run any of these commands, you'll be taken to spotify.com to authenticate Raven and get an access token. Once you approve the permissions, copy the new URL from your browser window (should be of the form localhost?code=) and paste it into the terminal where you ran the raven command after the prompt & hit Enter.

Every time the access token expires, you'll be required to reauthenticate Raven with Spotify.

Open a terminal in the raven directory and try the following.

Follow all artists from a CSV file (look at format.csv)

python main.py follow '/path/to/your/CSV/file'

Unfollow all artists from a CSV file (look at format.csv)

python main.py unfollow '/path/to/your/csv/file'

Add a bunch of songs to a playlist from a CSV file (look at format.csv)

python main.py add-tracks playlist '/path/to/your/csv/file'

Add a bunch of songs to a playlist from cached search results (track_ids)

[Note: When you're specifying source as cache, the filename argument is not needed.]

python main.py add-tracks playlist --source=cache

Add a bunch of songs to your library from a CSV file (look at format.csv)

python main.py add-tracks library '/path/to/your/csv/file'

Add a bunch of songs to to your library from the cached search results (track_ids)

python main.py add-tracks library --source=cache

Features:

  • Follow all artists from a CSV file.
  • Unfollow all artists from a CSV file.
  • Add a list of songs (CSV) to a new playlist or library.

raven's People

Contributors

bhavika avatar

Stargazers

 avatar  avatar

Watchers

 avatar

raven's Issues

Progress bars

Show progress during

  • Artist/track search is on.
  • Following artists 50 at a time.
  • Adding songs n at a time.

Use tqdm.

Refresh access token

Handle cases where access token expires by refreshing token and continue processing from the position where artist/track was interrupted.

Add description to playlist

Post new playlist creation request to Spotify with a 'description' that is just a plug for Raven.
Currently unsupported because Spotipy's playlist creation method doesn't send a description with the request payload.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.