Skip to content
Scrapes reddits for music, creates a spotify playlist.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
listentoeverything
tests
.editorconfig
.gitignore
.travis.yml
AUTHORS.rst
CONTRIBUTING.rst
HISTORY.rst
LICENSE
MANIFEST.in
Makefile
README.rst
example_listen.yml
requirements.txt
requirements_dev.txt
setup.cfg
setup.py
tox.ini

README.rst

listentoeverything

https://travis-ci.org/happykhan/listentoeverything.svg?branch=master Pypi Updates

I’m always looking for new music. I found an applet on IFTTT, which didn’t work. It couldn’t handle posts other than “Artist - Title”. So I wrote my own and put it up on Github. Here are some specifics:

  • Reddit is social media site where users post material, which is voted for or against by others. The higher the vote, the higher the prominence of the material
  • There are many specific channels (subreddits) for different Music genres; We can use these lists to make curated playlists.
  • Playlist are based on either the ‘top’ posts or ‘hot’ posts lists e.g. /r/music top of the week
  • I use Spotipy and PRAW for talking to Spotify and Reddit.
  • The program cleans the list up with custom parser.
  • Each playlist are limited to 100 songs. As new songs are added, the oldest ones are removed.
  • I update the playlists every day.

See the results at https://happykhan.com/playlists/

Installation and Usage

via pip:

pip install listentoeverything

via source:

git clone git@github.com:happykhan/listentoeverything.git
cd listentoeverything
pip install -r requirements.txt

Then run:

python listentoeverything/cli.py --config_file <config_file.yml>

Configuration

You will need to sign up to the Spotify API and reddit API.

They will issue you with various authorisation keys which you need to specify in the config file (default location is ~/.listen).

reddit:
   client_id: <Your key>
   client_secret: <Your key>
   user_agent: listenonspotify
   username: <Your reddit username>
   password: <Your pass>
spotify:
   username: <Your spotify username>
   scope: playlist-modify-public
   client_id: <Your key>
   client_secret: <Your key>
   redirect_uri: http://localhost/

Spotify login

Spotify requires users to authorise 3rd party programs through the website. Normally the first time you run this script it will open a web browser and redirect you to spotify, where a user would need to click authorise. Then it will come back to a redirect URL. As this isn't a website, I just send it back to localhost.

docs/spotify_login.png

The script will want to know what the URL was, including the code. So copy this from the address bar and paste in the prompt.

docs/spotify_token.png

The token will be cached for a while so you do not need to do this every time.

License

listentoeverything is free software under the GNU General Public License v3.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

You can’t perform that action at this time.