Name of Project: Picasa2BBCode.sh
Site: 
http://www.linuxevolution.org/archives/2010/03/19/from_picasaweb_albums_to_bbcode/index.html
Description: Script that takes a Picasaweb album and gets the BBCode
to allow you to share it on a forum.

Here is a sample of the script:
#!/bin/bash
SIZE=400

echo $1 | \
curl -s `awk --field-separator=/ '{print "http://picasaweb.google.com/
data/feed/api/user/"$4"/album/"$5}'` |\
sed -e 's/\"/\ /g' -e s/\'/\ /g |\
tr ' ' '\n' |\
grep s72 |\
awk '{print "[url='$1'][img]"$0"[/img][/url]\n"}' |\
sed s/s72/s$SIZE/g
 in order to execute it you need to pass the url of the album as a
parameter like so:
sh Picasa2BBCode.sh http://picasaweb.google.com/orvtech/Hdd

It wil then produce an output like this:
[url=http://picasaweb.google.com/orvtech/Hdd#][img]http://
lh3.ggpht.com/_WwtoUQV8M_8/S5kBtwXW08I/AAAAAAAAPbQ/Y636HBHOxEo/s400/
IMG_7458.JPG[/img][/url]
[url=http://picasaweb.google.com/orvtech/Hdd#][img]http://
lh3.ggpht.com/_WwtoUQV8M_8/S5kBupiHjqI/AAAAAAAAPbc/FShn8ryEr54/s400/
IMG_7462.JPG[/img][/url]
[url=http://picasaweb.google.com/orvtech/Hdd#][img]http://
lh5.ggpht.com/_WwtoUQV8M_8/S5kCW9ags7I/AAAAAAAAPbw/wFYET5XlgkQ/s400/
IMG_7463.JPG[/img][/url]
[url=http://picasaweb.google.com/orvtech/Hdd#][img]http://
lh5.ggpht.com/_WwtoUQV8M_8/S5kCXA_XujI/AAAAAAAAPb0/WDc3N1tLDCw/s400/
IMG_7464.JPG[/img][/url]
[url=http://picasaweb.google.com/orvtech/Hdd#][img]http://
lh4.ggpht.com/_WwtoUQV8M_8/S5kCXDnyhkI/AAAAAAAAPb4/SWuagR3LA8c/s400/
IMG_7465.JPG[/img][/url]
[url=http://picasaweb.google.com/orvtech/Hdd#][img]http://
lh5.ggpht.com/_WwtoUQV8M_8/S5kCXTt6vaI/AAAAAAAAPb8/i1RmMrL5slg/s400/
IMG_7466.JPG[/img][/url]
[url=http://picasaweb.google.com/orvtech/Hdd#][img]http://
lh5.ggpht.com/_WwtoUQV8M_8/S5kCX8hUk-I/AAAAAAAAPcA/YzOe_0bO0Jw/s400/
IMG_7468.JPG[/img][/url]



Languages used: BASH
Author / Contact: orvtech / http://twitter.com/m1n1m3

-- 
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-picasa-data-api?hl=en.

Reply via email to