Re: Help me write a fun script for my wallpaper project!

I installed a video card hoping that would help, but no good.  With transparency, without, nothing.

Do you think you could help me input the lines that curl the taxonomic data from your lua into Luc's script?

I've tried doing it myself but while I can kind of grasp the shell script's language, the commands and symbols that follow the curl command are beyond my understanding, even after looking at the man file.

The relevant script is currently this:

#!/bin/bash

BASE_URL=http://macro.dokkyomed.ac.jp/mammal/en/specimen_no
TAXO_URL=http://animaldiversity.ummz.umich.edu/site/accounts/information
DIR="$HOME/img/walls"
ALIST=( `ls $DIR` )
FILE=${ALIST[$(($RANDOM % ${#ALIST[*]}))]}

feh --bg-fill $DIR/$FILE
#feh -x -N -B black -g 700x564 $DIR/$FILE

case $FILE in
  DKY*) curl -silent $BASE_URL/${FILE:4:2}00.html ;;
  *) curl --silent $BASE_URL/index_`echo ${FILE%%_*} | tr [:upper:] [:lower:]`.html ;;
esac | sed -n 's/^<li>[^>]*>'${FILE:4:4}'.*"italic">\([^<]*\).*/\1/p'

and I know this is the relevant section:

curl -L 'http://animaldiversity.ummz.umich.edu/site/accounts/information/" .. animal .. ".html' | grep '<nobr>' | gawk -F'>' -v RS='<' 'RT{print $NF}' | sed '/^$/d' | sed ':a;N;$!ba;s/\\n//g'

Last edited by rabidfox (2011-01-30 02:12:25)

...But I'm ever so squeezable!

Re: Help me write a fun script for my wallpaper project!

that may be a bit tricky as i dont know a lot of bash code

to use the website you need to format the name.....

name_name

then plug that into the curl command... then you get a long list which subsequently needs to be broken up...

i do the formatting and list breaking up with lua commands.

have you tried giving conky its own window with own_window yes... or however you do it?
that might help with the blackout problem

i just fired up that script and it seems, at least for me, that the animaldiversity site is either not playing nice, or experiencing technical difficulties

It's hard to find something if you don't know what you're looking for.
I have a blog, it's mostly about conky and lua stuff... go here.