KDE Google Reader

I've made a big progress with the upcoming libkgoogle 0.3 last weekend on the Fedora KDE SIG meetings which took place in Brno. I then decided to take some rest from all this Google things and wanted to relax by working on something else. But then I remembered that some time ago I experimentally implemented the Google Reader API and...well, see for yourself.

Standalone KGoogleReader

Originally I wanted to implement my own caching mechanism for the feeds, but I soon realized that I would be just wasting my time when there already is something as cool as  Akonadi.

I have written a simple Akonadi serializer for the data (took me about 20 minutes) and an Akonadi resource (that took me about 40 minutes to write). Finally I begun to write the client.

The client itself is very simple, it essentially only fetches list of streams (for those unfamiliar with Google's terminology, stream == RSS feed) and their content from Google Reader and is able to update 'read' flag of one or more items. You can't add or remove streams (maybe later).

Note: Do not try to "mark all as read" if you have too many unread items. The resource is sending a HTTP request for every single item (will be fix later, maybe...).

But hey, what's the difference between reading your feeds in a browser window or in a silly desktop client. To increase the level of (my) awesomeness I've made a Kontact plugin as well:

KGoogleReader integration with Kontact

Btw, does anyone know how to change order of the items in the left pane? I'd like to have the reader where Akregator usually is :)

In the first sync, the resource fetches up to 200 latest items form each feed (I think that's a reasonable amount), then the updates are incremental. There is no progress indication, so just be patient.

In a way it is a "replacement" for Akregator  (but it lacks almost all of it's features :-), so actually it's not...). I suppose you don't need to have local feeds in an RSS client when you can interact with feeds on Google Reader directly. On the other hand, it's not a serious project, more like a preview or demonstration of power and awesomeness of the KDE technologies  (it's so simple to use Akonadi!) and all the people behind it. When libkgoogle 0.3 is out and stable, I'd like to dedicate some time to help with the Akregator port (if it's not finished until then), so this project will just rot in git, forgotten.

As I said, this is more of a tech preview, definitely not something for daily use. I won't be spending much time working on it, but of course, feel free to clone the repo (see below) and contribute.

How do I get this?

1) You have to use libkgoogle from the experimental "reader" branch. This branch is rebased against the development branch of what-will-become-0.3, so it's completely incompatible with the current resources from master branch.

$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_calendar=FALSE -DBUILD_contacts=FALSE

I recommend to install libkgoogle to some other prefix then /usr so that it does not conflict with the stable libkgoogle library, but if you feel brave enough, you can try to compile the branch with calendar and contacts resource as well, since they are mostly finished and working (and I would appreciate some feedback before releasing it).

2) Compile the Reader. The repository contains all the stuff - Akonadi serializer and resource, Kontact plugin, KGoogleReader KPart and KDEGoogleReader application (sorry for the KDEGoogleReader vs. KGoogleReader inconsistency, I couldn't decide how to name it so I was mixing both names :) )

$ git clone git://gitorious.org/kgooglereader/kgooglereader.git
$ cd kgooglereader
$ mkdir build && cd build
$ cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DLIBKGOOGLE_LIBRARY=/usr/local/lib/libkgoogle.so -DLIBKGOOGLE_INCLUDE_DIR=/usr/local/include/
$ make
$ make install #as root

Remember to replace the path to libkgoogle by wherever you have installed it. Now you should have kdegooglereader executable installed and when you restart Kontact you should see "Google Reader" in the left pane as well.

Well, I hope you like it :)

Akonadi Google Resource: what's comming?

It's been a while since my last blog about the Akonadi Google resources and since my last contribution to the project (except for a few minor bug fixes lately). Today I decided to change it (at least the former) and show you that the project is still active (I just don't have much time to work on it) and reveal to you what big changes I plan to do in the near future.

There are two questions people are often asking me: if it is possible to support multiple Google accounts and why are calendars and tasks split to two resources. If you are one of those people, I have good news for you: next release will support multiple Google accounts and the Tasks resource will be merged to the Calendars resource.

Because words are plain, I will rather show you some pictures of how I imagine the resources could look like.

The first image is the new preferences dialog for Calendar resource. In the first list, there will be list of all accounts. The list will be common for all resources, so you will see the same accounts in the Contacts resource as well. Below is the list of calendars for the selected account (the list will auto-update itself when you choose another account + there will be something like "Reload" button to update the list by hand) with possibility to create, modify or remove existing calendars not just from Akonadi, but from Google server as well. The last list view is for task lists.

The second image shows how the calendar editor could look like. The are two things I want to change yet: replacing the wide color combo box by a single button which will popup another dialog with list of colors to pick from (according to docs Google supports only limited set of colors for calendars) and I'd like to have the timezone list displayed as a combobox instead of a tree view. The editor for task lists will look similar.

Regarding editor of accounts, clicking on "Create" will simply display the Google login page, same as it does now when you click on "Authenticate" in the resource preferences dialog. Given second thought, the "Edit" button does not make much sense since you can't change anything (maybe just the name of the account), "Remove" will just revoke the authentication.

And finally, on the last image you can see how the list of calendars in KOrganizer could look like. Each account would have sublist of calendars and tasks lists. The image is very inaccurate (copy&paste in Gimp :)), only calendars you have selected in the "Calendars" list in the preferences dialog will be displayed in the list and there will be task lists displayed as well (again, only the task lists you choose in the preferences dialog).

