As I’ve posted articles recently, it’s been impossible to not to notice a looming milestone: post #300! Which is what this one is. At least, it’s the 300th post on this blog. The double qualifier is because there are a number of pages not included in that count, and because I had a go at a baseball blog before I started this one. (Plus I have another blog with a small number of posts.)
On top of all that, there’s all the stuff I wrote on Newsvine and other online forums, not to mention several personal website incarnations. And I can’t even begin to number how much I wrote for work over the years; there were four websites I authored and countless user and technical documents.
But still… 300 Logos Con Carne posts, that’s not nothing!
I tried to find something really 300-ish as a tie-in, but 300 actually turns out to be a fairly boring number. Wikipedia is strapped coming up with anything very exciting about 300 other than the Zack Snyder movie, which we’ll get to in a sec. (Preview: blew the doors off Watchmen, so I’ve been a fan ever since.)
Being in a very POV-Ray frame of mind these days, I decided I’d create my own 300 commemoration whachamacallit. (Because searching for 300-ish images turns up a ton of stuff from the movie and not a whole lot else.) It’s the headline image above; click it for a big version. (Go on; I dare ya!) That mountain of “posts” you see stacked up; there really are 300 of them!
So, 300. Yea! [noise of party popper]
It is a perfect score in bowling, but I’m not much of a bowler. I do like it — enough that I own shoes and a ball — but other than part of a season in a friend’s bowling league (she needed a replacement for someone who dropped out) I haven’t done it much. My highest score is only 144 (and that was a proud day).
But it’s fun. There’s something about the sounds of a bowling alley that I love, and any “sport” that comes with pizza and beer already has points in its favor. Plus, the modern scoreboards these days are very cool!
I like Zack Snyder‘s films, but I can’t tie his 300 in here, because that one I thought was just okay. I wasn’t much moved by the source material, Frank Miller‘s gnovel , 300. The movie was technically interesting for its CGI and maybe a bit for its historical origins, but I thought it was just okay.
But I thought Watchmen was outstanding (both the original gnovel and Snyder’s realization of it). Snyder got it so right that I actually like his revised ending better. It fits the current era and looked great! More important to me was how well he honored the source material, both as a story and as a visual piece.
(I’ve got a two-post article about the gnovel that I wrote for Newsvine before the movie came out. Perhaps I’ll re-post them here to provide at least a little relief from the coming geek storm.)
In honor of this 300th post, I will tell you about something I’ve been working on that has direct application with WordPress blogs. It’s really, really geeky, so I’m not sure how many will be able to make use of it, but I’ll put it out there. (I will entertain some requests for support, but I don’t want it to become a thing or a distraction.)I’m grateful to Rarasur for mentioning the ability WordPress has us to get an XML file that’s a copy of your blog. Having some kind of XML version of your blog opens all kinds of doors, because XML is a standard, very well-known way of storing tagged, hierarchical, potentially data-typed, data. Lots of things can use XML to do cool things.
One of them is XSLT, which can take XML and transform it into HTML of your own design. HTML is web pages, so if you can turn your XML blog copy into a set of HTML pages, you have a nice way of displaying… well whatever you might like.For example, how about an overview giving you the number of posts, tags, categories, images, etc. in your blog so far? Or a page listing all your posts, with a list of categories and tags and a link to that post? Or a page listing all your images, again with links to the image?
Maybe it’s the librarian in me, but those things sound great to me. I wanted them, and when Rarasur used “blog and XML” in the same sentence, I realized I could get them!
Took me a while (writing XSLT is sort of mind-altering; I have to be in the right frame of mind), and it’s not got all the features I want (yet), but I’ll share what I’ve got.
Which, so far, is five XSLT files you can download and then use with your own blog’s exported XML file. There are two ways you can use these, although one of them is distinctly half-assed. First, let me point you to the files:
xslt.css(stylesheet for the HTML)
You can likely view their text by just clicking the links (it depends a little on your browser). Once you see the text, you can also save it to your system (with your browser’s “save page as” function).
Now — if you didn’t already think so — we get into the technical part.
What you want to do is use your blog’s exported XML file along with each of the five XSLT files above to generate five HTML pages. You do this by (five times) invoking the XSLT engine and passing it the XML file and one of the XSLT files. The engine does the rest, and the result is five nice listings of your blog stuff!The entrance exam of your worthiness to do this lies in successfully setting yourself up to “invoke the XSLT engine.” That’s the part you’ll have to figure out for yourself, because it’s very system-specific. It may turn out that, these days, what you need is already lurking somewhere on your PC (because a lot of stuff uses XSLT under the hood).
Perhaps a helpful reader will speak up (hint, hint). At some point, I’d like to figure out a standard way to do this, so I will look into this eventually. If you’re used to mucking about with computer stuff, Go Ogle for [XSLT engine] and take it from there.
The half-assed way is that you can leverage your browser’s built-in ability. If you clicked on the links to view the XSLT files, you may have noticed your browser saying something about no ‘style information’.
When a browser renders an XML file, it desires style information so it can present the XML nicely. If it can’t find any, it uses a built-in default, which is what you saw when you viewed the file. Most browsers, by default, make some use of color (Chrome is very nice that way) in showing you the file.
This is done using the browser’s XSLT engine. The “S” in XSLT stands for “style,” because that’s the primary purpose of XSLT: turning XML into something pretty (in HTML usually, but possibly text). Or if not pretty, at least more readable.
So what you can do is decide which of the five you’d like to see and then make a minor edit to your blog XML to name that XSLT file as its “style sheet”. Now you can view your XML with your browser, and your browser should render the HTML, not the XML.
I say “minor edit,” which unfortunately opens the door to another longish discussion. You need a text editor capable of handling the multi-megabyte size of the XML file. (With just the 300 articles, my XML file is 10+ megs.) Windows NOTEPAD won’t cut it, and MS Word will ruin your XML file unless you know exactly what you’re doing.
BUT! If you can edit the file, here’s what you do. The very top line probably looks like the line in blue below. The lines after probably look like the red lines below. What you want to do is add the purple line (assuming you want the overview)!
Now view your XML with your browser, and you should see the overview. Note that the XSLT and CSS files need to be in the same directory.
So there ya go… a present from me to you and a little walk through a part of my world! Scary, isn’t it!!
 gnovel: Graphic Novel. The ‘g’ is not silent.