Giter Site home page Giter Site logo

netluxe / scrobble-shelf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from david-cako/scrobble-shelf

0.0 1.0 0.0 35 KB

Create interactive album walls from last.fm scrobble stats.

Home Page: https://davidcako.com/scrobble-shelf/

License: GNU General Public License v3.0

Python 58.38% CSS 20.13% JavaScript 21.49%

scrobble-shelf's Introduction

scrobble shelf

Create interactive album collages from last.fm scrobble stats.

https://davidcako.com/scrobble-shelf/

screenshot

I wanted a way to integrate my last.fm listening stats with my website that wasn't just a static collage, and wasn't just a direct link to last.fm.

This python script and accompanying static files allows you to scrape your last.fm listening stats on a regular basis, and insert an interactive array of albums into your website that links back to the albums on last.fm.

Usage

Installation:

pip3 install ./scrobble-shelf
  • Get a last.fm API key. scrobble shelf expects API_KEY and API_SECRET environment variables. You can either pass them in when run (API_KEY={...} API_SECRET={...} scrobble-shelf ...) or add them to your ~/.bashrc.

  • Add an element on your desired page with the id scrobble-shelf, and include the corresponding .css and .js files from the static folder in this repository.

  • Edit the pathRoot variable in scrobble-shelf.js if you will not be using /var/www/scrobble-shelf/ as your output directory.

Usage (default period is 3 months):

scrobble-shelf {LAST FM USERNAME} {output dir (i.e., /var/www/scrobble-shelf)} [--period 6months]

Note that you will need to add the above as a cron job if you wish to have scrobble shelf automatically update.

Local artwork files:

scrobble shelf also allows you to substitute local files for albums missing cover art on last.fm, or those which are incorrectly scrobbled. Simply add keys with partial string matches to COVER_ART_SUBS in the cover_art_subs.py file, and values of the local paths. Note that these are only sourced in absence of artwork on last.fm.

COVER_ART_SUBS = {
    "my beautiful dark twisted fantasy": "/home/david/scrobble-shelf/cover-art-subs/mbdtf.jpg",
    "se dice": "/home/david/scrobble-shelf/cover-art-subs/sdbnb.jpg"
}

scrobble-shelf's People

Contributors

david-cako avatar

Watchers

 avatar

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.