So, do you like it? :) I don't have much time now and collage exams are closing in, but I hope to find some time during Christmas and as I know myself I will be hacking this new features all January instead of learning for the exams :)

And just to list some improvements since last time: we now support categories for calendar events, information about contact group membership is synchronized (you can't yet move contacts between Google's contact lists, but at least the resource does not automatically remove your contacts from the lists) and some issues with timezones and daylight saving were fixed.

And finally (I almost forgot about this) some more good news, especially for Fedora users: I've created a project in OpenSUSE Build Service, so you can add a repository to yum to have access to fresh Akonadi Google resources :) I'm will rebuild the packages after every important git commit, so you will be still up-to-date.

Fedora 16:

http://download.opensuse.org/repositories/home:/progdan/Fedora_16/

Fedora 15:

http://download.opensuse.org/repositories/home:/progdan/Fedora_15/

The project itself is available here:

https://build.opensuse.org/package/show?package=akonadi-google&project=home%3Aprogdan

Fell free to modify the .spec file to support other distributions as well, I don't have much skills in packaging .specs for anything else but Fedora :)

And if you just want to build the project from sources, you can get them from akonadi-google repo in KDE git:

git clone git://anongit.kde.org/akonadi-google

Cheers,

Dan

UPDATE:  In OpenSUSE, you can find snapshots in the KDE:Unstable:Playground repository:

https://build.opensuse.org/package/show?package=akonadi-google&project=KDE:Unstable:Playground

Akonadi Google Resource: Tasks support

Hi!

As the title says, I just added support for Google Tasks by creating the Akonadi Google Tasks Resource. The Tasks API provided by Google is really simple and does not support many properties, only name, summary, due to date, completed date and status. You can't set progress percentage, start date, attendees nor reminders (this sucks!). Despite the fact, that the API provides means for tree-like structure of tasks (tasks and subtasks), it does not seem to work. So you can only have a linear list of tasks. A positive thing is, that due to this limited functionality of Google Tasks the resource has a full support of this API.

The reason for independent resource is that you can have multiple task lists in Google Calendar, thus merging this functionality into Google Calendar Resource is not an option. Unfortunately, you will now have the tasks resources displayed in the list of calendar resources in KOrganizer.

The second and very important update is, that we now have a product in KDE Bugzilla, so you don't have to report bugs in comments here. The product is "libkgoogle" so you can report bugs or whishes here: https://bugs.kde.org/enter_bug.cgi?product=libkgoogle&format=guided.

If you think you have posted a request/report under an earlier blogpost and I still haven't responded/fixed/implemented your request, please report it again in the bugzilla.

Sorry, no screenshots today :)

Bye!

