Forum » Development Discussion

lastCollage

 
    • Koant schrieb...
    • Benutzer
    • 9. Mär. 2008, 10:48

    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 schrieb...
    • Benutzer
    • 13. Mär. 2008, 9:05

    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 schrieb...
    • Forum Moderator
    • 13. Mär. 2008, 23:02
    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 schrieb...
    • Benutzer
    • 17. Mär. 2008, 11:34
    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 schrieb...
    • Benutzer
    • 17. Mär. 2008, 16:46
    Thanks for the comments.
    juxi: Yes, what you're describing is actually the first version of the script :) I'll add it shortly.

    • Koant schrieb...
    • Benutzer
    • 19. Mär. 2008, 14:11

    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 schrieb...
    • Benutzer
    • 20. Mär. 2008, 14:02
    Thanks a heap! Just what I was looking for :)

    • Koant schrieb...
    • Benutzer
    • 21. Mär. 2008, 7:28
    My pleasure!

    • [Gelöschter Benutzer] schrieb...
    • Benutzer
    • 23. Mär. 2008, 1:14
    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 schrieb...
    • Benutzer
    • 23. Mär. 2008, 9:32
    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.

    • [Gelöschter Benutzer] schrieb...
    • Benutzer
    • 23. Mär. 2008, 10:34
    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 schrieb...
    • Benutzer
    • 23. Mär. 2008, 11:51

    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 schrieb...
    • Benutzer
    • 23. Mär. 2008, 11:57

    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 schrieb...
    • Benutzer
    • 23. Mär. 2008, 12:15
    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.)

    Bearbeitet von Koant am 23. Mär. 2008, 18:31
    • Koant schrieb...
    • Benutzer
    • 23. Mär. 2008, 18:30

    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 schrieb...
    • Benutzer
    • 26. Mär. 2008, 9:37

    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 schrieb...
    • Benutzer
    • 26. Mär. 2008, 17:19
    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 schrieb...
    • Benutzer
    • 26. Mär. 2008, 17:29
    ah thank you for the tip! I used seq in the latest version of the script, which I haven't tested on Mac.

    • Koant schrieb...
    • Benutzer
    • 27. Mär. 2008, 8:48
    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 schrieb...
    • Benutzer
    • 11. Apr. 2008, 14:58
    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 schrieb...
    • Benutzer
    • 29. Apr. 2008, 15:48
    Thank you for the suggestion. I've added a dependency check in the latest version.

    Ta!

    • Koant schrieb...
    • Benutzer
    • 15. Mai. 2008, 7:58

    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.

Anonyme Benutzer dürfen keine Beiträge schreiben. Bitte log dich ein oder registriere dich, um Beiträge in den Foren schreiben zu können.