Code Monkey home page Code Monkey logo

lastfm-export's Introduction

lastfm-export

Export your Last.fm tracks and import them into a MySQL/MariaDb or Sqlite database

This project imports your Last.fm listening history inside a MySQL/MariaDb or Sqlite database.

The first run might take quite some time depending on your listening history. But next runs will be much faster as only missing plays are imported into the database.

2022-02-13

  • Add counts to Waffle labels
  • Add withRemaining and withoutRemaining options to plot tops for duration/year
  • Change colors for a set of 22 distinct colors
  • Add command line support to plot artist counts

2022-02-11

  • Add support for Waffle plotType

2021-02-10

  • Add bash script to install Python modules
  • Update requirements.txt (3.9)

2020-05-29

List of changes:

database

  • one json_track table to keep the raw json from Last.fm

    • much easier to reimport everything from scratch without querying Last.fm.
  • one play table instead of the former 4 tables (artist, album, track, play)

    • getting rid of normalisation but fixing artist names is much easier with a single table.
  • using liquibase to create the database

  • choose between MySQL/MariaDb and Sqlite

  • for MySQL/MariDb:

    • update the liquibase.properties in the liquibase folder
    • execute the init-user-lastfm.sql script
    • update the database with liquibase:
    liquibase --logLevel DEBUG --changeLogFile db-changelog.xml update
  • for Sqlite:

    • create the database by running createSqliteDb.sh in the liquibase folder.
    • move the created lastfm.sqlite file to the parent directory.
  • no more views for number of days and year tops

scripts

  • a yaml config file: copy the example file in ~/.config/lastfm-export/lastfm-export.yml
  • export.py gets the new tracks from Last.fm and inserts them into json_track.
  • import.py imports the missing tracks into the play table.

plots

Instead of using Python notebooks and offline Plotly (see lastfm-notebooks), using matplotlib to plot and save images locally.

  • plot_top.py plots:
    • a last number of days 7, 30, 90, 180, 365 or overall artist/albums/tracks top
    • a given year artist/albums/tracks top
  • plot_counts.py plots number of plays per month per year.
  • plot_artist_counts plots artist play counts for:
    • all time
    • for a year
    • TODO: for a month
  • TODO: plot_albums_counts

A Telegram bot in the bot module to get an artist/albums/tracks top

  • by last number of days: 7, 30, 90, 180, 365 or overall
  • by year

Copyright (c) 2015-2021, Nicolas Meier

lastfm-export's People

Contributors

dependabot[bot] avatar nicolasm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

romakoks

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.