Thursday, March 9, 2006, 04:00 PM
- Semantic Desktop, Python, Java
Plan for Today: write an Aperture datasource for the thunderbird addressbook, this to pass time before lunch while I didn't have my mac, and should be quick and easy. Fast forward till lunchtime, where I've found that Thunderbird uses the MORK format for it's addressbook. Mork is a "barely machine readable", "stupidest file format I've ever seen", "look-ma-I-wrote-a-DB" excuse for a DB format.
It was designed by some netscape engineer in the 90s who then disappeared and now no-one knows how it works. It looks a bit like this:
<(91=2)(81=Test)(82=Bob)(83=)(84=Test Bob)(87=bobnickname)(85
=bob@tester.com)(88=bobby@serial.co.uk)(80=0)(89=workphone)(8A
=homephone)(8B=faxphone)(8C=papegerphone)(8D=mobphone)(8E
=bobscreenname)(8F=441048b8)(86=1)(90=bill)>
{1:^80 {(k^BF:c)(s=9)}
[1:^82(^BE=2)]
[1(^83^81)(^84^82)(^85=)(^86=)(^87^84)(^88^87)(^89^85)(^8A^85)(^8B^88)
(^8C=)(^8D=)(^8E=0)(^8F=0)(^90^89)(^91^8A)(^92^8B)(^93^8C)(^94^8D)
(^95=)(^96=)(^97=)(^98=)(^99=)(^9A=)(^9B=)(^9C=)(^9D=)(^9E=)(^9F=)...
Luckily someone else has sort of reverse-engineered it, and there exist partial perl parser and one python version.
I've now added to the madness by converting the python one to Java. It sucked and took all day. (And someone pointed out I could have done it with jython, oh well). To make up for it I'm going to share it with the world.
Here download a jar with src/binaries and some examples:
UPDATED! The old version did not handle encoding of non-ascii characters too well - like everything else in mork this was pretty badly done, but now it's working.
http://www.dfki.uni-kl.de/~grimnes/2006 ... st-0.2.jar
[ 3 comments ] ( 111 views ) | permalink |




( 3.1 / 4790 )Wednesday, March 8, 2006, 10:06 PM
Today is finished implementing the xmlrpc interface to Gnowsis 0.9 that we are doing for the Semouse people. As an added bonus I can get away from evil Java for a bit and interface with Gnowsis in python!
Gnowsis exports a range of XML-RPC methods, the ones I made today make up an interface to the different stores of gnowsis-server. Some javadoc will appear soon, but there are methods like addTriple, removeTriple, querySelect, queryConstruct.
Now with this in place I can write the python code:
#!/usr/bin/env python
from xmlrpclib import ServerProxy
server=ServerProxy("http://127.0.0.1:9993");
#print server.listMethods()
print getattr(server,"gnowsis-server_dataaccess.querySelect")("gunnar","fulltext")
And it works! As soon as I can convince Leo we will rewrite the whole gnowsis GUI in python! :)
Should anyone feel like trying this the code in svn...
With the latest wiki stuff working Gnowsis is really starting to free itself from the chains of ugly Swing GUI hell.
[ add comment ] | permalink |




( 3 / 2438 )Wednesday, March 8, 2006, 08:46 PM
- Everything Else

So I'll bite the bullet. It's too late to rebel against the terminology. And the principle is very interesting. And all my friends are doing it. I DO have some issues with writing something and thinking people might want to read it...
BUT
Inspired by this man's quite technical writing about research topics I will try to write about research and programming problems that bother me on a day to day basis. That is no teenage angst, no music, no pubs and clubs of kaiserslautern, no holidays. Although I might write a bit of about beards. We'll see how it works out.
[ 4 comments ] ( 52 views ) | permalink |




( 2.9 / 3336 )Back



