You are not logged in.
Hi there! I just created a small script that fetches the posters of the top ten cinema movies from the internet, and then creates a dynamic wallpaper that looks like this:
Now I have this in a cronjob, and can always see on my desktop background, what movies are in the theaters at the time
If anyone is interested, I could upload the script and explain it... It' very dynamic, you can set the Layout, the size of the Wallpaper etc. yourself.
Offline
So where is the script? What's the point in this post without the actual script?
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...
Offline
*hehe*, ok, the point was, that describing how it works etc. was work I decided only to do if anyone actually was interested.
But I've done it now, anyway.
So, here it is: http://media.ubuntuusers.de/forum/attac … der.tar.gz
README is included, ruby, imagemagick and wget are the only dependencies.
Have fun!
Last edited by rggjan (2010-01-11 15:26:25)
Offline
I don't have Ruby, but I do like this. Have a quick and dirty sh port.
#! /bin/sh
# Edit these:
TMPPATH="/tmp" # Path to save the wallpaper and temp files
STYLE=1 # Black=1, White=2, Polaroid=3
W=800 # Width of final image
H=480 # Height of final image
BORDERW=50 # Left/right border width
BORDERH=0 # Top/bottom border height
function get_random_names () # string int : string
{
echo "$1" | shuf -n "$2" | xargs -n 1 basename
}
mkdir -p "$TMPPATH/posters"
tmp_html="$TMPPATH/posters/index.html"
wget http://www.impawards.com/ -q -O "$tmp_html"
urls=`sed 's/ /\n/g' "$tmp_html" | grep '/thumbs/' | sed 's/thumbs/posters/g' | sed 's/imp_//g' | sed 's|^|http://www.impawards.com|g'`
cd "$TMPPATH/posters"
echo "$urls" | xargs wget -nc -q
case "$STYLE" in
1)
N=3
M=1
COLOR="black"
IMGCOMMAND="-background $COLOR -border 2x2 -bordercolor white \
-geometry $(( (( $W - ( $BORDERW * 2 )) / $N) - 44 ))x$(( ( $H - ( $BORDERH * 2)) / $M - 44 ))+20+20 \
-monitor -tile $(( $N ))x$M $TMPPATH/collage_tmp.jpg"
;;
2)
N=3
M=1
COLOR="white"
IMGCOMMAND="-shadow -geometry $(( (( W - ( $BORDERW * 2 )) / $N ) - 41 ))x$(( (( $H - ( $BORDERH * 2 )) / $M ) - 44 ))+20+20 \
-monitor -tile $(( N ))x$M $TMPPATH/collage_tmp.jpg"
;;
3)
N=5
M=2
COLOR="LightGray"
IMGCOMMAND="-border 2x2 -background black +polaroid -background $COLOR \
-geometry $(( 46 + ( $W - ( $BORDERW * 2 )) / $N ))x$(( 46 + ( $H - ( $BORDERH * 2 )) / $M ))-25-25 \
-monitor -tile $(( N ))x$M $TMPPATH/collage_tmp.jpg"
;;
esac
cd "$TMPPATH/posters"
images=`get_random_names "$urls" $(( $N * $M ))`
montage $images $IMGCOMMAND
cd "$TMPPATH"
convert collage_tmp.jpg -background "$COLOR" -gravity center -extent "$W"x"$H" collage.jpg
rm collage_tmp.jpg
edit: a bunch of tabs that should not have been
Last edited by keenerd (2010-01-11 17:11:47)
Offline
Interesting and spammy at the same time.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
@keenerd: Wow, that was fast
@Xyne: What do you mean with spammy?
Offline
@Xyne: What do you mean with spammy?
Well, it's advertising directly on your desktop, which is a bit spammy... but if you like the movies, then it's interesting.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline