Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jerboa88/collage-generator-for-last.fm
A command-line app to generate a collage of your favorite albums based on Last.fm scrobbles
https://github.com/jerboa88/collage-generator-for-last.fm
album-art album-cover collage-app collage-maker image-generation lastfm lastfm-api pillow python requests requests-library-python wallpaper-generator
Last synced: about 2 months ago
JSON representation
A command-line app to generate a collage of your favorite albums based on Last.fm scrobbles
- Host: GitHub
- URL: https://github.com/jerboa88/collage-generator-for-last.fm
- Owner: jerboa88
- License: mpl-2.0
- Created: 2019-12-25T05:41:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-29T03:53:48.000Z (5 months ago)
- Last Synced: 2024-10-11T12:58:56.587Z (2 months ago)
- Topics: album-art, album-cover, collage-app, collage-maker, image-generation, lastfm, lastfm-api, pillow, python, requests, requests-library-python, wallpaper-generator
- Language: Python
- Homepage: https://johng.io/p/collage-generator-for-last-fm
- Size: 11.3 MB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Collage Generator for Last.fm
A command-line app to generate a collage of your favorite albums based on Last.fm scrobbles
## Installation
1. Python 3 is required. You can download it from [here](https://www.python.org/downloads/).
2. [Requests](https://pypi.org/project/requests/) and [Pillow](https://pypi.org/project/Pillow/) are required dependencies. Use `pip install requests` and `pip install Pillow` to install them.
3. A Last.fm API key is required to fetch a user's top albums. You can get one easily [here](https://www.last.fm/api/). You can either put your key in a text file called `apikey.txt` or pass it as a command line argument (not recommended)## Usage
Run the program from the command-line like so: `python3 collage_generator_for_lastfm.py example 1920 1080`. You need to provide the user, width, and height but the other arguments are optional. All available arguments are listed below.```
collage_generator_for_lastfm.py [-h] [--size SIZE] [--apikey APIKEY]
[--output OUTPUT] [--filetype {jpg,png}]
[--jpeg_quality {1-100}]
[--png_compression {0-9}]
[--period {forever,year,6month,3month,month,week}]
[--layout {spiral,topleft}]
[--update_images {auto,yes,no}]
[--ignore_warnings]
user width heightpositional arguments:
user The Last.fm user to get favorite albums of
width The width of the output image (in pixels)
height The heights of the output image (in pixels)optional arguments:
-h, --help show this help message and exit
--size SIZE, -s SIZE The height and width of each album cover (in pixels).
Default: 300
--apikey APIKEY, -k APIKEY
Your API key for Last.fm. It is recommended to put
your API key in apikey.txt instead of passing it as an
argument. An API key is required for this program to
work
--output OUTPUT, -o OUTPUT
The filename of the output image. The file extension
doesn't have to be included. Default: collage
--filetype {jpg,png}, -f {jpg,png}
The filetype of the output image. Default: jpg
--jpeg_quality {1-100}, -q {1-100}
The quality of the output image (when using JPEG).
Higher values look better but produce a larger file
size. Default: 100
--png_compression {0-9}, -c {0-9}
The compression level of the output image (when using
PNG). Higher values take longer to process but produce
a smaller file size. Default: 9
--period {forever,year,6month,3month,month,week}, -p {forever,year,6month,3month,month,week}
The period from which to fetch favorite albums.
Default: forever
--layout {spiral,topleft}, -l {spiral,topleft}
The layout of albums in the output image. Spiral
places the top albums in the center and less popular
albums near the edges using a spiral pattern. Topleft
places images column by column, starting from the top-
left corner. Default: topleft
--update_images {auto,yes,no}, -u {auto,yes,no}
Whether to fetch updated albums and images from the
server. Auto only updates the images if settings are
changed or if the downloaded images are over a week
old. Default: auto
--ignore_warnings, -i
Ignore all warnings and proceed using default values
```## Screenshots
| | |
| :----------------------------------: | :----------------------------------: |
| ![Screenshot 1](screenshots/ss1.jpg) | ![Screenshot 2](screenshots/ss2.jpg) |## Contributing
Contributions, issues, and forks are welcome.## License
This project is licensed under the Mozilla Public License 2.0. See [LICENSE](LICENSE) for details. This project is not affiliated with or endorsed by Last.fm in any way. All album covers belong to their respective owners.