freesoftware, Kde, Planet

Some Fun with ktp-text-ui Plugins

KDE Telepathy 0.5 was released last month, introducing a brand new filtering plugin system for the text-ui. I didn’t have much time to work on KTp recently, due to my new job and to my new wife (no I don’t have an old one) but since in Randa people are slacking (evil grin), someone has to do some real work (laughing hard), so I’ve being playing a little with the text-ui and with the plugins.

Formatting Plugin

First of all, I fixed the formatting plugin. This allow you to format plain text, like Thunderbird Structured Text:

  • *this is bold*
  • _this is underlined_ (and not italics!)
  • /this is italics/
  • -this is strikethrough-

The plugin was disabled in 0.5 because it was broken (the regular expression detecting the tags to replace was not detecting correctly).
Beside fixing it, I modified it to avoid changing the text by removing the tags (i.e. ‘*’ or ‘/’). In this way, even though it might format some parts that user is probably not expecting to see formatted (for example some /*C comments*/), copy and paste will still work.
Moreover, I made it so that it will be very easy to add a configuration dialog to change its behaviour, so if you _really want this to be italics_, you will probably be able to configure it according to your needs in the future.

This plugin will be enabled by default in 0.6.

Syntax Highlighting Plugin

We often think about the final users, but sometimes we have to think about the developers 😉
So I wrote a syntax highlighting plugin using jquery-snippet

A few screenshots are better than thousand words, so…



Meanwhile David had another cool idea for the syntax highlighting plugin: include a kate part into the qtwebkit view (You can find some details about how he did that here). This is his result:

Both approaches work great, my approach is more integrated in the chat, but David’s approach is also quite interesting. We don’t know yet whether release just one of them or both… Opinions?

Anyway, in order not to try to highlight all the messages, at the moment code must be included in a block like [code lang='cpp']...[/code]. This can be a bit annoying. Moreover copying and pasting code in the chat-ui is boring. Something like pastebinit would be really useful. That’s why I started writing…

ktp-paste-contact

This a very simple tool but it is something I’m really proud of, and that shows the potential of Telepathy…
It is a simple command line tool that reads from stdin and sends everything as a single message to a telepathy contact.
it takes as parameters, the account to use, the contact to send it to, and an optional parameter --format <language>.
If this parameter is specified, then the message is automatically included in a [code lang='cpp']...[/code] block using the syntax specified.

A few ideas for using it…

  • git show | ktp-paste-contact --format diff --account <account> --contact <contact>
  • cat file.cpp | ktp-paste-contact --format cpp --account <account> --contact <contact>
  • echo "Hey dude, I'm so geek that I'm texting you from the command line" | ktp-paste-contact --account <account> --contact <contact>

You can find the code for the code-highlighting plugin in my clone repository for ktp-text-ui (kde:clones/ktp-text-ui/ddomenichelli/ktp-text-ui branch plugin-code) and for ktp-paste-contact on my brand new scratch repository (kde:scratch/ddomenichelli/ktp-paste-contact.git)

Enjoy it!


EDIT: I found a great way to convince your friend to block you! Perhaps it can be used against spammers 😛

while true; do echo "MUAHAHAHAHAHA" | ktp-paste-contact --account <account> --contact <contact>; sleep 5; done

freesoftware, Kde, Planet

KDE Telepathy at Akademy 2012

I'm going to Akademy 2012
I'm going to Akademy 2012

As you can imagine from the picture above, I’m going to Akademy 2012 in Tallinn, Estonia! Thanks a lot to KDE e.V. for sponsoring me.

This year at the conference there will be a lot of interesting talks but unfortunately none of them about KDE-Telepathy.

Instead we will host 2 BoF sessions:

Moreover most of us will probably attend at the Web Accounts BoF:

I can’t wait to see you all in Tallinn!

freesoftware, GSoC, Kde, Planet

KDE Telepathy in GSoC 2012

We had several good proposals related to KDE Telepathy for Google Summer of Code 2012, but unfortunately we only got 2 slots! But hey, we got 2 slots! That’s great! 😀 Thanks to Google for organising and sponsoring it.

