iDunno's Blog of Bloggyness : tech

More on rss2maildir.py...

Just to confirm, yes, I do know of rss2email - it has the unfortunate side effect of needing an MTA configured to process the rss feeds and seperate them in to seperate maildirs, basically I wanted something that would write straight to the maildir for me because then I don't have to think about the config for the MTA on each machine that I want to use it on.

Thanks to Martin for the suggestion of pandoc, I'll take a look at that over the next few days to see if it'll make the "plain text" generation slightly neater than the current HTMLParser based code.

rss2maildir.py

I've been looking for a decent way to read rss feeds for a bit, I've finally given in to the fact that there's actually nothing about that I feel comfortable with... so, what I've started is writting a simple rss to maildir convertor (I know there's toursst, but that appears to want a galleon bookmarks file and appears to use deprecated bits of python). At the moment it is very very basic, there's still a way to go before I'll be fully happy with it, but it's much nicer being able to read rss using mutt than Yet Another Random Program, I'll be hacking up a mutt config to make it look different to e-mail later, but for now as it's still in testing phases, I'm just testing with a bog standard mutt config.

I've made the code available through a git repository that should (when DNS has finished updating) be available with a git clone git://git.sommitrealweird.co.uk/rss2maildir.git/ before that it should be available from git clone http://miranda.sommitrealweird.co.uk/~brettp/rss2maildir.git/ .

The HTML -> Text parser still needs some work, I'm mostly aiming for it to take HTML and generate almost OK ReST which is easier to read in a text mail client. It still needs paragraph wrapping etc, but I'll work on those over time.

If anyones interested, or wants to get involved, or has some nicer ideas for how to make it work, as always I can be contacted at iDunno@sommitrealweird.co.uk :)

Update to bpgallery

Just after having made the 1.1.0 release I discovered an annoying bug in that version that meant using caption files made it fail in new and interesting ways, I've now fixed the bug and released bpgallery 1.1.1 which fixes this.

New bpgallery available, and xmms-scrobbler work...

I've taken over upstream development of xmms-scrobbler, it's now hosted at http://xmms-scrobbler.sommitrealweird.co.uk/ and has a public readonly git repository for the code. Since taking over development I've dropped a lot of the tag parsing code and replaced it with taglib, found some "interesting" locking issues and am now looking at making it so that we don't need to restart it when adding username/password. It'd also be good to get it to actually report a username/password breakage at least once rather than being totally silent about it!

In other news, I've just released a new version of bpgallery, this version adds in medium sized pages - i.e. you can have the index page, the index page links to pages that have a resized image on the page, and has next/previous links. If you also generate full sized pages then the link from the image on the medium sized page goes to the full sized page, otherwise it'll go straight to the origional image.

Also thinking about making a last.fm "client" for xmms so that I can keep all my music playing in the one place (lastfmproxy appears to have stopped working for me :/)

Stuff, potentially a bit random

So, found glusterfs today, looks quite interesting, may have to play when I've got some spare tuits...

Also, I'm about to take over upstream development of xmms-scrobbler, so currently thinking of which revision control system to use... I'm very tempted to use tla because I know it and use it for everything else that I do, but I've been tempted by the evils that are git, hg and bzr... most likely going with tla because it makes the most sense to my often broken little mind, and I like the abrowse command rather too much :)

What else? Probably lots of stuff, oh, looking for a nice multiple project group type build daemon - we've got 4 main branches of a piece of software at work, and packages should be auto built for each of the branches on a commit (ish) - we're currently running 4 copies of cruise control to build the debian packages, that's a little bit on the heavy side, though - and all it'd need to make it actually work for me would be to have a project group config option, so you can assign a number of processes per project group... but it doesn't have that - I just discovered CruiseControl.rb, which is a bit lighter, but it's still not quite what I'm after. May end up writting a small python buildd to deal with it instead, and hook it in to the svn repository with some post commit hooks.

Also got a whole lot of Nagios configuration to finish off to monitor a bunch of servers.

So, that's a small brain dump... more when I remember what the hell it was that I was supposed to be doing - been a hectic day!

Oh Noes! This means lots of work!

Debian GNU/Linux 4.0 has been released - congratulations to all those involved in the release process, you've all done a fantastic job (as always ;). Now I've just got to test the upgrade for the NFS root desktop machines at work (that's going to be *sooo* much fun!) and make sure that nothing obvious breaks - I'm not expecting many problems, it *should* go quite smoothly (probably!).

Might also use the "official" non-free packages for the sun j2sdk rather than using java-package, haven't decided yet (and actually, as we also use sun-j2sdk1.4, I'm going to have to use java-package for that anyways!).

Hmmm, I suppose I should update all of my various build chroots and set up all the scripts that I'm going to need also - feh - that can wait for a bit.

