Message Filtering Plugin System
Short description: Create a completely asynchronous modular and extensible system that enriches messages before they're dispalyed to the user. These includes embedding images and videos from links, Translating messages, (re)-formatting them nicely, reading out loud etc.
Email Address: email@example.com
Freenode IRC Nick: shocklateboy92
IM Service and Username:
Google Talk (Jabber) : firstname.lastname@example.org
Location (City, Country and/or Time Zone): Sydney, Australia (GMT+10)
To have a functioning, dynamic set of plugins that process chat messages, and enrich them in some way before displaying them to the user. They will be shared between the KTp-Text-Ui and KTp-Chat-Plasmoid and KTp-Log-Viewer and be easily reusable by any future component that displays text.
These messages will be ‘enriched’ in the way of :
- Web Integration
- Bookmarks - automatically make bookmarks of recieved links
- Image - embed previews of links to images in chat
- YouTube - embed or generate previews for youtube links in chat
- Bugzilla - (or other KDE specific stuff) show title and description of link to bug
- Wikipedia - Embed first paragraph (and image) from links to Wikipedia
- Description - Embed title and image (like facebook and google+ does when sharing) of an any incoming link.
- Mailto - Replace email addresses in messages with appropriate mailto: links.
- Translator - translates incoming and outgoing messages to predefined languages
- Jouvie plugin - option to automatically read out messages
- Pipes - pipe messages through external program
- Auto-Replace plugin - replace user defined keywords in messages
- Search Commands - replaces commands like ‘lmgtfy:dbus tubes’ with ‘http://lmgtfy.com/?q=dbus+tubes’ before sending.
- Enhanced Display
- Highlight - highlight messages based on criteria
- Latex - renders incoming latex in window
- GTalk Formatting - turn “_this_ -or- *this*” into “this or this”
I plan to develop quite a bit during this project. I want to learn how to (and have experience) make an extensible framework based on plugins; I want to learn how to make efficient, intuitive asynchronous APIs as well is further improve my programming skills.
I also want to develop my Project Management Skills: While I’ve hacked on various projects in my spare time a lot, I don’t have experience working on a ‘project’ with clear set goals and a deadline.
However, the most significant factor in my motivation for doing GSoC was that I wanted to improve my time management skills. I feel don’t have experience effectively balancing my time between multiple commitments. I.e. I’ve never done more than one important thing at a time. I feel that juggling a full workload at university and doing summer of code will teach me valuable skills in managing my time.
The reason I chose KDE, was because it’s my primary DE (and has been for over 2 years). I felt I should start giving something back and started contributing a few months ago to KTp. The team has been absolutely awesome and I’ve gotten to know them quite well over this time. The reason I chose this project specifically was because I use KTp on a daily basis and II felt that its text-ui could offer more metadata and display its messages in a much richer form. This would not only make it more engaging to the user, but will give back its competitive edge over other IM clients.
The groundwork for this has already been laid. In anticipation for this project, I took a look at Kopete’s code (as this project has been inspired by its features) and got a feel for how it’s implemented there.
I also created a small scale message processor to gauge the amount of work this would take (so I can make a more precise timeline). It currently manages a hardcoded list of ‘filters’ in much the same way that kopete does - once a message comes in (or goes out), it iterates through all of them and executes sequentially.
While this is works, it has the same fatal flaw that Kopete does - until all plugins have finished processing the message, it can’t be displayed to the user. So in effect, there could be a noticeable delay between the message arriving and it being displayed to the user.
I plan to fix this by making my solution completely asynchronous. That is, once a client gives a message to be processed, it will return immediately. There will be an asynchronous API that notifies the client as each plugin makes changes to the message, and eventually be marked as complete.
Unlike the hard-coded list of filters currently in message processor, the final solution will load all of them at run-time. KDE already provides a nice framework for this called KPluginLoader and I think it will be sufficient.
The plugin’s metadata file will contain if it should be used for incoming or outgoing messages (or both) as well the priority that will be used to determine its position in the que (to be executed). Plugins with the same priority will be executed together, while plugins with lower priority will wait till the higher priority plugins are complete.
There will be a KCM allowing the user to enable/disable any plugin, as well as exposing any options each plugin may have to the user.
- Rebuilding MessageProcessor (May 21 to Jun 10) -
ensuring this is functioning correctly is important, thus I’ll allocate 3 weeks for it
- Implementing blocking versions of (most of) the plugins (Jun 11 to Jul 1) -
synchronous versions will be much easier to debug, and will allow me to solve all the issues with the more difficult plugins
- Refactoring MessageProcessor API to be asynchronous (Jul 2 to Jul 22) -
I haven’t designed an asynchronous API before, but I’m certain my mentor has enough experience to help me get this done within 3 weeks.
- Port existing plugins to new API and implement remaining ones (Jul 23 to Aug 12) -
this *should* be a fairly straightforward process.
- Implement any plugins that couldn’t be implemented in time or haven’t been thought of yet (Aug 13 to ???)
I have a passion for learning (the primary reason I ever started contributing to open source I think), trying new things and am always looking to improve my skills.