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 ;)
Posted by aperson on April 19, 2010 at 1:44 am
Imgur would be a great service to support.
http://code.google.com/p/imgur-api/
Posted by Ashik S on April 19, 2010 at 11:51 am
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.
Posted by Mehrdad on April 23, 2010 at 12:19 am
We can write such a plugins right now! It’s supported of course!
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?
Posted by Mehrdad on April 23, 2010 at 12:21 am
You’re right! I’ve changed it.
And I believe in KIO almighty ;)
Posted by Dirk on May 19, 2010 at 3:37 am
How about a plugin that allows to filter tweets? I’d love to be able to exclude all tweets from foursquare :-)
Posted by Mehrdad on May 19, 2010 at 5:14 pm
There’s plan to implement this, You can help to have it sooner, Take a look at here: http://choqok.gnufolks.org/forum/topic/12
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 ?
Posted by Mehrdad on October 25, 2010 at 7:55 pm
Use the recent version i.e. 1.0 Beta4
> New comment on your post “A new plugin system for Choqok” > Author : vicoden (IP: 78.154.210.1 , 78.154.210.1) > E-mail : vicoden@live.com > URL : > Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=78.154.210.1