Ahh - and I'm going to need to compile an etch version of ion3 from unstable, can't be having my workstation running one of those dodgy window managers that makes it almost impossible to get anything done without using the mouse, afterall!

Right - anyways - I think I shall just go faint, that was *far* too quick between sarge and etch!

Of CGI Scripts and Line Endings

MJ Ray said in Bad Tech: CGI Scripts and Line Endings, "Problem: CGI scripts uploaded with the MS Windows version of FileZilla over SFTP don't work until converted. Either there's some FileZilla settings wrong by default, or it just doesn't work." - the problem is that unlike with traditional FTP, which in ASCII mode would automagically translate line endings in to a sane format, SFTP (as far as I can tell) will always send them as binary, and thus if they were in DOS format before the transfer, they'll be in DOS format after the transfer. So, your choices are (other than the evil perl^M symlink)...

Teach users about line endings - get them to do the equivalent of a :set fileformat=unix in vim before saving ;) (I'm not sure which editors out there let you set what line endings to use - might be worth finding out what the users use and looking it up)

When they upload, rather than them uploading directly in to FTP space it hits an area that is checked every x minutes - that area is then copied to the right area with the transformation being done server side

Something else.

Mac vs PC...

Now, this isn't actually a post about Mac vs PC, it's a post about the general use of the term "Mac vs PC", why is it that the term "PC" is equivelent to "x86 based windows running computer"? The Mac itself is a PC, dammit, and actually, now that it is just another x86 based product and can run windows... ho hum. Anyways - yes, just mostly pissed off by the fact that "Mac" -> Mac OS, and "PC" -> Windows... now, of the two "PC"s that I use most frequently (err, personal ones, not my workstation, though that also...) there is no freaking Windows on 'em, they're Debian GNU/Linux boxes through and through.

So, can the not-entirely-thick people that should know better stop using the term "Mac vs PC" and instead use "Mac OS X vs Windows [version]" or similar if they're just picking on OS.

Anyways, yes, err, I just read some other blog entry that set this off, I'll, err, grab my coat.

Command line lucene index inspection!

Woo! I've been looking for a lucene index inspection tool for the command line for about 6 months or so, ever since first trying to use luke over a forwarded X11 over ssh connection to a machine in the colo with a large(ish) (300,000 document) index... a couple of months ago I stumbled upon PyLucene - a python library that can play with lucene indexes, of course the first thing I did with it was package it (can't have random unpackaged software laying around the system after all, can you!), and then played for a bit, and joined the pylucene-dev mailing list. So, imagine my glee today when on that mailing list there's a post about plush - a Python LUcene SHell - fantasticness! Quickly threw that in to a package and tested it out against a lucene index laying around on my workstation, it worked nicely (couple of small bugs, but they've now been fixed in the trunk version), so, now that I had it packaged, straight off I went to the main indexing server and threw it at a large lucene index, it just worked. Fantastic.

I'll add some links to my repository for pylucene and plush later, when I'm feeling slightly better, feel a little under the weather at the moment.

Smartish Phones...

Clive, the Trolltech Greenphone certainly looks interesting, and has the key ingrediant that the iPhone and Neo1973 are both missing. Yes, you got it, it's actually got buttons!

I don't know about the rest of the world, but I like the fact that pushing a button gives physical feedback, also, you can move your thumb around on a keypad and know what button is under your hand, and that you're not overlapping 2 different buttons at the same time - can you do that with a touchscreen? I'm thinking not. So, you have a shiny phone, it lets you do all sorts of crap that you don't really want to do, but when you're using it, that's *all* you're doing, seems a waste to me.

The Apple iPhone: Good thing or not?

