Report abuse

Login to Google though HTTPS and dump out a Google Sites wiki
via the just liberated Sites GData API.

(c) hermantamas at gmail dot com


#!/bin/bash

LOGIN_TOKEN=`wget -qO- https://www.google.com/accounts/ClientLogin \
--post-data \
'accountType=HOSTED&Email=backup-user@company.com&Passwd=******&service=jotspot&source=sites-backup'
\
| grep Auth=`

wget -qO site-name.xml \
http://sites.google.com/feeds/content/company.com/site-name \
--header 'GData-Version: 1.0' \
--header "Authorization: GoogleLogin $LOGIN_TOKEN"


Used literature:

http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html
http://code.google.com/apis/base/faq_gdata.html#clientlogin
http://code.google.com/apis/sites/docs/1.0/developers_guide_protocol.html#AuthAdditionalResources