All Projects → AndreasVolkmann → spotify-reddit

AndreasVolkmann / spotify-reddit

Licence: other
Spotify playlists backed by subreddits

Programming Languages

kotlin
9241 projects
FreeMarker
481 projects

Projects that are alternatives of or similar to spotify-reddit

Oauth
🔗 OAuth 2.0 implementation for various providers in one place.
Stars: ✭ 336 (+2300%)
Mutual labels:  spotify, reddit
Clone Wars
100+ open-source clones of popular sites like Airbnb, Amazon, Instagram, Netflix, Tiktok, Spotify, Whatsapp, Youtube etc. See source code, demo links, tech stack, github stars.
Stars: ✭ 12,604 (+89928.57%)
Mutual labels:  spotify, reddit
fresh script
Find Spotify tracks posted to the HipHopHeads subreddit and add them to a Spotify playlist.
Stars: ✭ 69 (+392.86%)
Mutual labels:  spotify, reddit
FCommunity
multi Checkers (Hma/Hulu/Spotify/Call of duty/Instagram/smtp2go/VyprVpn) in One Tool Named FCommunity
Stars: ✭ 26 (+85.71%)
Mutual labels:  spotify
guilyx
Dynamic Profile with github statistics, coding info (time and languages) with WakaTime and music status with the spotify API, leave a ⭐ if you like it
Stars: ✭ 175 (+1150%)
Mutual labels:  spotify
timesearch
The subreddit archiver
Stars: ✭ 114 (+714.29%)
Mutual labels:  reddit
spicetify-marketplace
Download extensions and themes directly from Spicetify
Stars: ✭ 125 (+792.86%)
Mutual labels:  spotify
reddit-pocket-sync
No description or website provided.
Stars: ✭ 37 (+164.29%)
Mutual labels:  reddit
react-redux-spotify
React + Redux + Spotify web api boilerplate project
Stars: ✭ 14 (+0%)
Mutual labels:  spotify
alternative-front-ends
Overview of alternative open source front-ends for popular internet platforms (e.g. YouTube, Twitter, etc.)
Stars: ✭ 1,664 (+11785.71%)
Mutual labels:  reddit
spotify-true-random
🔀 An application for unbiased truly random playlist and library shuffling with Spotify.
Stars: ✭ 51 (+264.29%)
Mutual labels:  spotify
reddit-news
📰 simple browser extension that shows recent news from reddit.com
Stars: ✭ 46 (+228.57%)
Mutual labels:  reddit
music-app-electron
Music-Streaming app built with Electron, Webpack, Vue.js, Vuex and the Spotify api.
Stars: ✭ 74 (+428.57%)
Mutual labels:  spotify
spotube
A lightweight free Spotify 🎧 desktop-client 🖥 which handles playback manually, streams music using Youtube & no Spotify premium account is needed 😱
Stars: ✭ 361 (+2478.57%)
Mutual labels:  spotify
gettit
An easy to use go program to download videos from Reddit.
Stars: ✭ 27 (+92.86%)
Mutual labels:  reddit
spotdlRedesign
spotDL v4 - The spotDL you love and use with plugin support.
Stars: ✭ 17 (+21.43%)
Mutual labels:  spotify
pebblify
Pebblify is a full-featured Spotify app for Pebble watches, made with PebbleJS ⌚🎶 https://apps.rebble.io/en_US/application/5ff3b52b1e6bb11b9eee5c5a
Stars: ✭ 16 (+14.29%)
Mutual labels:  spotify
reddit-clone
Full stack Reddit clone with nodejs and react native.
Stars: ✭ 69 (+392.86%)
Mutual labels:  reddit
Spotify-Podcast-Feed
A service which provides Spotify podcast as RSS feed, which can be subscribed in any podcast app.
Stars: ✭ 16 (+14.29%)
Mutual labels:  spotify
remixr
Discover new music based on the Spotify playlists you know and love!
Stars: ✭ 37 (+164.29%)
Mutual labels:  spotify

Spotify + Reddit = Spottit

Spottit Logo Build Status GitHub release Deploy

Dynamic Spotify playlists, based on Reddit. Easily set up your own subreddit playlist.

Follow Reddit Electronic Music's Spotify to see some of the generated playlists.

Table of Contents

How to use

To use the program, define your own config.yml and run the program with -c ${PATH_TO_YOUR_CONFIG.YML}. The following assumes that your config is called config.yml and is located in the same directory as the jar.

Before running for the first time, you need to authorize the application.

Run with -ma: java -jar spottit-${version}.jar -c config.yml -ma

This will obtain a refresh token, so that you do not need to authorize again.

Once this is done, you can omit the -ma. The application should now update the playlists.

It is also possible to specify the refresh token via an environment variable called REFRESH_TOKEN.

Configuration

To customize the application, edit the example_config.yml and fill in your own information.

