development Archives

17 May 2007 12:22 PM SAST

Plugging Skype and Pidgin together

After thinking about de-nuctifying the world I've started to investigate creating a Pidgin (formerly Gaim) plugin to control Skype. This means you're still using a closed network, but from an open program, which makes migrating easier (and allows people to try multiple networks from the same interface).

The Skype API docs are pretty good and it looks like the API can support at least controlling status, sending and receiving text messages, and making and receiving phone calls. So in principle a Skype plugin for Pidgin is a possibility.

There are a few docs on writing libpurple plugins for Pidgin but less comprehensively - the author of the Sametime plugin or the guy working on a MySpaceIM plugin probably know exactly how it works (the MySpaceIM plugin is a Google Summer of Code project that fits in with my idea very nicely). There is a C Plugin HOWTO in the source code which should get things started. Some ideas in the Adium Skype plugin bug as well.

On the way I read Silver Needle in the Skype which is an article on reverse-engineering Skype and using it - very interesting tech reading... but a shame they haven't made the code available

Well since it's 8 days till we leave Cape Town and head to Japan I'm not planning to actually do anything about this, but thought I'd write it up so I don't lose the links...

PS This blog doesn't currently have a comment mechanism so email comments are welcome to davidf at sjsoft dot com.

Posted by David Fraser | Permanent Link | Categories: tools, development, ideas, opensource

13 June 2006 9:49 AM SAST

Pootle and Translate Toolkit Development 2006-06-13

There's been lots of discussion recently about Pootle on the debian lists, the direction it should take, whether to use a database to store translations, etc... It may be a nice idea to add a database as one of the backend options but keeping with handling the complexity of translation files has been important. Seems like a good consensus to this effect is emerging; it's nice to have more interest in the project.

I've tried to keep coding rather than get too drawn into the discussion, and this is what I've been up to the last week:

Pootle: Mostly ongoing architecture work, feels like we're heading towards a good structure...
  • Wrote up discussion on putting metadata into a relational database
  • Base class migration work on the Pootle-locking-branch: made pootleunit and pootlefile encapsulate a pounit and pofile respectively rather than inheriting from them. This will make it possible to use other storage classes (although there is still more cleaning up needed where we use PO-specific methods).
  • Participated (minimally) in the debian discussions on direction of Pootle and using databases
  • Fixing some minor bugs in the webserver etc


Translate Toolkit: Focused on escaping being correct and using the base classes
  • Sorted out escaping in dtds - it doesn't exist. So we will no longer support \' or \n having a special meaning in dtd files, being translated to \n in a PO file etc
  • Fixed various failing tests for 0.9 (including fixing some modifications we were doing to the minidom XML library)
  • Added some tests for dtd quoting to HEAD - currently we allow opening a quote again after it is shut (<!ENTITY name "first part""second part">) which is invalid according to the spec - just for correctness, haven't hit any errors here
  • Making properties to PO conversion use base class API more, sorting out escaping there
  • Discussion with Axel from Mozilla - for 0.9 the Mozilla .properties files will be output in proper UTF-8, not with \uNNNN escaping (although that will still be understood as input. See bug 114
  • Made dtd classes inherit from base classes - could be made cleaner, but at least the API is implemented now

Posted by David Fraser | Permanent Link | Categories: tools, development

05 April 2006 9:34 AM SAST

Sourceforge CVS woes and Pootle templatisation

This latest Sourceforge CVS outage has been most unfortunate. We tried to do a bug day aroud the one the week before, which was also unfortunate... Now for almost a week we haven't had any CVS access, and we had planned a release in that time of Pootle and the translate toolkit.

Good thing I had a script getting the CVS tarballs as we could set that up as an alternate (read-only) root. I then set up a different directory I used off that root and maintained a queue of patches... which I applied this morning as follows:

for f in `ls offline-patches/*.patch -t -r` do patch -p0 < $f echo $f for g in `lsdiff $f` do grep `basename "$g"` `dirname "$g"`/CVS/Entries || cvs add $g done cvs-commit `lsdiff $f` done

I've now basically completed converting Pootle to work using Kid templates which makes the code a lot cleaner (was using an old object-based HTML construction set).

A few things to sort out (spell-checking system), but it mostly works beautifully. The UI is exactly the same as before, but we should now be able to improve it without messing around with the Python code.

This is all on the Pootle-kid-conversion branch, and you'll need at least version 0.7.6 of jToolkit to run it. Other requirements have increased - Kid requires ElementTree too. This is now documented in the pootleadmin page on the wiki.

I've been wanting to get this going for ages, so it's nice to finally have it done.

Posted by David Fraser | Permanent Link | Categories: tools, development

20 February 2006 7:33 PM SAST

Translate Toolkit 0.8 is out

Something I have been promising for many months has finally happened... We've been going backwards and forwards with so-called "release candidates" for 0.8 that were really betas or new versions, I managed eight!

The combined effect of this and doing the last release candidate when Pavel was too busy with OOo 2.0.2 is that nobody's complained about the last one.

But we did have a bug day, add lots of tests and fix lots of bugs. There's a new branch for the 0.8 series if any bug fixes are needed, so please report if you find any problems.

New work on the HEAD branch will focus on the wordforge project.

This is just a quick announcement for those interested as we've got another power failure - the Western Cape is having fun with those at the moment :-)

Posted by David Fraser | Permanent Link | Categories: tools, development

27 January 2006 9:06 AM SAST

Jingle builds of Psi and Kopete for Fedora Core 4

Was excited around Christmas to see the Jingle signalling protocol for Voice over IP through Jabber, which was jointly authored by Google and JSF people and is used by Google Talk.

Google also released an open source library for doing Jingle called libjingle This makes it even easier for all the free software instance messaging clients to get the spec implemented quickly, and they all seem to have started doing that. Now that Google Talk has also turned on XMPP Federation, this looks like a blast for open protocols to win the day...

But when I looked at the roadmaps of Gaim and Psi, it became clear that although implementations are there, it'll take a while for these to reach general release.

Finally got round to trying to build some for myself, and found that they actually seem to work quite well (at least on my local network :-)).