The first accepted project is “Message Filtering Plugin System” by Lasath Fernando (shocklateboy92), the author of the chat plasmoid that will be released in KDE Telepathy 0.4. He will be mentored by David Edmundson and

“will create a completely asynchronous modular and extensible system that enriches messages before they’re displayed to the user. These includes embedding images and videos from links, Translating messages, (re)-formatting them nicely, reading out loud etc.”

The second project is “Enhancement to peer-to-peer DBus for Telepathy DBus Tubes” by Puneet Goyal. Puneet worked on the Payment Detection use-case of project Alkimia in Season of KDE 2011. I will be his mentor for this interesting project which aim is to make it even easier to use D-Bus Tubes from any KDE application:

“When an application connects to a peer to peer dbus tube, it must know what exactly to look for. Even When it registers for another object, the other side of the tube must know about it. So the ideas is to create a class that could ease the object to register and unregister on the DBus Tubes, and to provide you with an interface similar to the one as a DBus Server.”

We had to reject several good projects, because of the limited amount of slots, but if you are motivated to work on a project in KDE Telepathy you still have one chance[1]: Season of KDE (SoK)! SoK is similar to Google Summer of Code: you won’t be paid, but you will get a mentor, a very cool t-shirt and certificate! If you want to apply, you can have a look at KDE Telepathy ideas that we selected for GSoC but did not get a slot (“Telepathy setup for KDE multiplayer games” and “Collaborative editor“), check out some more ideas here or propose your own idea.


[1]Actually you have as many chance as you want to contribute even if you don’t want to take part to SoK! We have several junior jobs if you are (or want to become) a developer, and a few non-programming tasks that don’t require programming skill if you just want to help us!

freesoftware, Kde, Planet

Digikam Code Sprint @ Genova + Telepathy KIPI Plugin

This post was supposed to be published yesterday January 18th 2012, but I’m delaying it of 24 hours in support of SOPA STRIKE

Last weekend the Digikam Code Sprint was held in Genoa (Italy). Yes, I’m not a Digikam developer, but I live in Genoa and this was a very good occasion to implement something that I’ve being planning to implement for a long time: A KIPI Plugin for Telepathy. So before saying anything else, here is the mandatory screenshot:

Telepathy KIPI Plugin
Telepathy KIPI Plugin

Thanks to this plugin, you will be able to send your pictures and albums from digikam, showfoto and any other application using KIPI plugins. Most of all I wanted this feature in KSnapshot, and yes this is now possible.

This is something I already implemented in the past [1] but I must admit that having all the contacts in a menu was a bad idea, so I gave up at the time… So this time we have a widget instead that takes shows only the person that are online, that can accept a file transfer and there is a bar to filter by name (actually most of this is widget is “borrowed” from Telepathy Send File, written by David, so credits for that go to him). I think this solution is much better than the menu, but comments are very welcome.

Unfortunately the widget won’t be in KDE Telepathy 0.3 so you will have to wait for the 0.4 release, and then you will have to wait for the kipi-plugin to be reviewed by the digikam developers… Meanwhile it will reside in my clone repositories (I will update this post with the links as soon as the code is available)


P.S. Thanks to ALID (especially to Angelo, Stefano and Claudio) and KDE e.V. for hosting, organizing and supporting the event and to all the Digikam developers.

freesoftware, Kde, Planet

KDE-Telepathy + Service Monitor

Today I found this plasma applet named “Service Monitor“, I thought it could be useful to monitor telepathy services, so I played a little with it and I wrote a couple of XML files containing definitions for Telepathy and KDE-Telepathy services, and here is the result:

KDE-Telepathy Service Monitor
KDE-Telepathy Service Monitor

