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
- pdf
- 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.gzThe 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 ~/.local/share/gnome-do/pluginsI 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:
- Install
bzr if 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)
thanks man for this plugin. But I don-t know how I can install it on my Ubuntu System. Can you help me please ?
ReplyDelete@David, I've updated the post to include new way to build/install it.
ReplyDeleteHi, plugin looks like just what I need, I tried your install, but get an error when trying to "make" it... output is...
ReplyDeletealex@grysonweb:~/GDocs/GDocs$ make
mkdir -p bin/Debug/
gmcs -noconfig -codepage:utf8 -warn:4 -optimize+ -debug "-define:DEBUG" -out:bin/Debug/GDocs.dll -target:library './src/CertHandler.cs' './src/Configuration.cs' './src/GDocs.cs' './src/GDocsItem.cs' './src/GDocsDocumentItem.cs' './src/GDocsSpreadsheetItem.cs' './src/GDocsPresentationItem.cs' './src/GDocsPDFItem.cs' './src/GDocsItemSource.cs' './src/GDocsUploadDocument.cs' './src/GDocsTrashDocument.cs' '-resource:./GDocs.addin.xml' '-resource:./resources/gDocsIcon.png' '-resource:./resources/gDocsUploadIcon.png' '-resource:./resources/gDocsTrashIcon.png' -r:System -r:System.Xml -r:Mono.Posix -r:/usr/lib/gnome-do/Do.Addins.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/glib-sharp.dll -r:./../BundledLibraries/Google.GData.AccessControl.dll -r:./../BundledLibraries/Google.GData.Documents.dll -r:./../BundledLibraries/Google.GData.Client.dll -r:./../BundledLibraries/Google.GData.Extensions.dll
/bin/bash: gmcs: command not found
make: *** [bin/Debug/GDocs.dll] Error 127
Any help?! GDocs/GDocs/bin/Debug cotnains no GDocs.dll file.
@alex, it looks to me like you haven't installed some tools essential for development (compiling), maybe you should try `sudo apt-get build-dep gnome-do` first if you are using Ubuntu/Debian.
ReplyDeleteActually this plugin is already merged into the main pluging branch and will be available by default with newer release of GNOME Do. Which version of GNOME Do are you using btw?
Sorry, I should have added my details (a relative newbie here), my version of Gnome-Do is 0.6.1.0. But if the plug-in has been taken up that's great, congrats! (and thanks for the speedy response)
ReplyDelete