Akonadi Google Resource Complete Rewrite

--- layout: post title: 'Akonadi Google Resource: complete rewrite' date: 2011-08-21 00:39:18 +02:00 categories: - Akonadi Google - KDE tags: - Akonadi - Google - KDE - PIM

Hi there,

today I finally pushed a completely new version of the Akonadi Google Resource. Since last update cca 2 months ago I've completely rewritten the resources, moving most of the functionality into libKGoogle . The library now provides access to Google services and can be easily used by any other project. So what's new? A lot of things changed for programmers. I've begun to fulfill my threats about providing a C++/Qt library for accessing Google Services. It's not pure Qt, I'm using some KDE stuff in there, but that will change :)

LibKGoogle now provides API similar to QNetworkAccessManager (KGoogleAccessManager) through which you can send KGoogleRequest and if it works, you'll receive a KGoogleReply. Each Google Service is represented by a KGoogleService subclass, implementing XML and/or JSON parser and serializer and providing informations about fetch/create/update URLs. Each object (contact, event, calendar) is represented by KGoogleObject subclass. For now, Event class is implements KCalCore::Event as well,  the Calendar and Contact classes provide their own implementation of everything. Porting it to KABC/KCalCore is on TODO.

libKGoogle provides unified authentication  framework and stores the tokens in KWallet. For now, you can only use one account per service (means that you can't have two calendars from two different Google accounts), but this is on my TODO as well. The framework is also able to automatically refresh the tokens when they expire, so that should fix the problem with "resources forgeting the authentication".

The API needs some more polishing and I must somehow force myself to write documentation, but the I think the libKGoogle can provide a solid base for any Google-related services.

The library is still in the same git repository with the Resources. I will try to move it to it's own repo when it gets support for more services and the API will really stabilize.

Contacts Resource new Settings DialogContacts Resource new Settings Dialog 2From users' point of view, there is just a very slight change in Contact Resource settings dialog. There are no new features in any resource. Though there are probably many new bugs :F So please try it out and don't be afraid to spam me with any issue, idea, problem, comment, invitations to a beer etc...:)

With libKGoogle I hope more developers will begin to create Google-related applications for Qt and KDE. This library could one day be a good start-point for them.

Plans for future versions:

  • support more contacts and event properties
  • support multiple Google accounts per service
  • changing contact photos
  • tie KGoogleObjects to KCalCore and KABC
  • API cleanup
  • DOCUMENTATION :/
  • make the libkgoogle optionally KDE-independent (long-term plan)

Akonadi Google Resource, part III

It's been more then two weeks since my last update about progress on Akonadi Google Resource, so here we go. Many bugs in calendar were fixed, resource now supports creating and editing events and Contacts resource can fetch contact photos.

So let's start with the contacts. I've implemented fetching photos from Google Contacts, so now you can see all your contacts smiling at you from your address book. Updating/removing photos is on to-do, but there are more important things to be implemented/fixed first.

Now to calendar resource: you can now finally create and edit events from KOrganizer. I've also fixed some issues with timezones, recurrence and reminders, so it really seems to work pretty good now. What has to be done are timezones in recurrence. I've also implemented removing of events, but there seems to be some hidden problem somewhere, because Akonadi refuses to invoke itemRemoved() signal, thus informing the resource, that event was removed and the resource can't send deletion request to Google Calendar....I hope I'll get to look into this this week. Of course, if you feel you can do something about it, just send patches ;)

Known bugs: except for the broken deleting of events there is a problem with authentication. Google only remembers the last authentication token it has issued, so when you have two Calendar resources for example, Google will accept requests only from the one you added as second. When you re-authenticate the first calendar, Google will forget access token of the second calendar and vice versa. Using KWallet to store the access token would be probably the best way how to share a single token among multiple resources and of course it would increase security a lot, but I need to learn how to do it first :).