# Add an entry for each playlist you want to update
playlists:
    # First Playlist, based on the top tracks from last week
  - id: YOUR_PLAYLIST_ID

    # How many tracks should the list contain at max?
    maxSize: 10

    # What subreddit do you want to target?
    subreddit: trance

    # can be either of: HOT, NEW, RISING, CONTROVERSIAL, TOP
    sort: TOP

    # can be either of: HOUR, DAY, WEEK, MONTH, YEAR, ALL
    # Only applies when sort is set to CONTROVERSIAL or TOP
    timePeriod: WEEK

    # Minimum number of upvotes that a reddit post needs to have before being considered
    minUpvotes: 10

    # Whether to look for the exact mix or allow other versions
    isStrictMix: true

    # Second Playlist, based on the top tracks from all time
  - id: YOUR_OTHER_PLAYLIST_ID
    maxSize: 10
    subreddit: trance
    sort: TOP
    timePeriod: ALL
    # Omit minUpvotes to allow any reddit post to be added

    # set this to true, if the playlist is private
    isPrivate: true

# When a reddit post has any of the following flairs, it will be excluded
flairsToExclude:
  - Mix
  - Liveset
  - Radio
  - Show
  - Album
  - Upcoming
  - AMA
  - Concluded
  - RIP

# minimum length of tracks in seconds in order to be added to the playlists
minimumLength: 100
Spotify Playlist ID

To find the ID of your playlist, right click it, select Share > Copy Spotify URI. The last part is your playlist's ID.

Advanced Configuration

Tag Filtering

Some subreddits make extensive use of tags, which basically means anything that is captured in parenthesis () [].

The tagFilter can be declared at playlist level and is used to filter out reddit posts based on their tags.

Example config:

playlists:
  - id: xyz
    ...
    tagFilter:
      # Tag must be equal
      # Example post that would be included: [FRESH] Luca Brasi - Clothes I Slept In
      includeExact:
        - FRESH

      # Tag contains
      # Example post that would be included: Foghorns - All Glands on Deck (indie/folk/punk)
      include:
        - punk

      # Tag must not be equal
      # Example post that would be excluded: [Album] Maps & Atlases - Lightlessness Is Nothing New
      excludeExact:
        - Album

      # Tag must not include
      # Example post that would be excluded: [FRESH VIDEO] Preoccupations - Decompose
      exclude:
        - video
Date Filtering

Sometimes you want to only add tracks that match a certain date criteria.

The dateFilter can be declared at playlist level and supports different ways of checking a track's release date.

Example config:

playlists:
  - id: xyz
    ...
    dateFilter:
      # Tracks that have been released since the beginning of 2018
      startingFrom: 2018-01-01

      # The release date can not exceed the current date minus the specified distance
      # Given a maxDistance of 1 month and 1 year, a track may not be older than 1 month and 1 year
      # Given the current date of 2018-06-16, include only tracks that are released since 2017-05-16
      maxDistance:
        month: 1
        year: 1
Scheduling

As a solution to the limited Heroku Scheduler frequency options, one can specify an execution schedule in the config.

Use schedule to define when the lists should be updated. If the current date doesn't match, the program won't run.

Example config:

playlists:
...

schedule:
  # Only execute on Mondays
  dayOfWeek: MONDAY

  # Only execute on the first day of the month, for example 2018-06-01
  dayOfMonth: 1

Deployment

In order to run the jobs automatically, the application can be deployed to a server, using Heroku, for example. Steps:

  1. Obtain a refresh token locally.
  2. Deploy the jar and your config.yml
  3. Set the REFRESH_TOKEN environment variable to your obtained refresh token from step 1
  4. Run the app as usual

More details about deploying to Heroku below.

Deploy to Heroku
  • Use the Deploy to Heroku button or do it manually from Heroku.
  • Give your app a name and choose a region
  • Click the Deploy app button
  • Once the app is deployed, click the Manage App button
  • Click the Deploy tab
  • In the Deployment method section, select Heroku Git and follow the instructions
  • After cloning from Heroku, add this repository as a remote using git remote add origin https://github.com/AndreasVolkmann/spotify-reddit
  • Then use git pull origin master to fetch the code
Yaml Configuration
  • Add your config.yml files, commit and git push heroku. You should be able to see Heroku building the project.
  • In Heroku, navigate to your app's settings and add a config var: Key = REFRESH_TOKEN, Value should be your refresh token obtained from the manual auth step.
Heroku Schheduler
  • In either Overview or Resources, click on Heroku Scheduler, and then click on Add new job
  • Start by verifying that the program can be found and executed. In the command field enter java -jar build/libs/spottit-0.7.0.jar --help
  • Set the frequency to Every 10 minutes and save
  • In order to see the output, use heroku logs --ps scheduler from your local project. See more here
  • Once everything works, edit your job and pass your config java -jar build/libs/spottit-0.7.0.jar -c config.yml
  • Currently, the Heroku Scheduler has limited frequency options. Use a daily frequency and specify details in your config.yml. See the Scheduling section

Spottit Heroku Scheduler

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].