Psi's jingle branch built fairly easily once I had the right dependencies etc.

I couldn't find instructions on building Gaim with Jingle support, it seems like they are still working on integrating it (in the Gaim-VV project), and I liked using Gaim because I can do IRC, Jabber etc all from the same client...

So I found Kopete which is similarly functional and has Jingle support in their development branch.

Building this as an rpm took more work because on Fedora at least, its part of kdenetwork which is fairly big. Eventually got it working after learning a fair bit about spec files... (rant: lots of "HOWTO" documentation, not enough reference documentation...)

The resulting RPMS, SRPMS and specfiles are all at http://davidf.sjsoft.com/files/jingle/ ... of course I should create a proper package repository but that can wait for another day...

Posted by David Fraser | Permanent Link | Categories: openoffice, development, opensource

05 December 2005 5:33 PM SAST

Session Saving

SessionSaver is the most useful extension I know of for Firefox, and it's surprising it doesn't have a real home - it seems it gets passed from person to person to fix things up for different releases.

Basically it records the set of windows and tabs you have open in Firefox (including the history etc) so that if you quit or the browser crashes, they can be restored on startup (you can also save named sessions and switch between them). (It stores this in prefs.js which is arguably not the best for performance but seems to work fine without corruption).

Now, I just crashed my X server for some inexplicable reason. Which led me to think again to myself, I wish I had a SessionSaver for Konsole. I tend to use both Firefox and Konsole as task lists - web pages I must look at / process, shell operations I'm busy doing.

A long time ago I coded up a Python program to periodically dump the different tabs open in Konsole along with the processes running in them, current directories and open files. The idea being you can run this in a cron job and at least be able to see what was happening if Konsole crashes rather than losing track.

I've now fixed this up and got it running again. It could do with improvement but it definitely counts as helpful. The file is at http://davidf.sjsoft.com/files/konsolesessions.py and it gets run like this in a cron job:

  export DISPLAY=:0.0
  su username -c "python2.4 -m konsolesessions --html --output" 2>&1 | tee -a /tmp/konsole.log


This then produces an index of konsole sessions in /home/username/konsolelog/index.html, each of which has its own html file like this:

Konsole session at Mon Dec 5 16:47:02 2005

Konsole 32187: 2 sessions

konsolesessions

  • /bin/bash davidf in /usr/lib/python2.4/site-packages
    • python -m konsolesessions --html --output davidf in /usr/lib/python2.4/site-packages

konsole

  • su - davidf in
    • -bash root in
  • vim /tmp/nb_entry31802.txt davidf in /home/davidf editing
    • /tmp/nb_entry31802.txt

Posted by David Fraser | Permanent Link | Categories: development

26 October 2005 12:16 PM SAST

Qemu and Qvm86 rpms for Fedora Core 4

Wanting to run virtual machines on my Linux machine, I decided to hunt for a QEMU rpm. I found this nice page that explains how to build QEMU rpms for Fedora Core. However he uses the kqemu accelerator which is not open source and I would rather use qvm86 which is.

So I patched the spec file so it now builds qvm86. QEMU and qvm86 rpms, source rpms and spec file here. The kernel module for qvm86 is built for my CCRMA kernel so you may want to rebuild the source rpm... for which you will need compat-gcc-32.

