300 (and Counting)

300-postsAs 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!

300-1I 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]

300-bowlingIt 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 [1], 300. The movie was technically interesting for its CGI and maybe a bit for its historical origins, but I thought it was just okay.

WatchmenBut 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.)

But if you blog here and you’re familiar with XML and XSLT, this might be a tasty treat for you!

xslt-overview

The overview page.
[click for big]

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.

xslt-cats-tags

Cats & Tags
[click for big]

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:

  1. wp-overview.xsl
  2. wp-posts.xsl
  3. wp-pages.xsl
  4. wp-images.xsl
  5. wp-cats-and-tags.xsl
  6. xslt.css (stylesheet for the HTML)

xslt-images

Images listing
[click for big]

These are just text files (with an .xsl extension), so save them to your system using the appropriate technique. In the Windows world, with most browsers, if you right-click on the link, you’ll get a pop-up option to save it as a file. Specifically, they are XML text files (which use the XSLT dialect).

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!

xslt-posts

Posts listing.
[click for big]

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’.

chrome showing xslt

Some XSLT as shown by Chrome

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)!

<!–?xml version=”1.0″ encoding=”UTF-8″?>
<!–?xml-stylesheet href=”wp-overview.xsl” type=”text/xsl”?>
<!–
This is a WordPress eXtended RSS file…

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!!


[1] gnovel: Graphic Novel. The ‘g’ is not silent.

About Wyrd Smythe

The canonical fool on the hill watching the sunset and the rotation of the planet and thinking what he imagines are large thoughts. View all posts by Wyrd Smythe

