Last week, I started looking for a CalDAV server that suits my needs (I need one that does LDAP authentication), and I couldn't find one. The Apple Calendar Server claims to be able to use LDAP, but only through something calles "Open Directory", which only gets built on Darwin platforms, and RSCDS is PHP and wants to use its own user store on top of any authentication I do..
As I don't know enough about the Darwin Calendar Server internals, and I won't touch PHP, I decided to start writing my own WebDAV server (which I'll make into a CalDAV server soon), in perl.
The code is currently still a bit rough, a few mandatory bits of RFC4918 haven't been implemented yet (the "If" header, for example), and a few things are untested (other conditional headers), but it's possible to put files on it using Nautilus, and litmus tests show the basic bits work.
You can get a copy of the current code using
bzr:
bzr get http://foodfight.org/download/dav-server/main
I'm off implementing a super-simple version of HTTP Basic authentication, so I can start working on ACL support (RFC3744), which is another prerequisite for implementing CalDAV (RFC4791)...
A few weeks ago I finally finished my first "real" application using the Catalyst framework: my brother's trumpet tabs site.
Because I was learning how to do things the best way, it now has mixed URL styles (one in the tab search section, one in the forums), but it works quite nicely. It even uses XMLHTTPRequest for retrieving forum posts when quoting!
I still keep finding small things to fix (mostly XML strictness or missing features that were present in the old backend) all the time though.. time to teach him how Catalyst works :)
In the past few weeks I've been steadily improving my graphing framework, and I've added a lot of new plugins:
If you like graphs, check it out, and give me some feedback ;)
I've bought a 4-way temperature sensor for my new apartment, and decided that I needed to update my existing thrown-together rrdtool scripts. So I did. :)
You can get the result from http://foodfight.org/download/graph-spul, using either a plain HTTP or using bzr. It loads plugins dynamically based on the config file, and it includes 3 plugins by default (one for the temperature sensor, one for ethernet statistics, and one for reading temperatures from a hddtemp daemon).
Example output (yes I know I haven't wired up the other 3 sensors yet ;)):
I've recently started learning Python (again), and this time it seems to be sticking. The only problems I'm left with are the small, stupid ones that you only get if you've been writing Perl code for years:
re.match() != re.search()You'd expect re.match() and re.search() to be identical, but they're
not: re.match() only matches at the beginning of the string.
If you want "Perl-like" matching, use re.search(),
which will match even if the pattern doesn't start at the beginning of the
string.
break/continue vs last/nextI don't know why it took me ages to find this, but the Python
equivalents of Perl's last/next statements are
break and continue. And I keep remembering it the
wrong way around, too.
I'll keep updating this post with other "small things" I find as I'm getting to know Python better.
Op dit werk is een Creative Commons Licentie van toepassing.