|
|
Important notice: GDataCopier only works for Gmail accounts
Due to the recent changes in the way Google's document servers work, GDataCopier is known not to work in many instances if the account is not a Gmail account (e.g Hosted or external document accounts). Since we expect Google to change their the server side code consistently resulting in our scripts failing to work for non-Gmail account, the project has decided not to support non-Gmail accounts until the download feature becomes official in the Google API (refer to this posted issue).
Thank you for your interest in this project, and if you are interested in the download/backup feature please register your interest/comments on the Google Data API feature list.
Introduction
GDataCopier provides a command line tool called 'gdoc-cp' that allows system administrators to automate bi-directional copy of document between the local machine or Google document servers.
It also presents Python programmers with an API to incorporate document/spreadsheet download and import features into their applications.
GDataCopier requires the Google Data API to function.
Warning: GDataCopier is known to have issues with Google accounts that have never been used before, please ensure you have used your Google account via the web interface at least once.
For System Administrators
gdatacopier provides a 'cp' like command line tool allowing users to copy documents to and from the Google servers. Its designed to automate local backups of your Google documents and spreadsheets.
Examples:
Download all your Google documents and spreadsheets in PDF to a directory called files
./gdoc-cp.py --username someone@gmail.com --export pdf --google-id all --local files
To download all documents in OpenOffice formats, use the default format option
./gdoc-cp.py --username someone@gmail.com --export default --google-id all --local files
Or, to list all your Google documents and spreadsheets (note, the password is provided as a parameter)
./gdoc-cp.py --username someone@gmail.com --password password --list-all
To import a document to your Google Doc account
./gdoc-cp.py --username someone@gmail.com --import --local files/doc.txt --title "New Document"
GDataCopier requires Python 2.4 or above and the GData Python API 1.0.8 or above.
For Developers
GDataCopier is an API for Python programmers to:
- Download documents and spreadsheets to various formats
- Upload documents and spreadsheets from various file formats to the Google docs system
- List useful information about documents on the Google servers
This is done using placing various RESTful calls (documented in the Wiki) and extracting information from the Atom feeds via the Google Data API.
The API supports these functions for both Google and Hosted accounts.
Code example to export a document:
from gdatacopier import *
copier = GDataCopier()
copier.login("someone@gmail.com", "password")
copier.cache_document_lists()
copier.export_document("adocumentid", GoogleDocFormat.OOWriter, "files/something.odt")
copier.logout()The people behind GDataCopier
Note: GDataCopier is not affiliated with Google in anyway.
De Bortoli Wines is one of the largest family owned wineries in Australia and is committed to Open Source and Open Standards. Amongst other projects they funded the development of GDataCopier. Read their Wikipedia article to learn more.
Devraj works as the principal consultant for Eternity Technologies, an Open Source solutions company located in regional New South Wales, Australia and developed GDataCopier.
If you found GDataCopier useful and are feeling extremely generous then you may want to consider looking at Devraj's Amazon Wish List.


