calliope.lastfm.lastexport

Script for exporting tracks through audioscrobbler API. Usage: lastexport.py -u USER [-o OUTFILE] [-p STARTPAGE] [-s SERVER]

Module Contents

Functions

get_options(parser)

Define command line options.

connect_server(server, username, startpage[, ...])

Connect to server and get a XML page.

get_pageinfo(response[, tracktype])

Check how many pages of tracks and total tracks the user has.

get_tracklist(response)

Read XML page and get a list of tracks and their info.

parse_track(trackelement)

Extract info from every track entry and output to list.

write_tracks(tracks, outfileobj)

Write tracks to an open file

get_tracks(server, username[, startpage, sleep_func, ...])

main(server, username, startpage, outfile[, infotype])

Attributes

__version__

parser

calliope.lastfm.lastexport.__version__ = 0.0.4
calliope.lastfm.lastexport.get_options(parser)

Define command line options.

calliope.lastfm.lastexport.connect_server(server, username, startpage, sleep_func=time.sleep, tracktype='recenttracks', retry_on_error=True)

Connect to server and get a XML page.

calliope.lastfm.lastexport.get_pageinfo(response, tracktype='recenttracks')

Check how many pages of tracks and total tracks the user has.

calliope.lastfm.lastexport.get_tracklist(response)

Read XML page and get a list of tracks and their info.

calliope.lastfm.lastexport.parse_track(trackelement)

Extract info from every track entry and output to list.

calliope.lastfm.lastexport.write_tracks(tracks, outfileobj)

Write tracks to an open file

calliope.lastfm.lastexport.get_tracks(server, username, startpage=1, sleep_func=time.sleep, tracktype='recenttracks', retry_on_error=True)
calliope.lastfm.lastexport.main(server, username, startpage, outfile, infotype='recenttracks')
calliope.lastfm.lastexport.parser