redlandbot bugfix

My pet Python project is redlandbot, the most popular manifestation of which is julie, an irc bot. Basically, the service allows for adding data from a URL to the local model, and then running RDQL queries against that model. As the name implies, it’s built as a layer on top of Redland, using the Python language bindings.

One of the biggest complaints about using julie, or at least, one of my biggest complaints, is that it requires namespaces to be used explicitly in some cases. Or should I say, that *was* was one of my biggest complaints: I just fixed it.

From now on, julie will automatically add namespaces to a query. It checks if there already are any (by looking for ” using <"), then adds the rest of the predefined namespaces, trying to match syntax. There may be some commands which break because of multiple spaces between "using" and "<". If there are any, feel free to fix them by simply pulling the namespaces out of the command: they will be added automatically. This allows for more complex queries with less work, which is always a good thing. Any bugs can be reported to me. This has been on my wish/todo list for way too long, and it's good to have done. I should really work on fleshing out julie/redlandbot as a web service a bit more, I think. It'd be nice to be able to just set up the service on a webpage, and use the ircbot as a very high level transport between IRC and the web interface: this would allow me to move the bot around a bit more, without needing to install Redland to use it (occasionally a bit of a pain, due to dependancies, mostly because I suck at resolving them without root).

Comments are closed.