So, the Apple iPhone has been launched, it was brought to my attention as actually being announced by the MD at work, who appears to have become a complete apple freak (poor bastard... or is that rich bastard to be able to afford apple's mediocre offerings and be happy about it?). Anyways - from reading the story from BBC News and the official website, here's my conclusions.

First off, when marketing a phone, how about you actually mention it's phone capabilities as the number one priority? I'd like to know about the sound capabilities, the battery life, the overall user feel for it as a phone... maybe I'm odd, but a phone has a purpose, it should make and receive calls, and it should do that job *well*, with good quality voice, a decent (filtering) microphone (it's a mobile, you'll be walking whilst speaking on it, reducing the background noise is a selling point), but apple appear to have mostly avoided talking about this. Instead, the first thing that you're told about from the news story is the unique user interface - great, so we have a touchscreen "whoop, de, do!". Worse still, from the official site, the first thing that springs out is that it's a "Wide Screen iPod" - it's a phone, if I wanted an iPod I'd buy a damned iPod - as it stands, for my music needs I have an iAudio M3 which suits my portable music experience really rather well. I choose that on the basis that it provided ogg support out of the box, didn't require any magical software (I run linux on my machines, it presenting itself as nothing more than a USB hard disk was fantastic, and means that I can use it for other things when needs arise). For a phone I want something that actually behaves like a phone, looking at the iPhone it's primary purpose appears to actually be a media player - that's not good.

With the iPhone only having a touch screen interface, and from everything that I've read there's no stylus and the "finger is the ultimate pointing device", I'm just expecting that within the first 2 weeks you're going to have a scratched or smudged screen from usage alone, add in the fact that it's a mobile phone, and therefore generally treated with contempt (neccessity rather than luxery), and that most people carry mobiles in their pockets without any form of protection (easy and fast access) and you've got a recipe for disaster! The touch screen is going to be hit (wether you like it or not) whilst the phone is in your pocket, it will wear - there's no question in my mind about it. Touchscreens aren't designed to be smacked around 24/7, they're touchscreens - they respond to touch! So, assuming that you're shiny new iPhone is sitting in your pocket a lot of the time that's a lot of usage of the touchscreen - they're not designed for constant pressure (think about what happens to pockets in trousers when you sit down...), so I don't think that, overall, the sensitivity of the screen is going to last very long. It's only got a fairly narrow screen too, so what about those of us with not entirely slender fingers? When composing SMS messages on it with the on screen qwerty keyboard, do you really think that you're going to get the right keys every time? Small, on screen, buttons and pubs do not mix - and I'd hasten a bet there's a fair number of SMS messages sent from, or on the way back from, the pub, with a predictive text system at least you can almost work out what the heck the person was trying to say - this is a whole new ball game.

The iPhone also makes the phone functionality only available after you've hit the part of the screen that says "Phone", now, I don't know about other people, but if I'm being given a number, I tend to just start hitting the right buttons on the phone, I can store the number later (via the call register or whatever) and hit call, now there's an extra step to getting in touch with people.

From the official site we have the words """ iPhone also introduces an entirely new user interface based on a large multi-touch display and pioneering new software, letting you control everything with just your fingers. """" - now, err, just when did a phone require you to use anything other than your fingers? Please tell me, I'm dying to know - I've never yet needed to use my feet to operate my phone, have you? This is marketing gone insane - and what worries me is that people actually believe this bullshit.

Apple may have "revolutionised" the computer industry with "Mac OS X" (this is actually not something that I believe, and OS X actually makes me more frustrated than being sat infront of a windows desktop - and believe me, that's difficult), but this is a phone, how about they try making it about the phone first, and the next generation tart audio player second?

I'm willing to be convinced that I'm wrong, but I definately won't be going out of my way to aquire an iPhone just because the marketing spiel looks good.

Google vs Gaia

Clint I can see where you're coming from, but as it's the access to proprietary data, that is licenced, I can see exactly where google are coming from - it's not "evil", it's just data protection - it's not thier data after all, they have deals with other people for that data, there is money transferring between google and other companies for that data. The source that was being provided was misusing the data itself, though not a bad goal, it did break the EULA of the data. This is the data age - you want things to be non-evil, make the content providers open the content, don't claim $company is being evil because they're trying to keep their EULA with the content providers.

Woo! I have a working PyLucene! (Err, and some other stuff about full text indexing).

I've been after a python library to mess with lucene indexes for a bit, we use/write a fair few things that use lucene at the backend at work, and just occasionally it would be very useful to be able to fiddle in them (read: search from the command line) without having to do the "write java, compile, test, recompile because you got something wrong, retest, and again" type loop for simple things. Using X11 Forwarding over ssh over a shared with the rest of the office 2M line to use Luke on the indexes is just not fun at all! So, now that I've got pylucene compiled and know the right options (ish), and it compiles on Debian Sarge (both i386 and amd64 variants), I might just build me a package for installing on our servers so that there's an "easy" option for us sysadmin types that just need stuff that we can use, quickly, without messing about!

Semi-planning writing a luke-alike using PyLucene and the ncurses library to make it easier to diagnose/look in to the indexes on remote servers, but that's not going to happen this week!

Quite impressed with the speed though - looks *fast* - but then, I suppose if you compile the Java using gcj to get native code, then you can expect it to be a *bit* quicker than running in the vm, right? At least, that's what I'm attributing it to at the moment, well, that and python startup time is likely to be a little bit quicker than java startup time.

Also, in my travels, I found Divmod Xapwrap, which is a python library round Xapian which seems to be another (interesting) full text indexing engine. Haven't played with that yet - but could be worth a look in the future. Core library written in C++ so should be reasonably quick. The bit that I like the looks of though is """Xapian can search across several databases as easily as searching across a single one. Simply call Xapian::Database::add_database() for each database that you wish to search through.""" which sounds very useful if you start thinking about distributing indexes across a number of machines. I've not read enough Lucene documentation to know wether you can do a similar thing there.

Right - enough of that - time to put things back together in the office and go home (again!). Hopefully tomorrow morning I won't be rudely awoken at 5.30am by someone asking a question that could have been better asked via e-mail (where "better asked" means "wouldn't have woken me up and annoyed the hell out of me because I couldn't get back to sleep", though - I did then play with some things and watched American Pie: The Wedding before heading in to the office the first time round...).

I want one of...

These! Shiny, compact, nice. Now, who's going to buy me one? :)

Django Packaging

Well, I've been added to the python-modules project on alioth and am looking at getting the django development in there over the next week, just need to get my head round how this works first and checkout Raphael Hertzog's repackaging of the 0.95 debs that I did in to the new python policy style. Will also need to work out what to do about different python versions, django-admin.py would need to call the right python depending on some setting - not sure how to do that yet - with the previous format there where just 2 different python-django packages for the 2 different versions of python, and then an alternative to point to the "right" django-admin.py within site-packages of the correct python directory - with the central install this is going to be more interesting. Any thoughts on this gratefully recieved to my email address (linked from the bottom of my website.

Eclim...

I've been looking at getting eclim working on my laptop... haven't yet worked it out, can't get the eclimd to run as expected - it's looking very much like I might need to actually do a central install which means creating a package (stuff does not get installed on this machine in central locations unless it's packaged, hopefully for obvious reasons) so I may take some time out to package it over the next week or so. As far as Java IDEs go, eclipse is where it's at, but I don't like the UI and so, being able to use the useful bits of eclim from a text editor that I use for everything seems to me like a fantastic idea... especially now that I'm editing more Java than previously - my current dev environment it purely vim with a reasonable vimrc that sets expandtab, sw=4, ts=4 to fit with the company policy on java development - would occasionaly be useful to use eclipse to manage various things for me though - so that's why I'm looking at it (thanks for pointing me at it Joe!).

AJAX And Accessability

MJ Ray talks about AJAX and Accessability, as much as I hate most things JavaScript, and most things on the web (it's full of bad designers, and pages that I just can't view with a text based browser... grrr ;), I have do disagree with AJAX inherently breaking accessability - that'll be bad web designers. AJAX and JavaScript are supposed to be used to enhance the user experience when run on a platform that supports it, they are not there to replace the job of the server in the first place, good web designers know this, and when they use AJAX it's to minimise data transfer when JavaScript is enabled, but otherwise everything should have safe fallbacks, ergo they're still accessable.

It's not the technology that is the problem, as usual it's the crowd of "ohh, shiny" that don't use any common sense. Fix the people, fix the web. While people are still in the "oh shiny" mindset, we're going to see more problems, it's quite simple. New technology, expecially stuff that really actually isn't new, it's just been bent in to "shape" by a bunch of people that had more time than sense and wanted a set of libraries to make sick things possible... make things simple, people use them. People use them, they use them incorrectly. It's been the way of the world for many years. Simple solution to the problem, force people to use a text based browser for a day a week - no, not w3m with javascript support, that'd be cheating... watch as the web (slowly) became a better place.

Anyways - that's my 2p on the issue.

New Django Packages

I've been slacking a bit of late on updating the django packages - and there was a new release (0.95), so if you're using my python-django packages of 0.91, beware, the latest version has some backwards incompatible changes - you'll be wanting to look at http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges which documents all the changes... I've also made new python-django-svn-trunk packages (guess what they follow ;), so they should be ready for use now.

Go forth people, and make the web a better place :)

Oh, packages at:

deb http://www.sommitrealweird.co.uk/debian/ sarge django

or

deb http://www.sommitrealweird.co.uk/debian/ sid django

Well...

I got the MoinMoin parser running in django, and now have a mostly working wiki implementation using the MoinMoin parser (yay!), I ended up using the text_xml rather than text_html formatter for MoinMoin, this turned out to be a good idea, and meant that I didn't have to worry about them thar themes that get called otherwise. It still needs a few mins more work to actually make it a usable wiki, but the proof of concept worked.

Next on the list: writting a nice blog engine and moving my blog over to it rather than using pyblosxom... actually, I can do this one very trivially for a straight port of the current blog :)

Finally...

After much messing about - I've worked out how to use the MoinMoin parser in other python programs... this means that later (after I've slept) I can write a django template tag to unwiki things nicely, using MoinMoin's parser and so not invent another wiki parsing engine (hoorah!). All that I need to do now is reimplement the text_html formatter from MoinMoin in to something slightly more useable in other apps, then we'll be there. Yay! And indeed, hoopla!

I could, of course, use the text_xml formatter instead and then just do an xslt transformation on it in python... actually, that might not be such a bad idea... hmmm. I'll have to think about it :)