![]() ![]() Ĭreate lastfm album collage for one or several lastfm users. Second method (installing the lastfm_cg package with pipenv) git clone ![]() Run from source First method (installing the lastfm_cg package) git clone If you are an Archlinux user, you can install the AUR package lastfm_cg-git. RequirementsĬlassic installation : pip install lastfm_cg You will have to change them to match your configuration, more specifically the WorkingDirectory and ExecStart directive. Some systemd service are also available in the systemd-service directory to run the lastfm_cg script at a given time. You can see them in action on my own Twitter and Mastodon accounts. If you don't want the script to create an sqlite file in your ~/.local/share/lastfm_cg/ directory, you will have to launch the script with the -d/-disable_cache flag.Ī twitter bot and a mastodon bot are also available in the bot_lastfm_cg folder. ![]() It also caches the image files downloaded thanks to the requests-cache library. You can also use the -API_KEY and -API_SECRET argument to set your lastfm API key. This utility needs a valid config file with your lastfm API keys (get them at last.fm/api.) in ~/.config/lastfm_cg/config.ini (the config file will be created at first launch, you can also see config_sample.ini for an example). save ( "5x5 album collage.Generate covers collage from albums listened by a lastfm user. generate_top_albums_collage ( username = "username", cols = 5, rows = 5, period = "7day" ) image. save ( "5x5 album collage.png", "png" ) # Or just call the method directly image = collage_generator. generate ( entity = "album", username = "username", cols = 5, rows = 5, period = "7day" ) image. Usage/Examples from llage_generator import CollageGenerator collage_generator = CollageGenerator ( lastfm_api_key = "YOUR_API_KEY", lastfm_api_secret = "YOUR_API_SECRET" ) # Returns a PIL Image object image = collage_generator. Install lastfmcollagegenerator with pip pip install lastfmcollagegenerator
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |