Imported From Epistula MLP

Musical Batons


So, I’ve been passed a baton

Total volume of music files on my computer

nicholas@elysian:~$ du -csh Music podcast
5.4G    Music
4.5G    podcast
9.9G    total


aquarion@atoll:aquarion$ du -csh mydocs/My Music
9.5G    mydocs/My Music
9.5G    total

So about 20 gigs total

The last CD I bought was

British Sea Power – Open Season (A great album), though I have The Arcade Fire – Funeral on order from Amazon. It’s a good album as well (Or at least from the track I’ve head, which on the free CD on this month’s edition of Word Magazine.

Song playing right now:
The Kinks – Wonderboy
Five songs I listen to a lot, or that mean a lot to me:
  1. Divine Comedy – Bad Ambassador
  2. Xtension Chords – Light in your eyes
  3. Summertime.
  4. >

  5. Barenaked Ladies – When I Fall
  6. The Kinks – Sunny Afternoon

At the moment, I’m also listening a lot to this too.

The five people I’m passing the baton onto:
  1. Aquarius
  2. Sarabian
  3. Cathy
  4. Rory
  5. Stephen
Imported From Epistula linux


So, I saw gonzui and thought it might be useful.

tar zxvf gonzui-1.1.tar.gz
cd gonzui-1.1


sudo apt-get install ruby


sudo apt-get install bdb
apt-cache search bdb
sudo apt-get install libdbm-ruby1.8



cd ..
tar zxvf bdb.tar.gz
cd bdb-0.5.5/
less README.en
ruby extconf.rb
sudo apt-get install ruby-dev
sudo apt-get install ruby1.8-dev
ruby extconf.rb
sudo apt-get install libdb2-dev
ruby extconf.rb
sudo apt-get install libdb4.3-dev
ruby extconf.rb
sudo make install



cd ../gonzui-1.1


sudo cp /usr/local/lib/site_ruby/1.8/i386-linux/ /usr/lib/ruby/1.8/


apt-cache search libruby
sudo mv /usr/local/lib/site_ruby /usr/lib/


(Sod this)

cd ../
rm -rf gonzui-1.1* bdb*
Imported From Epistula Personal


So, Life Continues Apace.

Currently working on various things for various people (Edited 2006/02, since links to the various companys we work for was causing me to be found by company’s clients) as well. Development on Aquaintances2 has moved over to TRAC, which has necessitated me learning Subversion (That’s the new home for Epistula and AqWiki development too, and they’ll get TRAC installs soon)

In less code-related developments, I still need to learn to drive so that I have more time to… er… code.

I went to a wedding on Thursday between two of our directors. Thursday is an unnecessarily cruel day for a wedding, as it meant that I was working on friday with a hangover. The beer was good, though, and the wedding was fun, and the happy couple were very happy.

A side effect of talking at the wedding was the discovery that we have the componant parts of a band within the office, which may or may not end up being ever mentioned again. Until the next time we see a live band and go though the “I wanna be in a band” reaction.

Boots have expanded their “Meal Deal” thing to include the Sushi. The sushi is 2.90 on its own, or 3 with a drink and a something-else. This is Dangerous, so I pass it on in a spirit of helpfulness.

Off to play games shortly. Here endath the actual update.

Imported From Epistula Projects web development

Max Width and the mutant GreaseMonkey

GreaseMonkey is a Firefox Extension that allows you to run arbitrary Javascript files on pages from your client. This is cool, because you can do stuff to pages after they’re downloaded to make them work, or cooler, or both.

There are a large number of greasemonkey scripts already written and various people are rewriting more. (Actually, once my NDA runs out – and if my ex-CEO has given up on the idea – I may rewrite the fabled BrowserAngel project in GM)

So, with all that in mind, I’ve fixed something that really annoys me in a few sites I use, and have solved this problem with GreaseMonkey.

One of the problems with most aggregators which display more posts on one page is one of styling. If a single one of the feeds you can see puts in an oversized image, either the entire page/frame – and all the posts on it – is extended somewhere into the far reaches of horizontal-scrollbar-land, or just that post is, with the effect that you see the scrollbars for the rest of the page too. Also, you are probably going to have to scroll around looking for content. And it’s fugly.

One solution to this is the max-width CSS element. If you drop something like max-width: "100%"; into your CSS Style or userContent.css, it’ll force all images to have a maximum width of the area available. The down sides are that either everyone in the world needs to put it in their CSS files – which is unlikely – or you put it into your browser defaults. The latter causes it also to affect unwanted things, like if you view an image on its own there is no way to force it to display at actual size.

Max Width, btw, doesn’t work in IE 1 though 6. Don’t know about 7 yet.

My first solution to this was a bookmarklet which iterated though all the images on the page and made them all max-width: 100%, which works perfectly.

Here it is: <a href="javascript:function mis(){imgs = document.getElementsByTagName("img");for(i=0;iMaxWidthifier

The downside is that Bloglines, which is one of the two places I have this problem has a frames interface, the Bookmarklet doesn’t work, because it only applies to the top level frame, not the containing frames. (The site with the problem is LiveJournal. Actually, most of the feeds with this brokenness on my Bloglines feed are syndications of LiveJournals & LJ Communities, but I digress).

So I’ve packaged the whole thing up into a GreaseMonkey user script, which does apply to the framesets, and defaulted it to apply to Livejournal and Bloglines.

Here is the Greasemonkey Script

Current Affairs Imported From Epistula music Politics

Get better elections, part two

In every place where it matters to me, nothing changed.

No matter

Aquaintances Imported From Epistula

Aquaintances 2 alpha 000.1

It works.

Well, it takes a list of feeds, downloads them and displays the content, and doesn’t crash anymore.

Now to make it do interesting stuff.

It looks like this currently. It defaults to showing the full article in the main window, which is just temporary (It slows down the browsing too much, but was quicker to implement). The combo-box above the subscription tree will chose from a list of defineable filters (“All unread”, “Just highly rated things” etc). and the progress bar will move prettily.

If you really want to give it a go, the code is here, but the closest thing you’ll get to installation guide is the entry below this one. The only way to get feeds into the system currently is to run the “import OPML” button (The lightbulb on the taskbar, not the file selector. yet) which is hard-coded to import from the file “subs.opml” in the aquaintances2 directory.

Next: Filtering, and cleaning up the code a bit. First: Sleep.

Aquaintances Imported From Epistula Python

Aquaintances 2

Aquaintances 2 is an XML Feed reader for Microsoft Windows, Linux and Apple OSX. It will support baysian filtering of posts – meaning posts you are more interested in will float to the top of your reading lists – as well as regex field matching. It is built in GTK/Python (on top of LibGlade) using the Mozilla Firefox GTK bindings. It parses feeds with the Ultra Liberal Feed Parser, stores them (and most other things) in an SQLite database. It will revolutionise the way you keep track of the world.

Natually, it doesn’t work yet.

This morning I fired up Glade and put down the main interface for the system, which involved a certian amount of farting around with GTK’s box model, and all was fine until I had to attempt to tie the web browser to this.

My preference for this project was to use Mozilla’s “Gecko” rendering engine for the actual displaying of feeds, which was made more difficult by the fact that there are three sets of pages refering to the GTK bindings I was looking for. PyGTKMoz is an aborted attempt to get it working, Mozilla itself has a website on the subject, and PyGTKMoz refers me to PyGTK, which doesn’t mention the bindings at all. Eventually it transpires that the Mozilla bindings are now part of “python-gnome-extras”, which an apt-get installed for me.

That failed to work, because it doesn’t require “mozilla-dev” or “mozilla-firefox-dev” and even when those are installed, I had to manually add /usr/lib/mozilla-firefox add /usr/lib.mozilla to /etc/ so that Python could find it.

Then I had to work out how to get a Widget Glade doesn’t know about into my nice Gladey interface, for which this article was a handy guide, although it’s bitrotted a bit.

Okay, so we have an interface that happily displays a webpage. time to put some actual feed data in it. Importing my OPML file from Bloglines, I wrote a thing to parse the XML (Starting with minidom, which failed because I needed to keep track of recursive tags. so I rebuilt it in SAX (An acronym with too many abbreviations in it) with the standard push/pop method of keeping track of where the hell we are, a method I’ve always found exceedingly ugly, but at least it’s quick…

The tree interface to the subscriptions list was next. The GtkTreeView element caused me a number of problems, partially because I was trying to use it before I really understood it. Also, all the tutorials for using it I found (iki fi, & moeraki were the most useful, as well as the Real Docs) assume you’re building the thing from scratch, rather than editing an already existing TreeView object. Also, there was an interchangability between “TreeStore” and “TreeModel” that was starting to give me a headache. Then, in a blinding flash of light, my screensaver kicked in, englightenment dawned, and I finally grokked it.

So, I have an interface with working buttons that displays the home page of every feed I subscribe to. Except three, which causes a segmentation fault for reasons I don’t understand, but are probably Not My Fault.

Aim is to get it reading and displaying feeds by tonight, with the Bayesian stuff happening tomorrow, at which point I release Real Code and start making it both cool and useable.

2005-05-02: Changed gtkmozbinding instructions, the firefox library appears to crash if you need a plugin