• Koant disse...
    • Usuário
    • Mar 9 2008, 10h48



    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 disse...
    • Usuário
    • Mar 13 2008, 9h05

    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 disse...
    • Forum Moderator
    • Mar 13 2008, 23h02
    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 disse...
    • Usuário
    • Mar 17 2008, 11h34
    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 disse...
    • Usuário
    • Mar 17 2008, 16h46
    Thanks for the comments.
    juxi: Yes, what you're describing is actually the first version of the script :) I'll add it shortly.

    • Koant disse...
    • Usuário
    • Mar 19 2008, 14h11

    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 disse...
    • Usuário
    • Mar 20 2008, 14h02
    Thanks a heap! Just what I was looking for :)

    • Koant disse...
    • Usuário
    • Mar 21 2008, 7h28
    My pleasure!

    • [Usuário excluído] disse...
    • Usuário
    • Mar 23 2008, 1h14
    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 disse...
    • Usuário
    • Mar 23 2008, 9h32
    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.

    • [Usuário excluído] disse...
    • Usuário
    • Mar 23 2008, 10h34
    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!

  • 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.
  • 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 disse...
    • Usuário
    • Mar 23 2008, 12h15
    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.)

    Editado por Koant em Mar 23 2008, 18h31
    • Koant disse...
    • Usuário
    • Mar 23 2008, 18h30

    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:
    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 disse...
    • Usuário
    • Mar 26 2008, 9h37

    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:

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

    • peddro disse...
    • Usuário
    • Mar 26 2008, 17h19
    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 disse...
    • Usuário
    • Mar 26 2008, 17h29
    ah thank you for the tip! I used seq in the latest version of the script, which I haven't tested on Mac.

    • Koant disse...
    • Usuário
    • Mar 27 2008, 8h48
    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 disse...
    • Usuário
    • Abr 11 2008, 14h58
    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
  • 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 disse...
    • Usuário
    • Abr 29 2008, 15h48
    Thank you for the suggestion. I've added a dependency check in the latest version.


    • Koant disse...
    • Usuário
    • Mai 15 2008, 7h58

    Faster, more versatile...

    and actually not a bash script but a Python script, here is the new version:

    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.

Usuários anônimos não podem postar mensagens. É preciso fazer login ou criar uma conta para postar nos fóruns.