Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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