October 27th, 2006

Bloodletting

Iterations

I'm on my third lj theme. I'm using the S2 layout 'Nebula' and though I know HTML, I don't know CSS, but probably should have stuck to an S1 layer. Leave it to me to not understand the differences in the two until it was too late. I'll probably change my theme again in the future, but not too soon, as it requires a lot of work to rewrite the code for tweaks, and to put all the customizations in place.

The Anal-King himself, photogoot asked me how I got my avatars at the top of my page to change, as he'd spent some time studying them, and noticed they were not random. Good eye. I took a smattering of my avatars and placed them in a 600x100 strip in Photoshop, trying to balance people & objects, colors & composition. I placed these images in my webspace on drax0r's server, and wrote a very simple bash script:


#!/usr/bin/bash
# Script which rotates my LiveJournal header image

cp /www/drax0rs_server/rotate1_new.jpg /www/drax0rs_server/spacer.jpg &
sleep 60
cp /www/drax0rs_server/rotate8_new.jpg /www/drax0rs_server/spacer.jpg &
sleep 60
cp /www/drax0rs_server/rotate2_new.jpg /www/drax0rs_server/spacer.jpg &
sleep 60
cp /www/drax0rs_server/rotate7_new.jpg /www/drax0rs_server/spacer.jpg &
sleep 60
cp /www/drax0rs_server/rotate3_new.jpg /www/drax0rs_server/spacer.jpg &
sleep 60
cp /www/drax0rs_server/rotate6_new.jpg /www/drax0rs_server/spacer.jpg &
sleep 60
cp /www/drax0rs_server/rotate4_new.jpg /www/drax0rs_server/spacer.jpg &
sleep 60
cp /www/drax0rs_server/rotate5_new.jpg /www/drax0rs_server/spacer.jpg &
sleep 60


For you non-technical types out there, this script says, every sixty seconds, in the background, take one of my eight images, and overwrite the previous image of the same name. So, once a minute, spacer.jpg is any one of eight different images.

I run this through cron, a unix command scheduler:


# Rotate my top banner lj picture
*/8 * * * * /home/ehowton/rotate_lj_pic.sh


What this says, is every eight minutes, of every hour of every day of every week of every month of every year, run my script. I adjust the number of minutes according to how many images I have.

In my lj layout, I have the 'URL of image to be used as page header' set to grab spacer.jpg from the web. This creates the rotating image at the top without any goofy java, though its not a true 'rotation' of all my avatars.




Collapse )





ehowton's Halloween party:

Collapse )
  • Current Music
    Concrete Blonde: Bloodletting