View Source LastfmArchive.Transform (lastfm_archive v0.10.0)

This module provides functions for reading and transforming downloaded Lastfm data.

Link to this section Summary

Functions

Transform a downloaded raw JSON page into a list of tab-delimited track data.

Link to this section Functions

Link to this function

transform(user, filename, mode \\ :tsv)

View Source
@spec transform(binary(), binary(), :atom) :: [binary()] | {:error, :file.posix()}

Transform a downloaded raw JSON page into a list of tab-delimited track data.

example

Example

  # transform a page of scrobbles from the file archive
  LastfmArchive.Transform.transform("a_lastfm_user", "2007/200_1.gz")

A row of tab-delimited track currently contains (if any):

  • id auto-generated by the system to uniquely identify a scrobble
  • name the track name
  • scrobble_date Unix timestamp of the scrobble date
  • scrobble_date_iso scrobble date in ISO 8601 datetime format
  • mbid MusicBrainz identifier for the track
  • url web address of the track on Last.fm
  • artist
  • artist_mbid MusicBrainz identifier for the artist
  • artist_url web address of the artist on Last.fm
  • album
  • album_mbid MusicBrainz identifier for the album