And finally, about future of this project...I was in contact with developer of the original Akonadi GData resource (now called Akonadi GCalendar & Contacts resources) and we agreed that it would be nice to have a C++/Qt library for full support of GData API (including other services, not just calendars and contacts). I will be slowly moving all the GData-related code from resources to a separate library. My idea is to provide a pure-Qt library with optional KDE extensions (like conversion to KABC or KCalCore objects), which could be enabled during build-time, so that the library could be KDE-(in)dependent, depending on developers' needs. But this will be content of an another blog post, maybe later when things will begin to move. Now is my priority to improve the resource, because the Akonadi-related code is minimum compared to GData-related code which can be later dragged into the library.

So, that would be all for now, please test the resource and give me some feedback :)

Cheers,

Dan

Akonadi Google Resource 0.2

Hi,

so it's been almost ten days since first version of Akonadi Google Resource and now here comes 0.2. This version introduces Google Calendar Resource, so that you can finally access Google Calendar from comfortable interface of KOrganizer.

UPDATE: Akonadi Google Resource is now in KDE git repository!

Preview of Google Calendar Resource settings dialogAs of now the resource supports read-only access to calendars, so you can just watch your busy schedule, but you still have to update it in GMail. Some basic write support is the main goal for version 0.3.
A good news is, that the resource supports multiple calendars, so you can finally see all your calendars in KOrganizer, not just the default one. You have to add a new resource for each calendar you want to access. In configuration dialog you can then choose, which calendar you want to sync with.
The resource supports, except for the basic properties, multiple attendees, including their roles and types, recurrent events (but without exceptions) and reminders (popup-dialog and email notification).

As I already said, in 0.3 I'd like to introduce read-write access to Google Calendar and add photo-fetching to the Contacts resource.

If you want to give it a try, you can download 0.2 tarball from here, or you get the most recent sources from git:

 git clone git://gitorious.org/akonadi-google/akonadi-google.git

Bye!

UPDATE: Akonadi Google Resource is now in KDE git repository. To fetch it, use:

git clone git://anongit.kde.org/akonadi-google

Google support in Akonadi, part I

My job as a Red Hat internet is development of Evolution, the groupware software. Although I'm using Gnome 3 and all the Gtk stuff in work, I'm still loyal to KDE on my personal laptop. But one thing I really like on Evolution and I really miss in KDE PIM is proper support for Google services. As result of this and after some talking with my flatmate, I started to work on real, fullfeatured Akonadi Resource for Google Services.

At this moment, after about week of work I have working Contacts Resource. It can fetch, create, update and remove contacts from Google server using their GData API. The implementation of GData protocol is far from complete, as of now only few basic values are supported (name, emails, phones, addresses, notes).

Since this implementation is actually "working", I've decided to release it as 0.1.

Version 0.2 should bring basic support for Google Calendar and most probably some major refactoring of libkgoogle. Following releases will focus on improving support of GData protocol, including fetching of contacts photos.
I have to mention here, that the code is inspired by code of the great Akonadi Facebook Resource, because this is my first Akonadi-related code and I really need something to learn from :)

There are no screenshots worth posting at this moment, you rather try checking out the sources, maybe sending some patches back, what do you say? ;)
Sources are available in Gitorious: http://www.gitorious.org/akonadi-google, clone URL is git://gitorious.org/akonadi-google/akonadi-google.git.

UPDATE: the project is now hosted in KDE Git repo on https://projects.kde.org/projects/playground/pim/akonadi-google.

My Top10 Sci-Fi shows

As maybe not mentioned anywhere in this blog, I'm also a big fan of scifi series. I've been to Festival Fantazie, first in summer 2010, then again in autumn. By that time I've already seen some series, but it really encouraged me to see more. I was talking about publishing my top-scifi chart and to-see list, so finally here it comes.

Seen series

I created the list of following shows, so the best (for me) series are on the top. As time goes, I'll be updating this post, moving series from to-see to this list.

1. Babylon 5

