A new plugin system for Choqok

During last week I was working on a new plugin system for Choqok, It’s idea was in my mind for about 2 months, But now, It’s ready to use, and develop plugins for it.

Choqok supports image uploading to Twitpic since early versions, and supports Media attachment in Identica/Statusnet service since latest Beta release.

But, There are so many image/video uploading services out there! what if we want to support them too!?

Here is the answer: A plugin system to support more services as easy as writing one or two functions :)

There’s just one function to override:

void upload( const KUrl &localUrl, const QByteArray &medium, const QByteArray &mediumType)

Choqok will load medium, detects it’s mime type and provide it to plugin as a ByteArray!
So, plugin just have to upload file with the service API, and then emit the mediumUploaded() signal :)

Now we have a global Medium uploading dialog right in Tools menu:

I have ported the Twitpic plugin to this new system, And wrote a plugin for YFrog service.

It still needs some improvements to be what i want ;)


9 responses to this post.

  1. Posted by aperson on April 19, 2010 at 1:44 am

    Imgur would be a great service to support.



  2. Hi ,

    I use choqok and i think its a great app. I was wondering if this plugin system is only for media upload ? I was thinking of writing plugins for other things as well. eg: whenever a tweet arrives, do something with it . For me a specific case would be ignoring tweets with a particluar tag or words.


  3. Posted by Tom Albers on April 19, 2010 at 1:11 pm

    const QString &localUrl ? Why not make that a const KUrl localUrl ? Or don’t you care about the almighty KIO framework?


  4. How about a plugin that allows to filter tweets? I’d love to be able to exclude all tweets from foursquare :-)


  5. Posted by vicoden on October 25, 2010 at 4:18 pm

    I use choqok and its brilliant ! but the upload medium have error. when they ask me to enter my twitter user name and pass for twitpic, writting things like ” @ ” or “.” in email doesnt work just this gets typed “emailexamplelivecom” the @ and dot doesnt appear , and thus says upload failure. do you have any idea how to fix this ?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: