https://github.com/fscm/lastfm2itunes
Update your iTunes "played counts" with your Last.fm scrobbles.
https://github.com/fscm/lastfm2itunes
itunes lastfm python ruby
Last synced: 11 months ago
JSON representation
Update your iTunes "played counts" with your Last.fm scrobbles.
- Host: GitHub
- URL: https://github.com/fscm/lastfm2itunes
- Owner: fscm
- License: mit
- Created: 2016-02-23T13:30:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-01-03T16:36:41.000Z (over 4 years ago)
- Last Synced: 2025-04-19T22:36:50.184Z (about 1 year ago)
- Topics: itunes, lastfm, python, ruby
- Language: Python
- Size: 28.3 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# lastfm2itunes
Update your iTunes "played counts" with your Last.fm scrobbles.
## Synopsis
This script will try to update the "played count" and the "played date" value
of your iTunes songs by getting the number of scrobbles for those songs from
a [http://last.fm/](last.fm) profile.
Differences in song titles and the usage of special characters on song names
may prevent the script from recognizing the songs properly.
The script is available on both Ruby and Python. Both versions will perform the
same tasks however, due to the way that both languages deal with character
encoding, normalization and parameterization, the results may be different.
Please use the one that produces the best results for your iTunes library.
## Getting Started
There are a couple of things needed for either of the scripts to work.
### Prerequisites
Follow the instructions for the version of the script that you wish to use.
Last.fm instructions are required for both versions.
#### Last.fm
A last.fm user account is required (to obtain the scrobbles from). You can
create an account at [http://last.fm/join](http://www.last.fm/join) if you do
not have one already.
A last.fm API account is also required. You can obtain an API key at
[http://last.fm/api](http://www.last.fm/api/account/create)
#### Ruby
For the Ruby version of the script the following gems are required:
* getoptlong
* json
* open-uri
* progress_bar
* rb-appscript
* unidecoder
You can install gems with:
```
sudo gem install
```
#### Python
For the Python version of the script the following modules are required:
* appscript
* getopt
* json
* os.path
* progress
* requests
* sys
* time
* unidecode
You can install modules with:
```
sudo pip install
```
### Installation
Nothing special to be done. Just download the version of the script that you
wish to use.
### Usage
Both versions of the script use the same arguments.
#### Ruby
```
Usage:
lastfm2itunes.rb -u -k [-f ] [-h] [-p]
Options:
-f, --datafile datafile name (optional)
-h, --help show help (optional)
-k, --apikey last.fm api key
-p, --lastplayed update the last played date (optional)
-u, --username last.fm username
```
#### Python
```
Usage:
lastfm2itunes.py -u -k [-f ] [-h] [-p]
Options:
-f, --datafile datafile name (optional)
-h, --help show help (optional)
-k, --apikey last.fm api key
-p, --lastplayed update the last played date (optional)
-u, --username last.fm username
```
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request
Please read the [CONTRIBUTING.md](CONTRIBUTING.md) file for more details on how
to contribute to this project.
## Versioning
This project uses [SemVer](http://semver.org/) for versioning. For the versions
available, see the [tags on this repository](https://github.com/fscm/lastfm2itunes/tags).
## Authors
* **Frederico Martins** - [fscm](https://github.com/fscm)
See also the list of [contributors](https://github.com/fscm/lastfm2itunes/contributors)
who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE)
file for details