---
author: einar
comments: true
date: 2010-07-18 10:00:39+00:00
layout: post
slug: open-collaboration-services-and-kde-forums
title: Open Collaboration Services and KDE Forums
wordpress_id: 785
categories:
- KDE
- Linux
tags:
- forums
- KDE
- OCS
- python
---

For KDE developers, web-based forums are often uncommon workflows. Indeed, for communication among developers mailing lists are much better tools, especially since you can handle everything inside a client (most of the time), compared to forums where you have to use a web browser. The ways of reading, replying and interacting with posters are dramatically different. And that is why some developers find themselves uncomfortable with the [KDE Community Forums](http://forum.kde.org).

A dedicated application would be usually much better than a browser, because you can work around the intrinsic limitations of the browser itself. The problem is that you can't really access a forum with anything else than a browser. That is, it _used to be_ like this, but now things are changing.

In the past months fellow administrator bcooksley has been working quite hard implementing the [Open Collaboration Services (OCS) specification](http://freedesktop.org/wiki/Specifications/open-collaboration-services) in the KDE Community Forums. For the uninformed, it's the same API that powers [OpenDesktop.org](http://opendesktop.org) and related web pages. This means that you could access the forum contents programmatically using a REST API and parsing the XML that is returned by the service. 

Unfortunately, bcooksley had no time to implement a client that would make use of this newly-made service.

That's where I stepped in. This morning [I committed in the kde-forum-mods repository](http://gitorious.org/kde-forum-mods/phpbb/commit/471f6f7b4135d004be040c2bbd552b12451badfe) the first implementation of a backend to access the forums' OCS service. Currently it's extremely basic - just a few classes to wrap the XML responses into decent data representation, and a basic class to perform reading requests: that means that technically it is possible to request forum listings, thread listing, and posts. I'm still working on the ability of replying and posting messages.

Being a Pythonista, the backend is written entirely in Python: currently it uses the standard library plus [_dateutil_](http://labix.org/python-dateutil) and [_lxml_](http://codespeak.net/lxml/) to do its bidding, but the next steps would be to turn it into a PyKDE4 library to access all the KDE related goodness (hello, KIO!). Bear in mind that currently there is no application using this: I merely completed (part of) the backend. 

If you're interested, the code can be found on gitorious.org, in the _ocs-client_ directory, branch _experimental_,  inside the [kde-forum-mods repository](http://gitorious.org/kde-forum-mods).