I find it quite useful, it allows you to choose the services you are interested in among the ones installed, monitor which services are running, start and stop them from the applet.
Moreover thanks to that I already found a bug in the auth-handler that doesn’t exit when it is supposed to do so, so I’m sharing the xml files hoping that they can be useful for someone else. If you are interested you can find them here: git://anongit.kde.org/scratch/ddomenichelli/telepathy-service-monitor, you just import the xml files from the “Manage Sources” tab in the config dialog for the applet.


P.S. All credits for Service Monitor go to the original author.

freesoftware, Kde, Planet

KDE-Telepathy Sprint (aka Woshibon) 2 – Day 3

Today was sadly the last day of the sprint. We had some more discussion, a short course by grundleborg about unit tests, a short walk around Cambridge after launch and a lot of hacking. Moreover we decided the new features that hopefully will land in the next release. We have a list of 22 cool features that we we want to implement before the 8th of October (soft freeze for Tech Release 0.2). And this list doesn’t include the stuff implemented and all the bugs fixed after the 0.1 release. Unfortunately audio and video call won’t land in the next release due to dependency problems (but if you are brave enough you will be probably able to compile the dependencies and the audio call ui from the git repository), and Nepomuk integration and contact merging will be delayed some more. However we will have drag and drop of contacts from the contact list to the desktop, integration with kwallet (a little hackish for the moment but that’s all we can do until the secret service will be integrated in kde), a new auth-handler for handling passwords and ssl certificates, auto away and now playing system, desktop sharing with contacts, and much more. Finally we will have some small changes in the git repositories and we plan to release the 0.2 release both as a set tarballs (one per module) and as a single tarball to help packagers in their work. We really believe that the next release will be awesome!

A few conclusive random thoughts about the sprint:

  • We were the same number of people last year at the sprint. However in the last year the team gained several new important members!
  • Opening new bugs is something that grundleborg can do damn fast.
  • Sprints are really funny, and at the same time you get a lot of work done.
  • Help is always needed! If you want to contribute, please join us on #kde-telepathy
  • I won’t to wear the same shirt for the next sprint. (See here).
  • Brasil and Australia are really far.
  • Of course thanks again to Collabora and KDE e.V. for sponsoring the event.
  • Nepomuk shall not die! Please support trueg and the Nepomuk project!

P.S.: Visa is something that should be abolished.
P.P.S.: You don’t want to mess with Thor.

freesoftware, Kde, Planet

KDE-Telepathy Sprint (aka Woshibon) 2 – Day 2

Very busy day, lots of things to do, bugs to fix, new feature to implement…
But first of all thanks to Collabora and KDE e.V. for hosting and sponsoring the event and the pizza yesterday!

The morning started with several important stuff, discussions, etc. but around launch time the situation was this:

Almost all tasks and discussion completed!
Almost all tasks and discussion completed!

Of course nobody will ever be able to satisfy the last! (I’m kidding, thanks alin for testing and reporting bugs :D)

In the afternoon we started implementing some of the features that we are planning for 0.2 release and we got some impressive results!

  • nwoki fixed the audio call
  • d_ed (also known as “the release manager”) implemented drag and drop of contacts to plasma desktop
  • mck182 implemented the auto away system
  • woshibon is now the official name for KDE-Telepathy sprints
Woshibon group photo
Woshibon group photo

We had dinner at an indian restaurant and mck182 definitely ate something too spicy for him

Vindaloo is too spicy for mck182
Vindaloo is too spicy for mck182

At the moment the hacking is still going on in the lobby of our hotel, 5 people are connected to the internet using d_ed’s android phone as an access point… that’s cool!

Tomorrow is the last day of the sprint and the list of the new features in the 0.2 technical release should be available before the end of the day, hopefully together with some new features and perhaps a screencast?

freesoftware, Kde, Planet

KDE-Telepathy Sprint 2 – Day 1

KDE-Telepathy Sprint 2 is officially started!
Everyone is so excited that we came to Collabora office too early and we were locked out! So while waiting someone started hacking…

Hacking outside Collabora office
Hacking outside Collabora office

Someone else spent his time in other ways…

d_ed juggling bananas outside Collabora office
d_ed juggling bananas outside Collabora office