10 responses to “300 (and Counting)

  • rarasaur

    Ahhh, I’m so excited by this. I want to leave work early and try it out, ha! 🙂 Happy 300th! *party popper sounds*

    • rarasaur

      Also, I think we’ve had this discussion before, but like you– I love Watchmen (the gnovel and the movie adaptation). I saw the movie in theaters and many people walked out from — boredom! Seriously. I was entranced the whole way through. 🙂

      • Wyrd Smythe

        I’ve been a fan of the gnovel since the late 80s. When I heard it was being filmed, I scoffed. No one could bring the richness and genius of Watchmen to the screen, I was certain of that. At best, I thought, it might be as decent as V for Vendetta (another Alan Moore work, of course).

        I’ll repeat myself: Snyder blew the fuckin’ doors off!

        There are parts in there (the Comedian’s funeral, for example (ever wonder why “fun” is in “funeral”?)) that were so evocative of the gnovel it brought tears to my eyes. Snyder clearly used the source as a storyboard and stuck pretty close to it. I haven’t seen such authentic realization since Rodriguez’s Sin City (where, again, entire scenes visually right out of the gnovel). And he gets it, he gets what Watchmen is really about.

        It’s one thing to pull that off for a regular novel. Peter Jackson, I thought, did a wonderful job realizing Middle Earth. It seems to very closely match my inner visions as well as those of most people I’ve talked to about it. (The Hobbit, on the other hand… sad how the mighty fall. I guess now Jackson, too, has ‘that other series’ we won’t speak much of.)

        But to pull off realizing a graphic novel, with it’s pre-existing visuals, and to do it that well? My, oh my! And on top of that, to honor the source material so rightfully. It’s going to take a lot more viewings before I’m really even capable of seeing any flaws in the piece!

    • Wyrd Smythe

      You noticed the pingback, I assume. I was just about to pop over to your article and let you know that, finally after all this time, I have something shareable. I actually think it’ll be important for others to have a go at this, as there is more info in the XML that could be listed. I suspect the way I use my blog is extremely vanilla, and there may be meat for them in that XML that I know not of!

      So it’s a work in progress, and I’m open to suggestions, is my point!

  • Renard Moreau

    [ Smiles ] Nicely done!

    300 posts clearly stated that you were busy posting.

  • Lady from Manila

    Happy 300th posts! It’s also delightful of you to share the link to your Newsvine site. Really nice. I wonder, does that mean you won’t mind your readers calling you by your first name from now on? 🙂

    I liked “300” the movie partly because it targeted women audience through its showcase of good-looking guys with their powerful muscles and six-pack abs (except for Gerard Butler: I find him unappealing). The movie was highly entertaining, too. I’m putting “Watchmen” on my must-see list.

    I have to agree: the little walk through a part of your world is overwhelming and a bit scary – just looking at all those mazes, charts, equations, etc. But it’s good to see you’ve been writing.

    My online time is limited on weekdays. Will be back on the weekend. You’re doing great, Wyrd.

    • Wyrd Smythe

      Yes, I know; I was surprised to see the Weekend Warrior showing up in my comments mid-week!

      Scary, eh? Considering the coming posts, “Be afraid, be very afraid!” (But in cyberspace, no one can hear you scream!!) 😈

      Yeah, all those shirtless guys wasn’t really a high point of 300 for me. 😀 The effects were kinda cool, though. The rather unique way he did the fight scenes, for instance.

      Watchmen is a story with so much substance and texture to it that some people haven’t liked it. It may be one of those ‘really like it or utterly left cold by it’ sort of things. Being a fan of the gnovel seems a sure ticket to liking the film (I’ve found no exceptions so far), and I know lots of people new to the story that really liked the film. I hope you will, too!

      I haven’t seen his Owls of Ga’Hoole or (sadly) Man of Steel, yet, but Sucker Punch was interesting. I really need to see Man of Steel!! He’s slated to do another Superman movie in 2015. (And another 300 next year.)

      I can’t really prevent what people do (well, actually, here I can — I can edit or delete comments — but not elsewhere), and it’s true there are pointers to where the cat is plainly out of the bag. But here I’m Wyrd, and those who respect me will honor that.

  • Lady from Manila

    I was simply kidding :-). Then Wyrd it’ll stay because I respect you and honor our blog camaraderie.

    Why haven’t you watched Man of Steel yet? I did, but stopped looking at the screen in the middle of the film because I got dizzy of too much motion in it (my problem – just like getting dizzy on board an airplane or ship). It’s good; Same story with Chris Reeve’s Superman, though.

    I read the next “Superman” will have the man of steel working side by side with Batman. That’s exactly what the director said. I’m looking forward to it, and the next 300 as well (but wasn’t the latter historical? How could it have a sequel? They all died at the end of the movie. :-)).

    I do hope you get to find the readers you are targeting with this blog, Wyrd. You have so much to share. In my opinion, it may help by looking for them, visiting their blogs and initiating a fellowship. Most of my pals (only very very few though) I made through that manner – including you. And I feel glad to have done so or I wouldn’t have found some of the very best bloggers inhabiting WordPress.

    Take care, dear pal.

    • Wyrd Smythe

      My hearing has gotten so bad that going to the theater to watch a movie has become a frustrating experience. There is also that the prices have gotten extremely high while the quality of service and environment has gone way down. Plus I find many, if not most, recent films disappointing and shallow, little more than eye-candy for bored teenagers. So I got out of the habit, is all.

      For some reason, very lately I find it hard to sit still for a whole movie just watching the screen. I’d rather be doing something. Sometimes I almost have to force myself to sit down and watch the TV shows I try to keep up on.

      Sequels… Hollywood loves them and apparently so do people. In these challenging times, I wonder if people don’t crave the familiarity of known territory. While some of us hate the way trailers give away so much of the plot, Hollywood has discovered that most people don’t like surprises and want all that info in the trailer. ([sigh] Which is just, I dunno, reason #5281 in my list of why I don’t like people very much.)

      You know how little kids like hearing the same story over and over again? Or how they’ll watch the same movie so many times you’d think their heads would explode (as their parent’s heads threaten to do)? I’m convinced it’s because everything is so new to them all the time that they are desperate for some island of familiarity they can ground upon.

      I think a lot of people are in that same boat these days. So much beyond their ken, and so much changing all the time, they they feel lost in a sea of confusion and ignorance. I can well imagine that not being too challenged by a mere movie could be high on their list of welcome comforts.

And what do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: