
Docsbox

I present to you a Python script that synchronizes documents between the Google Docs service and the directory on the disk, which in my case is the directory of the Dropbox service repository .
Source: github.com/k0sh/Docsbox
Installation
- Download and unzip the archive - github.com/downloads/k0sh/Docsbox/docsbox-0.1.zip
- Copy the docsbox.conf.example file to docsbox.conf and fill it with your data
- Install The Google Data Python Client Library (# easy_install gdata)
- Running the script: # python docsbox.py
Principle of operation.
First, the presence of the 'dropbox' folder (FOLDER parameter) is checked in Google Docs, if it is absent, it is created. A list of documents in this folder is requested. A search is made for documents (files with the extension .doc) in the specified directory (parameter BOX_PATH). Further, Google docs documents missing in the directory are unloaded from the service. Modified documents (those whose date of last update is not equal) are uploaded / loaded accordingly. Documents missing from Google Docs are uploaded to the service.
Known Issues
- If you delete a document in the Google Docs interface, then the next session, it will still load into it. (I have not yet figured out how to handle this situation)
- Only documents are synchronized (".doc")
PS1
It would be very wonderful if Dropbox had an API, then it would be possible to screw this script as a plug-in and everything would work on the machine, and not as it is now manually or by cron.
PS2
The author is not responsible for the software provided. Use at your own risk.