2017 © Pedro Peláez
 

library scrobbler-log

A library to parse audioscrobbler log files produced by Rockbox and other devices

image

exptom/scrobbler-log

A library to parse audioscrobbler log files produced by Rockbox and other devices

  • Monday, June 10, 2013
  • by exptom
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

scrobblerlog_parser

Audioscrobbler .scrobbler.log Parser, written in PHP and licensed under the MIT license (see LICENSE.txt), (*1)

A very simple parser that can handle v1.0 and v1.1 audioscrobbler log files as defined on the audioscrobbler wiki., (*2)

Usage

$parser = new ScrobblerLog\Parser('path/to/scrobbler.log');
$parsedData = $parser->parse();

If the device that has generated the log file is not timezone aware then the timezone must be specified before executing a parse:, (*3)

$parser = new ScrobblerLog\Parser('path/to/scrobbler.log');
$parsedData = $parser->setTimezone('Europe/London')->parse();

The timezone can be any of the timezone strings listed in the PHP docs., (*4)

The parsed data is returned as an array of LoggedTrack objects., (*5)

Other Features

Some log file information is available after a parse has been executed:, (*6)

$parser->getClient(); //get the name of the device that generated the scrobbler.log
$parser->getVersion(); //get the version of the scrobbler.log format that has been parsed (1.0 or 1.1)

and also some very basic stats..., (*7)

$parser->getTotalTracksLogged(); //get total number of tracks logged
$parser->getTotalTracksPlayed(); //get total number of tracks listend to
$parser->getTotalTracksSkipped(); //get total number of tracks skipped
$parser->getTotalPlayTime(); //get total length (in seconds) or tracks played

The Versions

10/06 2013

dev-master

9999999-dev https://github.com/exptom/scrobblerlog_parser/

A library to parse audioscrobbler log files produced by Rockbox and other devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

last.fm audioscrobbler scrobbling rockbox