Google Docs plugin for Gnome Do
Here it is, my first plugin for Gnome Do: the Google Docs Plugin.I wanted to code a plugin for Gnome Do for a while, cause it so fantastic that you can’t resist the temptation to do some contribution. However, I did have a good idea until recently I was using Google Docs to organize a trip to Dresden/Prague and it annoys me a lot that every time I need to open Google Docs’s main page before I can start viewing/editing the document. Then I came up with this idea to let Gnome Do index the documents stored at Google Docs so I can access any file there by typing (only part of) the file name.After reading documentations of Google Data API and Google Documents List API, it seems not very hard to implement what I planned. More over, the API’s example code gave me another idea of adding the file upload feature to this plugin. Honestly, I know nearly nothing about Mono/C#, so it took me almost a day to figure everything out and finally finish it. Now I think that to start my coding by learning from the source code of Google Calendar plugin written by Alex Launi was a good choice made. Not only are the two plugins similar to each other because of they both use Google’s API, but also Alex’s code really gave me an clear idea how the structure of the project should look like.Regarding the plugin, it provides 3 features (so far):
- An item source that indexes all your documents stored at Google Docs in four different type: text document, spreadsheet, presentation and PDF. (actually I didn’t even know GDocs has supported PDF already)
- An action to upload your local files to Google Docs. Supported file formats are:
- txt, doc, html/htm, odt, rtf, sxw
- xls, ods, csv, tsv, tsb
- ppt, pps
- An action to “delete” a selected Google Docs item, meaning to move the document into the server-side Trash.
If you use Google Docs intensively for your document/spreadsheet/… needs and you use Gnome Do, this should be what you want to check out. Any suggestion/new idea/bug report is welcome and can be added by post a comment.
Source code + Binary
Download: http://dengpeng.googlepages.com/gdocs-1.0.tar.gz The project is created inside the “do-plugins” code tree, so you might have to check out the do-plugins project to compile my code. Several files in the do-plugins project need to be modified after you extract my source into do-plugins directory. E.g. configure.ac, Makefile.am etc. I suppose if you want to compile the file, you can figure it out easily, while in case there is any problem, let me know. The binary file includes the Google API’s DLLs, they are needed and should be extract together with GDocs.dll into I have made a branch in Launchpad for this work, and hopefully it will make its way to the official plugins soon. If you want to try it out, the best way currently is to check out the code hosted at Launchpad. Steps are:
bzrif you don’t have it.
- Checkout the do-plugins branch I created:
bzr co lp:~d6g/do-plugins/GDocs
- Enter the folder and compile:
cd GDocs ./autogeh.sh cd GDocs (again) make
- And copy related DLLs to
~/.local/share/gnome-do/plugins/and restart Do:
cp bin/Debug/GDocs.dll \ ../BundledLibraries/Google.GData.AccessControl.dll \ ../BundledLibraries/Google.GData.Client.dll \ ../BundledLibraries/Google.GData.Documents.dll \ ../BundledLibraries/Google.GData.Extensions.dll \ ~/.local/share/gnome-do/plugins/
(If you use the latest 0.6.0 code, the folder should be plugins-0.6.0)