Dang. There was a blog post I was going to write for today, but haven’t. There was another one I could have written, but this isn’t it, either. Instead, there’s this fairly unplanned one.
I’m working on a few different projects at the moment, and for one of them I went looking for a particular tool and couldn’t find it. So I wrote it.
Today introduces a little Mac desktop application called HTML Meets XPath. (Snappy, I know.)
The idea is simple. There are a number of ways to extract data from a web page. Most are a pain, some are slightly less so. One way is to use XPath to query the elements of the page, treating it like you would a tree of XML nodes. HTML Meets XPath accepts some HTML, either by looking up a URL or a local file, and lets you input an XPath query to run against the page. It then displays the results.
That’s it.
Possibly handy if you’re trying to pin down which query to use on a given page, maybe even useful if you’re just learning how to use XPath at all.
A few things to note:
- HTML Meets XPath is written by me, Mark Goody. It's published by and copyright Unexpectedly Spiky Ltd, all rights reserved. (Yes, it's the first public act of Unexpectedly Spiky Ltd. More on that to come.)
- However, it's a free download, at least for version 1.x. If it develops into an all-singing, all-dancing 2.0, that may change. But that's unlikely.
- Please don't republish the files elsewhere. If you want to spread the word, that's cool, but please do it by pointing people here.
- HTML Meets XPath is presented with no warranties or guarantees of any kind. It's very rough, and not just about the edges. I plan to refine it quite rapidly (next job is to make the output a bit more readable), but be aware that this is an early 1.0. It shouldn't do anything horrible to your computer, but if it does then I accept no responsibility. If you're not happy with that, don't download it.
- I've only tested the software on Mac OS X 10.6.2. It may work on 10.5, but I haven't tried it, so let's just say it requires 10.6.
If you want to give it a go, please download the .zip (582 KB), unarchive it and drag the app to wherever you want it to live.
All feedback (good and bad) is welcome. Comment here, or drop me an email. Cheers.
UPDATE: Version 1.0.2 is now uploaded — run “Check for Updates…” from the application menu to get it. The interface now survives resizing the window! The devil’s in the detail, folks…
Yesterday evening, we had dinner with a couple of friends. The guy, who we’ll call Bob to protect the guilty, cheerfully self-identifies as a geek. But during the evening it came out that he had never seen a whole slew of films which I contend are necessary to claim that title.
A sample: Highlander, The Princess Bride, Aliens, The Last Starfighter, Flight of the Navigator, The Big Lebowski, Tremors, many more.
Additionally, he maintains that Voyager is the best Star Trek (when all right-thinking people know that that title belongs to DS9, or at least to the original series), has never seen Thundercats and had never heard of Babylon 5.
There’s some edumacatin’ required.
UPDATE: ‘Bob’ informs me that he had in fact heard of B5. He’s just never seen it. As if that makes it better.
A year ago I decided to publish a new photograph every week, as an encouragement to get out with camera in hand and take some pictures. My only rule was that everything I published must have been taken in 2009. If I hadn’t decided that, I would have been too lazy and spent most of the year digging through my archives looking for anything interesting that I hadn’t posted before.
Instead, most of what I ended up doing was digging through my growing archive of 2009 looking for something interesting that I hadn’t posted yet. I spent most of the year either relying on a few good outings to provide three, four or even five weeks’ worth of images, or running around on a Sunday evening trying to photograph something, anything, to post for the Monday morning.
I’m quite happy with a few of the images posted over the year, but more than a few are just filler.
Photo A Week 2009 was an experiment with mixed success for me.
I tried this once before, but I’m still the same fat pasty. I weigh almost exactly the same as I did then.
So, inspired by, encouraged by and joining with quite a few others, I’m giving the public embarrassment thing another go. It probably won’t show up here too much. Instead, there’s a new twitter feed you can keep an eye on: @beatinggravity. If you like. It should be good for some comedy, if nothing else.
It’s not very complicated, in theory. Eat less and exercise more. I’ve learned from experience that that’s a pretty tough thing to do. I’m a man of considerable weakness and some vice, and food gets me every single time. Good food, cheap food, nasty food, chocolate, cheese… high fat, high sugar, high flavour.
My wife tells me that I seem more enthused and definite about this than I have before, so that’s something, but I’ve always been able to talk a good a game. The proof is in the eating, as they say. Or in the not eating, in this case.
Wish me luck. I have 29-and-some years of habit to overcome. Let battle commence!
(PAW2009 52/52)
It’s been pretty cold ‘round our way over Christmas.