I haven't seen the last two seasons yet, but I can already place Babylon 5 on the second place. First place be it! In many aspects it's better then FarScape, but on the other hand, it lacks the proper kind of humor and universe I was used to from FarScape (I've seen FS just before B5). First I was afraid that I won't like all the talking and politics involved, but actually that's the thing which keeps me at the series. And Sheridan, of course :) There's nothing our brave captain couldn't solve. I'm looking forward to see the last two series in hope, that Ivanova will get more space, becuase I think she's absolutely amazing.

Update 2011-04-25: So I've finished B5 last week. I really missed Ivanova in season 5, but the more happy I was when she appeared in the last episode. The final two parts were really moving and really awesome. B5 is now my #1 show. I'll really miss the guys.

2. FarScape

So, to explain this a little. I knew both Ben Browder and Claudia Black from SG-1, but I was really surprised. Crichton is much better written then Mitchell, and Aeryn is absolutely something different then Vala. First season was somehow boring, it really didn't took me in. But with Scorpius entering the show on full-time I just become to love the series. I've seen seasons 3 and 4 within one month (which is actually quite a short time for me!). The Peacekeeper Wars miniseries were very very good and led to a very good final, but for me, personally, the best final ever has BSG. Also, FarScape has absolutely the best Universe I've seen in scifi series.

3. Doctor Who 2005

Hey, Tennant is my Doctor! When I finally became to like The Ninth Doctor, he just changed and David came in. It took me about two episodes to get used to him and I become to love him soon. He's the best, ever will be. Smith is barely adequate follower for Tennant.

The idea of the entire Doctor is simply brilliant, they couldn't have made it better. There are only two big fails in the Doctor: Moffat and Smith. I don't like Karen either, but at least she's pretty :) Talking about companions, Rose is the best one for me. I don't think that Moffat is a bad writer and Smith bad actor, no. They're both very good, I just don't like their new style of Doctor. Well, let's see how it will change in season 6 this year, otherwise I'll have them all exterminated.

Update: season 6 was...hmm...avarage.

4. BattleStar Gallactica

BSG was my first really-scifi (SG-1 does not count). Second season was absolutely the best, I've seen it in one day, I just couldn't stop. The third season, on the other hand, was the worst - just boring. It was not bad, but it just didn't have the action and speed of the previous season. It is a very very good show, and the final is simply the best I've ever seen (yet). Strong, well done and absolutely unexpected. My favourite characters were admiral Adama, Kara and Chief. Unfortunatelly Kara and Cheif changed a lot and at the end their characters were, at least weird.

5. Firefly

Firefly! It will run for years...well it didn't because of the idiots in Fox, but still, it is a great show. It is very original - western scifi, duh! Nathan is a great actor and made watching the series a great fun for me. And I HAVE to mention Morena too. I've seen her in two or three episodes of V (haven't seen more yet) too and she's still so damned hot!! :) It's quite short, you can see it over night (or three nigths, like me) and it is definetely a must-see. And there's one more reason to see FireFly, and that's Jewel Staite and her smile.

6. Torchwood

I say TORCH, you say WOOD! This Doctor Who spin-off is a great for relaxation. It's very lamer but that's what make it so fraking awesome. I was quite surprised actually that a british thinkg can contain so lot of homosexuality, but it's the best they could've done. Harkness, being all-sexual, giving it with everyone and  everything..duh! Torchwood is so great because it's so lame - simply as that. If you don't have nothing else to do or see, you definetely go for this. I'm just little worried about the fourth season, which was shot in US.

Update: season 4 was cool - Gwen with bazooka? Go Torchwood, go!

7. Stargate SG-1

Stargate is a greate phenomenon, but in total, it's a nonsense. How it comes that everyone in the entire universe speaks English :)? It's very long and I really liked only the first five or so series. Oris could've been a good revival for the series, but unfortunatelly it was cut too soon. SG-1 is important for me in one way: it was the first sci-fi series I really begun to watch. And I don't regret it, because it moved me further, to BSG.

8. Stargate Atlantis

New, fresh and good idea, acutally a spin-off from one of the storylines of SG-1. Torri Higginson is a great leader (and actress of course!), and I really missed her in the fourth and fifth season. It's not the best scifi ever, but it's something worth seeing. But only when you've seen all the other series.

9. Startgate Universe (season 1)

Yet another SG spin-off. The only SG-related thing is the gate, but there it ends. It's not bad - they've met aliens and they have secrets (especially Rush). I've seen few episodes from the second season and it seems to be good, I'll know more when I see all. The first season was very unbalanced I think. There were very very bad episodes, followed by two or three weeks long pause and the came two abso-freakin-lutely awesome episodes.

10. Red Dwarf (I really must see it again)

Red Dwarf is not 10th because I wouldn't consider it a good (good? Awesome!) series, but because it's much more sitcom then sci-fi and because it's a long time I've seen it and I really must find some time to see it again. Jokes and quotes are simply legen-wait for it-dary!!

To see

So here comes the the "to-see" list of scifi series:
  • Star Trek
  • Caprica
  • Stargate Universe, season 2
  • Pioneer One (soon as there will be more episodes)
  • Red Dwarf
  • V

The order is random, just as I recalled the shows. What I can say now is, that I will probably give V second chance when I'm finished with Babylon 5, followed by Caprica and SGU S02.

I hope I didn't forget any series. I will try to return to this as soon as something changes. For now, I think it's quite enough :)

