GUI¶
Install PyQt4
Run gui.py
Commandline¶
How to use the lastexport and libreimport scripts to create a dump of your last.fm tracks and importing them to libre.fm
Getting the scripts¶
The scripts are hosted on gitorious.org, access the repository through this link or use the direct links to the scripts below.
lastexport.py - Used for exporting your listening history (also loved/banned tracks) from last.fm or libre.fm to a text file.
libreimport.py and scrobble.py - Used for importing your tracks from a text file (created with lastexport.py) to libre.fm or any other service using GNU FM software.
lbimport.py - Used for importing loved/banned tracks to libre.fm or any other service using GNU FM software
Using lastexport¶
First go to the folder where you saved lastexport.py:
cd /path/to/lastexport/
If the script isn't already executable, you might want to run:
chmod +x lastexport.py
To export all your tracks from last.fm, run:
./lastexport.py --user your_lastfm_username
The tracks will be exported to exported_tracks.txt by default,
where each line represents a track with the following entries (if they exist), separated by a tab:
date trackname artistname albumname trackmbid artistmbid albummbid
That is usually all you need to know.
Additional options¶
lastexport.py also recognizes the options --page, --outfile and --server.
--page lets you choose which page to start on.
Let's say you have a total of 300 pages of tracks but lastexport.py fails to download page 123,
lastexport.py will then save the 122 pages you already have and quit.
You can then run lastexport.py again with:
./lastexport.py -u your_lastfm_username --page 123
And it will continue downloading tracks starting at page 123 and save them in the same file as the other 122 pages of tracks.
--outfile lets you specify a file name where the exported tracks will be saved,
instead of the default exported_tracks.txt:
./lastexport.py -u your_lastfm_username --outfile mytracks.txt
--server lets you specify which server to export track info from, last.fm is the default but you can also export from libre.fm or any other gnu.fm server.
./lastexport -u your_librefm_username -s libre.fm
or
./lastexport -u your_gnufm_username -s myowngnufmserver.net
--type lets you specify which type of data you want to export, scrobbles is the default but you can also export loved or banned tracks.
./lastexport.py -u your_librefm_username -s librefm -t loved -o mylovedtracks.txt
Using libreimport (scrobble import)¶
First go to the folder where you saved libreimport.py and scrobble.py:
cd /path/to/libreimport/
If the script isn't already executable, you might want to run:
chmod +x libreimport.py
To import all your tracks to libre.fm, run:
./libreimport.py your_librefm_username exported_tracks.txt
You can also specify which server to upload to with -s.
./libreimport.py -s http://mygnufmserver.com/ your_username
Using lbimport (loved/banned import)¶
First go to the folder where you saved lbimport.py:
cd /path/to/lbimport/
If the script isn't already executable, you might want to run:
chmod +x lbimport.py
To import your loved tracks to libre.fm, run:
./lbimport.py -u your_librefm_username -t loved -f mylovedtracks.txt
or for banned tracks:
./lbimport.py -u your_librefm_username -t banned -f mybannedtracks.txt
You will be prompted for your libre.fm password and the tracks will then get uploaded.
By default it will import your tracks to libre.fm but you can specify another server to upload to with -s mygnufmserver or --server=mygnufmserver