Tuesday, January 23, 2007

Trac-AtomPP progress, 2007-01-23

I finally got myself out of my Trac plugin coding slump. Genshi is really making this a whole lot easier; I don't really know why I was manually generating XML from trees in the first place.

I am very grateful for the existence of Joe Gregorio's Atom Publishing Protocol test suite. There are only a couple of nits about it — first, it doesn't seem to play well with Multi-version installs of wxPython (seems to require 2.6, perhaps 2.5 [I only have 2.4 and 2.6 on my computer]), so I cooked up a really simple patch for that. Secondly, my wiki collection feed generates some warnings via Feed Validator, but in the logging pane, it records them as errors. Since it doesn't affect the functionality, I merely consider that a minor usability bug. But, this really doesn't seem to be meant for end users, so...whatever.

Anyway, for my capstone, I'm only working on the wiki part. GET is done, and POST is nearly done. DELETE is done in theory (haven't tested it out yet), and PUT still needs to be converted. POST and PUT now require some implementation of ElementTree to be installed, in order to parse the Atom Entry input. As an aside, ElementTree's find*() methods are really poor substitutes for XPath. Also, this implementation utilizes the Atom MIME type parameter draft whenever possible.

Reminder: Bazaar URL is: http://bzr.malept.com/trac-atompp

Monday, January 22, 2007

Suggestion for project

pyglet (OpenGL multimedia library) + Bruce (presentation tool) + S5 (presentation format) would probably create an awesome alternative to PowerPoint. Other possible libraries to use include Genshi (to template the S5 XHTML output), and cssutils and html5lib to replace the current HTML/CSS parsers in pyglet, mostly because reinventing the wheel is usually a bad thing. To look into: whether a pygtk UI can be integrated with a pyglet surface (perhaps via pycairo).

Saturday, January 20, 2007

HOWTO compile subversion-1.3.2 so that it works with bzr-svn-0.3

This was written because simply using the patch at the bzr-svn web page is not sufficient for getting it to work with subversion-1.3.2, which I'm using because that's what's stable for Gentoo's x86 ebuilds.

Note 1: I have a Gentoo ebuild that corresponds to these directions. Add a comment if you want it.

Note 2: Where there are instances of lynx -source [url], it can be substituted for wget -O - [url] when lynx is not available.

  1. Unpack the subversion-1.3.2 tarball: tar -xjf subversion-1.3.2.tar.bz2
  2. Change directory to the subversion source directory: cd subversion-1.3.2
  3. Apply this patch to the source (this patch came from the Ubuntu Edgy source diffs, but slightly modified): lynx -source 'http://www.lazymalevolence.com/patches/subversion-1.3.2-debian-x-python-bindings.patch' | patch -p0
  4. Remove some of the generated .swg files, or else the compile will fail: rm subversion/bindings/swig/proxy/*.swg
  5. (This step is for people who have swig 1.3.31 installed; I haven't tested with any other version.) Convert the language typemaps to #ifdefs, to get rid of a bunch of warnings: (cd subversion/bindings/swig && lynx -source 'http://svn.collab.net/viewvc/*checkout*/svn/trunk/subversion/bindings/swig/convert-typemaps-to-ifdef.py?revision=19926&pathrev=19927' | python -)
  6. Regenerate all of the configure files, Makefile.in and the .swg files, among others: ./gen-make.py build.conf; make -f autogen-standalone.mk autogen-swig; (p=`pwd`;for d in . apr{,-util}; do cd $p/$d && autoconf; done)
  7. Proceed normally in the build cycle: ./configure && make all install

Saturday, January 13, 2007

Several items

The last post was 1.5 months ago, awesome. Anyhow, here are some thoughts on stuff I've done/explored in the computer realm during that time:

  • Beryl is awesome. Too bad it doesn't play well with tvtime, or else I'd permanently enable it and all the associated settings. Also, my video card is one of those crippled ones (ATI Radeon 9250SE), so it's a bit slow as well.
  • My capstone project is in full swing. I've mostly stopped using my hand-rolled Atom parser/generator, since I got stuck on how to implement extensions. For generation, I've switched to using Genshi templates. Genshi has a pretty nice templating language for both XML and text based documents. For parsing, I think I'm going to use lxml or ElementTree, depending on how well XPath is supported.
  • Given the amount of attention that OpenID has been given in the blogosphere lately, I was thinking about how it could be used to integrate with the UWNetID system. Unfortunately, I found that it was rather difficult to modify the current implementations in order to add such support. So, I'm currently writing a PHP5 class + mini-application to be an OpenID server. So far, I have the association mode completed, and the checkid modes are in progress. I am proud of myself for actually implementing the Diffie-Hellman key exchange, since while I am fascinated with cryptography, my math skills in that area are...lacking. It's also nice to refresh my PHP skills, as I haven't programmed in PHP5 (which gives you some idea as to the last time that I coded in PHP).
  • Over winter break, I attempted to port modular X to MinGW, as the Xming project (which is awesome) uses the old, monolithic build process. I've built all the Xorg server (and its dependencies) successfully, except that the OpenGL code for Windows has not been updated with the rest of the server's codebase. That sort of modifications are pretty far out of my porting abilities, unfortunately. This project also gave me some experience with git. My take: it's extremely annoying to use git directly — use a frontend to it such as cogito instead. My personal preference is still Bazaar, though.
  • I wrote a Python module in C for my on-again, off-again, DC client project. I have a post on that sitting in my queue and will post it at some point when I finish and/or remember it.
  • I eagerly await the day when Deepest Sender supports the GData Blogger API. Maybe in the spring, if it's not there, I'll write it.
  • Oh right, the new URL for this weblog is http://blogger.malept.com/.