Git Product home page Git Product logo

spaubot's Introduction

Spaubot

A bot for managing your Spotify playlists, via Matrix! (written in Python 3.7.3)

Setup

There are several steps you will need to take in order to work on development of this bot.

  1. Clone this repository

  2. (Optional Highly Recommended) Set-up a Python 3 virtual environment

    python3 -m venv [path]

  3. Install the dependencies:

    pip install matrix_client
    pip install pyyaml
    pip install git+https://github.com/plamere/spotipy.git
  4. Fill out the config.yaml file. The matrix information is specific to the matrix server you are using. The matrix room can be found by going to the advanced settings in the chat application (Riot). The spotify client id and secret can be obtained by registering an app at https://developer.spotify.com/

    matrix_host: "https://matrix.org"
    matrix_username: ""
    matrix_password: ""
    matrix_room: ""
    spot_username: ""
    spot_client_id: ""
    spot_client_secret: "" 
    spot_playlist_id: ""
    spot_redirect_uri: "http://localhost/"
    
  5. Run the spaubot.py script locally to obtain your authorization token. This will open up a web browser and direct you to login to Spotify. This must be done anytime you alter the access scope within the script--Otherwise a refresh token will be saved in a dotfile.

Usage

The original intended usage of this bot was to automate playlist additions suggested by a collaborative group. This eliminates the need to become a Spotify user in order to add song suggestions to a playlist.

The bot can be prompted by a series of chat commands.

  • !Add [ArtistName] - [SongName] => This will search the Spotify API for the best match and add this song to the current playlist. If no results are found, the bot will notify the chat.

  • !Current => Returns the song that is currently playing.

To Be Added

References

  1. https://github.com/matrix-org/matrix-python-sdk.git
  2. https://github.com/plamere/spotipy

spaubot's People

Contributors

thetanbull avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Forkers

mfrazie

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.