Posted by David Fraser | Permanent Link | Categories: development

11 February 2005 3:26 PM SAST

PyLucene and Java to Python Doc hacking

Have been playing around with PyLucene which is a native-compiled Python version of Lucene, a Java text indexing and searching package.

It's an impressive engineering feat - basically compile Lucene to native objects using GCJ and then use SWIG to produce Python bindings - given how simply it works.

Was quite quick to get up and running, and have started improving search in Pootle using it. The main slowdown was documentation - you have to read the Lucene Javadoc, and the SWIG-generated Python classes don't have any documentation or info about their own parameters directly.

So I hacked together some code that parses the Java files, strips out the method declarations and javadoc comments, and then tries to insert them as docstrings into the Python files. More info in the 'Simple automated docs' message I posted to the list. Andi, the original author, was planning to add docs before the 1.0 release, hopefully these will help people until then.

Anyway, now I can carry on using the indexing instead of hacking at it :-)

Posted by David Fraser | Permanent Link | Categories: development

13 January 2005 10:39 AM SAST

Pootle ideas

Have managed to fix up the Pootle registration process, and set up a Pootle mailing list for any discussion.

Also found that Pootle was being Spidered by search engines, so added a robots.txt file as that was placing a lot of load on the server.

Now the TODO list is getting bigger, so hopefully some other developers will come on board (hint, hint). My next priorities are implementing PO uploading and an interface for assigning translations

In the mean time, some other related web sites that we can take ideas from:

Posted by David Fraser | Permanent Link | Categories: tools, development

25 October 2004 6:53 PM SAST

Started development on Pootle

Over the last week I've started development on Pootle, a simple web portal for localization... named after a Flumps character thanks to Danielle's suggestion.

Its been really fun and the progress has been quick. Once its workable we'll try get a public implementation somewhere. Just needs a few additions (user registration, etc).

I just use PO files on the disk and aggregate stats on them to make it nice and fast. Hopefully will use it in Tanzania for our upcoming training course

Posted by David Fraser | Permanent Link | Categories: tools, development

14 October 2004 7:38 PM SAST

OOo 2.x building :-)

Worked quite a bit on ooo-build stuff the last two days.

Got cvs access sorted out so I can add my patches directly.

Got a full + complete build working on Fedora using src680-m55 with ooo-build head. Started trying to get it going with mingw.

Realised I was messing up passing configure options to configure in my dobuild script. This meant that trying to recompile and switch from kde back to gtk was fruitless. Have run a new build and looks a bit better now...

Took a while to sort out mingw (mostly because of above config options), leaving it building now. Haven't got ccache working there yet (gets confused about paths) but that will help a lot. Anyway, just leave it and see if it builds tonight. (Note: CLASSPATH was set to something that caused problems with ant). Only have 400MB free on my Windows machine so building on a Samba share, will probably make it even slower :-)

In fact it fails to build stlport. So I probably need to look at the 1.1.x cws for mingw and see if I can get that going...

Posted by David Fraser | Permanent Link | Categories: openoffice, development

13 October 2004 2:59 PM SAST

Building OOo 2.x branch using ooo-build

Well I've been trying to build OOo 680 (2.x series) using ooo-build, which doesn't quite work yet.

I'm putting the patches I'm using at http://davidf.sjsoft.com/files/ooo-2.x-patches/ along with a patch to apply to say what to use, what not to use.

Hopefully it will build someday ...

Posted by David Fraser | Permanent Link | Categories: openoffice, development

24 June 2004 4:56 PM SAST

Multi-language OpenOffice.org

Discovered its possible to combine multiple languages in one OpenOffice.org installation. Just no user interface at the moment to select the language. But managed to manually produce a English/Zulu version with only a few glitches. We should produce a South African version with all the languages so far included...

Posted by David Fraser | Permanent Link | Categories: openoffice, development

09 June 2004 10:02 AM SAST

Refactoring...

Rearranged the code that serves as backends to the conversion and filter commands so it shares a common class, translate.misc.optrecurse - in preparation for updates to the filter code, so now you can specify preconditions in the code e.g. don't check for whitespace if untranslated.


Posted by David Fraser | Permanent Link | Categories: development

01 June 2004 12:48 PM SAST

Peace - at last!

The moment I've been waiting for for a long time ...

See XOpenWin - a plot afoot a long time ago to use things from Wine to get native Windows programs to run on an X Server. This message recently alerted me to a program that begins to do just that - cygpeace (it's a Japanese site).

I have winmine running in a remote X session from my Linux box. Slow, but amazing :-)


Posted by David Fraser | Permanent Link | Categories: development