OpenGTA/tools/picasa_ls.sh
Anonymous Maarten 1ae34ae340 2007-06-14
2015-12-03 01:38:22 +01:00

26 lines
549 B
Bash
Executable File

#!/bin/bash
TMP_FILE=/tmp/picasa_lst.$$
function fetch() {
wget -O $TMP_FILE 'http://picasaweb.google.com/data/feed/base/user/under.northern.sky/albumid/5015283825893823185?kind=photo&alt=rss&hl=en_US'
}
function extract() {
local _file=$1
echo 'cat /rss/channel/item[*]/enclosure|/rss/channel/item[*]/link' \
| xmllint --shell $_file | grep http | sed \
-e 's|^.*url="||' -e 's|".*$||' -e 's|<\/*link>||g'
}
fetch
extract $TMP_FILE | {
while read a; do
basename $a
read b
echo $b
echo
done
}
rm -f $TMP_FILE