KDE 4.6 beta preview

Based on KDE 4.6 beta 1 release last week, I decidedI to test the latest KDE snapshot 4.5.82 and here are the news I've found in there :) I haven't been using development snapshots I'm creating every week for ArchLinux regularily last few weeks, since I'm mostly on Fedora now, so the changes are now more obvious for me.

First interesting thing I noticed already in KDM. In the list of available desktop environments, there's no longer any "KDE", but it's KDE Plasma Workspace!

The first thing after login I was going to test was the new, aesome and almighty Akonadi. Well - it's cool, I really like that. On the other hand, I think it's quite slow on my 2x1.5GHz laptop. Loading 6k mails takes considerable amount of time after the KMail starts. I hope this will get fixed soon or later (most probably later :).

Next think I checked was KAdressBook. I hoped there will be an Akonadi Resource for something like sync with GMail contacts and calendar, but I haven't find anything, so I will probably have to write something myself :)

Unfortunatelly, Akregator does not store feeds and their content in Akonadi database, which was something I hoped for since I first heard about KDE PIM2 migrating to Akonadi. It's not a great feature, not definetelly usefull for any resource integrations (you really don't need to access your feeds from other apps, unless you are writing something better then Akregator), but I'd like to see all the PIM stuff stored in one DB, which would really simplify backups and improve portability (when you are migrating between more PCs, possibility to simply take with you just one DB file would be a nice feature).

A really great feature, a very appreciated one is the "Grid desktop" (Desktop Settings -> View -> Layout -> Grid Desktop). When you are dragging an applet on you desktop, a grid is displayed allowing you to position the applet and after you drop it, the applet is automatically aligned to grid.

When you move mouse to a screenedge, a bar with + and - buttons appears allowing you to change the density of the grid.

The new grid functionallity is further extended by applets groups. You can create widget which contains tabs. In each tab there is a grid and you can put multiple applets into the grid. Another cool feature, don't you think? I wish there were more usefull applets like this, instead of something like KDE Observatory.

However I still found some issues with this applet, mostly when you try to insert a widget which is bigger then the Group widget, it somehow overflows.

When we are talking about Plasma, I must mention Activities. It's a very cool feature, but it's not used a lot. Probably because they still were unperfect, I personally for example really minded that the activities were all named like Activity #1, Activity #2...now finally you can finally name your activities as you wish and they are more stable.

KDE 4.6 is also a great step toward HAL-less KDE. The PowerDevil has UPower backend now, but it's not yet enabled by default, HAL is still preferred, because it provides more features, but it's possible to already use it for watching battery/AC state and scaling CPU, but some features are slower then with HAL. UDisk was also implemented in 4.5.73 bringing support for mounting devices without HAL.

KDE 4.6 will be another great release in the KDE4 series, I'm happy to see KDE still evolving and moving towards modern and fast desktop environment.

Czech version (not exact translation) can be found on my blog on ABCLinuxu.cz.