Git Product home page Git Product logo

log-tunes's Introduction

log-tunes

A Menubar application (OS X) that records media that you have played on iTunes.

The log file is a CSV file with these fields:

  • date - in the format of yyyy-MM-dd HH:mm:ss
  • name - media name
  • artist
  • album
  • tracknum
  • genre
  • category - Music, iTunes U, etc. This is not a field directly supplied by iTunes. The program determines this simply based on the location of your media file. More specifically, it grabs the directory in the path of the media that comes after ~/Music/iTunes/iTunes Music/. For many media this is empty.
  • length
  • rating - we use the value directly given by iTunes. The rating here equals the number of stars in iTunes times 20, i.e., rating of 50 = 2.5 stars, rating of 60 = 3 stars, etc.
  • count - Play Count

All fields are quoted in double quotes. Double quotes that exist inside the fields are escaped with a back-slash.

Default location of the log is ~/Documents/iTunes-log.csv. If you select an existing file in the Preferences, the new entries will be appended to the end of the file.

Utilities

Inside the Utilities folder there is a Jupyter Notebook analyze-log.ipynb. It takes the log produced by log-tunes and analyze the data.

Currently it only does very basic analyses:

  • Find the 10 artists that are most frequently played
  • Find the 10 media files that are most frequently played
  • Plot the number of plays by hour (below)
  • Plot the proportion of genre played by hour (below; note that the two plots are based on different data sets)

Frequency by hour

Genre by hour

More features will be added later.

Download

https://github.com/saiwing-yeung/log-tunes/releases/latest

Known issues

If you 1) pause and then un-pause, or 2) modify any attribute of the media (e.g., song name, rating, etc.) then iTunes will send us a new Play notification.

We use the following algorithm to prevent from logging these spurious notifications: We check the PersistentID of the media (a unique ID that iTunes gives every media file) and the Play Count. If the PersistentID is different from the previous one then we will log it. If PersistentID is the same then we will log it only if the play count has been incremented.

This is only a heuristic though and is not 100% correct.

ToDo

  • Include the Python script for processing the log.

Release history

v0.7 (2016-04-06)

  • initial release

License

log-tunes is available under the GNU GPL license. See the LICENSE file for more information.

log-tunes's People

Contributors

saiwing-yeung avatar

Watchers

James Cloos avatar  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.