Today we covered several topics and a lot of decision were taken:

  • Nepomuk
  • Licensing
  • CMake
  • Git
  • Logo and missing icons
  • Libraries/git submodules
  • GStreamer and Farsight
  • Chat UI Plugins
  • Launch and dinner

And most important of all:

  • Releasing Tech Preview KDE-Telepathy 0.2

This release still won’t be including any Nepomuk integration and will be mostly for the hundred of bug fixes shipped after the 0.1 release + some new cool feature.
This is the plan:

  • 18 September: Feature freeze! That means that we will decide all the features and the components that will be decided at the sprint. We will start the 0.2 branch on all the repositories
  • 8 October: “Big” Freeze (Strings will be frozen, translators will be able to start the translation, etc)
  • 30 October: Release

If you want to know more about what is happening at the sprint you can find some more pictures of the sprint here (I will continue to update it) and you can Follow real time updates #kdetpsprint on twitter and status.net


P.S. A big hug to vHanda who wasn’t able to join us because of visa problems… That sucks!


EDIT: More pictures by mck182 here

freesoftware, Kde, Planet

KDE-Telepathy Sprint 2 – Day 0

KDE-Telepathy isn’t officially started yet, but most of the team is already here, in Collabora office in Cambridge.

We have a very long Agenda for the sprint, and more todos are now on the whiteboard therefore all the people already started hacking.

Almost everyone is already at work
Almost everyone is already at work

While waiting for other people we also played the analogical version of KHangMan, also known as Hangman, but nobody managed to figure out this one:

G_O_E? We couldn't figure this out
G_O_E? We couldn't figure this out

Looks like it will be a pretty interesting sprint! Stay tuned.

freesoftware, Kde, Planet

KDE Telepathy 0.1 released! Part 4 of 5 – File Transfer Handler

Sorry, no fancy UI for this component.

This is a small module (nonetheless quite painful to test) that just handles file transfer, nothing more and nothing less (even accepting/refusing file transfer is a task for the approver, therefore it is not handled by this module). You won’t usually see anything, except a kjob running in the notification area and some info messages. The handler will be started automatically when a new incoming/outgoing file transfer should be handled and will exit (if no other file transfer channels are received) a few seconds after finishing its job.

The cool thing is ANY program from your desktop can just request the file transfer! Telepathy Mission Control will assign the file transfer channel to the file transfer handler, that will take care about transferring the file to your contact.

To demonstrate that it works, here’s a screenshot!

Transfer Completed! (Yes, it works sometimes)
Transfer Completed! (Yes, it works sometimes)

Ok, I admit that the screenshot is ugly and useless 😀

It still has several issues, first of all at the moment it just works (sometimes) with gabble (Jabber/XMPP) and salut (local link), because the other connection managers don’t support the URI property, therefore the handler will receive the channel, but won’t know which file should be sent. David fixed this for butterfly (MSN) but the patch was not integrated upstream yet. Moreover, for some reason it doesn’t work every time, failure reports (but also success reports!) are very appreciated! (You can use the bug tracker to report a new bug, attach the information to an existing bug or ping me on #kde-telepathy). Please attach to your reports the log from the file transfer handler (you can see the log running on a shell “telepathy-kde-filetransfer-handler --debug --persist” before starting the file transfer) and possibly the accounts that you and your contact are using (not the whole uid but at least the server “@xxxx.xx” part).

Note: When file transfer fails you will probably have a job running in your notification area that is impossible to remove unless you logout or remove the notification area from your system tray and re-add it. That’s a known issue, I’m working on it. Sorry about that.


File transfer handler comes together with a dolphin plugin! You will be able to send files just by right clicking on the files from dolphin:

Dolphin Plugin
Dolphin Plugin

This will open a dialog where you will be able to choose the recipient.

Send File Dialog
Send File Dialog

Sorry, sending multiple files and multiple recipients are not supported (yet).


By the way… Yes, I’m going to at Desktop Summit in Berlin!

I'm going to Desktop Summit - Berlin 2012