Forum » Development Discussion

lastCollage

 
    • Koant a dit :...
    • Utilisateur
    • 9 mars 2008, 10h48m

    lastCollage

    Hi,

    Inspired by Gijsco's Last.fm Desktop Generator, unfortunately unavailable on linux, I wrote a bash script which generates a collage of the album covers in your profile, à la webcollage. I call it lastCollage and you can find it, with instructions, at http://ledazibao.free.fr/lastCollage.

    Here is an example of what it does with my profile:


    Comments welcome.
    (thanks to last.fm for making the data available)

    • Koant a dit :...
    • Utilisateur
    • 13 mars 2008, 9h05m

    Tested on Mac and Windows

    The script works on Mac and Windows. I've added some instructions for both at http://ledazibao.free.fr/lastCollage.

    • tburny a dit :...
    • Forum Moderator
    • 13 mars 2008, 23h02m
    sounds nice, I'll give it a bookmark for later on^^

    Combo.fm: Combine your favourite radio stations! | My Blog | scala-lastfmapi | Cache2k - A high performance Java in-memory cache
    P.S.: Do not click here
    throw new PokemonException(); //Gotta catch 'em all
    My forum post reflects my personal opinion :)
    • juxi a dit :...
    • Utilisateur
    • 17 mars 2008, 11h34m
    At first the image was blank. After some digging around I found out Ubuntu doesn't have xsltproc installed by default. After installing that all worked out perfect.

    I was also wondering is it possible to make the script be less aware of the edges of the picture? I find the black areas unneeded :) I could of course just make the background picture be way larger than my desktop actually is and then just crop it to the size I want, but I'd like the script to do this for me :)

    • Koant a dit :...
    • Utilisateur
    • 17 mars 2008, 16h46m
    Thanks for the comments.
    juxi: Yes, what you're describing is actually the first version of the script :) I'll add it shortly.

    • Koant a dit :...
    • Utilisateur
    • 19 mars 2008, 14h11m

    New: possibility of changing the canvas size

    Following juxi's suggestion, I've added the canvas size in the parameters. The canvas is the surface which the album covers are pasted on and can be of a different dimensions than the final image. In particular, you can now obtain an image without a black border.

    See http://ledazibao.free.fr/lastCollage/#tips for more information.

    • juxi a dit :...
    • Utilisateur
    • 20 mars 2008, 14h02m
    Thanks a heap! Just what I was looking for :)

    • Koant a dit :...
    • Utilisateur
    • 21 mars 2008, 7h28m
    My pleasure!

    • [Utilisateur supprimé] a dit :...
    • Utilisateur
    • 23 mars 2008, 1h14m
    Thank you very much for your script!

    Personally, i would love to have an option to row the images without spin and disortion like some other generators do... (nevertheless, i prefer yours because i can make a cronjob for it!)

    • Koant a dit :...
    • Utilisateur
    • 23 mars 2008, 9h32m
    Thanks.
    Re: the other generators, I'll think about it. Note that if you set AlbumOpacity to its maximum (100) and GradientSize to its minimum (1), the covers are not blended into each other, as with the other generators.

    • [Utilisateur supprimé] a dit :...
    • Utilisateur
    • 23 mars 2008, 10h34m
    yeah thats my current setting... but it doesnt fill my screen and leaves black parts... probably because i dont have enough albums scrobbled... i think it would be ok to double some album pictures, just to fill the screen with covers.

    Im not that much into bash-scripting and imagemagick, but i will try to hack it myself to my needs - if it works i'll submit it to you!

    Thank you for your reply!

    • YesusFist a dit :...
    • Utilisateur
    • 23 mars 2008, 11h51m

    what the hell is that???

    this is the most user-unfriendly stuff EVER MADE man, so congratz. I really won't spend 2 hours by finding out how to put wget in my command line or how the hell I'm supposed to put a string of code in a directory... as I can see I'll look now to all the ppl here as complete PC noob, but I really don't now how I'm supposed to get this to work. I'm forced to stay with the wallpapergen that Gijsco made

    I don't wanna be your friend.
    • YesusFist a dit :...
    • Utilisateur
    • 23 mars 2008, 11h57m

    ois

    aaah... a linux environment for windows... ever heard about the kind of PC users that have MS Windows simply because they can actually USE their computer with it? I'm one of them, that does it

    I don't wanna be your friend.
    • Koant a dit :...
    • Utilisateur
    • 23 mars 2008, 12h15m
    Hello Windows user.

    It's a bash script, so to make it run on Windows requires a bit of work. I admit it's not point-and-click . In the next version, no file editing will be necessary , so it'll be easier to customize.

    As indicated in the webpage, you need to have cygwin installed, which is a linux environment running in Windows.

    Actually, one of the reasons I made the script in the first place was because I didn't know of any wallpaper generator that worked on linux. The fact that it can (mod some efforts) work on Mac and Windows is an added bonus.

    Maybe you could ask Gijsco to add the random collage to his already very nice app. (I would suggest using a different tone though, if you want people to do things for you.)

    Modifié par Koant le 23 mars 2008, 18h31m
    • Koant a dit :...
    • Utilisateur
    • 23 mars 2008, 18h30m

    No need to edit anymore.

    Dear all,

    You can now pass the parameters (username etc.) directly in the command line, so there is no need to edit the script anymore.
    For example:
    ./lastCollage
    will run with the default values.

    ./lastCollage -u YesusFist -f 640x480 -a 150 -c 790x630
    will generate a small (640x480) collage using a canvas size of 790x630, with album size of 150 pixels, using YesusFist's profile.

    • Koant a dit :...
    • Utilisateur
    • 26 mars 2008, 9h37m

    a web version

    I've just added a web version, which allows you to generate a small (640x480) collage without having to install the script.

    It's limited in the sense that options cannot be changed but it should give you an idea of what the script does with your profile.

    It's here:
    http://ledazibao.free.fr/lastCollage/lastCollageweb.php

    (I might have to stop this service at some point so so enjoy it while it lasts.)
    Cheers

    • peddro a dit :...
    • Utilisateur
    • 26 mars 2008, 17h19m
    If you run the script on Mac OS X and getting only black images and the message

    "./lastCollage: line 178: seq: command not found"

    Edit the lastCollage script, search for seq and replace it with the word "jot" (without the quotes offcourse :) )

    "The most important things are not things"
    • Koant a dit :...
    • Utilisateur
    • 26 mars 2008, 17h29m
    ah thank you for the tip! I used seq in the latest version of the script, which I haven't tested on Mac.

    • Koant a dit :...
    • Utilisateur
    • 27 mars 2008, 8h48m
    Re: 'seq' I've now replaced it with a 'for' loop, so the script should work on Mac without any changes. Thanks again for your comment.

  • error

    getting this when I run ./lastCollage

    Preparing the list of pictures...
    Preparing the mask...
    ./lastCollage: line 192: convert: command not found
    Preparing the background...
    ./lastCollage: line 201: convert: command not found
    Add images (might take a while)...
    iteration 1 of 1

    ./lastCollage: line 215: convert: command not found
    ./lastCollage: line 219: convert: command not found
    Darken the final image...
    ./lastCollage: line 227: convert: command not found
    Finished! Image saved in hippyrandall.jpg

    the line 215 and 219 repeat numerous times. Any idea what is causing this?

    ...if you wanna live life on your own terms
    Ya gotta be willing to crash and burn...
    ~Motley Crue
    • Koant a dit :...
    • Utilisateur
    • 11 avr. 2008, 14h58m
    Hippyrandall has solved his problem but just for future reference: convert is part of ImageMagick, which was not installed.

  • solved

    ty Koant I forgot to post solved here.
    Great script!

    ...if you wanna live life on your own terms
    Ya gotta be willing to crash and burn...
    ~Motley Crue
    • holloway87 a dit :...
    • Utilisateur
    • 29 avr. 2008, 14h39m
    I'm using Arch Linux and had to install the package bc. After that the tool works great. Maybe it would be good to take this into the dependecies.

    It could also be good to test the necessary commands before execute it for the image.
    Then there will come error messages that the commands are not installed and the script can't be executed.

    Good work though!


    • Koant a dit :...
    • Utilisateur
    • 29 avr. 2008, 15h48m
    Thank you for the suggestion. I've added a dependency check in the latest version.

    Ta!

    • Koant a dit :...
    • Utilisateur
    • 15 mai 2008, 7h58m

    Faster, more versatile...

    and actually not a bash script but a Python script, here is the new version:
    http://ledazibao.free.fr/wallpaperfm/

    The only requirement is Python (and the Python Imaging Library). If you're on linux, you probably have those already.
    The script can do 3 different wallpapers and is much faster than lastCollage.

    Hope you like it!
    Comments and questions welcome.

Les utilisateurs anonymes ne peuvent pas poster de messages. Merci de vous connecter ou de créer un compte pour pouvoir intervenir dans les forums.