2004-06-26

Technical details on this website

[R: this is for you. Thanks for you-know-what]

Update 06 Jul 2004: added "seemore" functionality into siki. Now it looks like a real blog ;-)

before blosxom...

In the beginning I had a home-grown program that did just one thing: change a plain text based notation into HTML, with certain rules. This, with a couple of shell scripts around them, "created" simple HTML. I'd written it a few years ago, and it has survived till now in my toolbox.

The problem with using this for a website was that it offered nothing in terms of adding and uploading content. Everything except the actual content-authoring was still manual! So, after the initial setup of the website in late Feb to early March, 2004, nothing changed till mid-June -- it was just too cumbersome.

Clearly, that's no use, even for a self-confessed "vanity" site that's not expected to be of any real use.

blogs compared

By chance, I came upon a comparision of various blogging software [URL lost -- looking...], and I quickly zeroed in on the only one that did not require a database or some other fancy pre-requisites, was written in perl (I may have to mangle it for my own use!), was free as in GPL or similar, and yet had a sufficient number of features.

Blosxom was the only choice!

pre-requisites

The blosxom install page has 4 scenarios (blosxom on your ISP, or on your own Mac, Windows, Unix box). The one for the "ISP" and for "Unix" are the same. The basic pre-requisite is simply being able to run a perl/CGI program.

what to download

To start, we get blosxom.zip from http://www.blosxom.com/downloads/blosxom.zip . This is, as of today, a single, simple, Perl program of only 440 lines! The rest of the magic is via plugins and templates etc. (The templates are also small -- less than 200 lines -- but the plugins are almost 2000 lines!)

Simply unzip into your cgi-bin directory, edit the top few lines where some self-explanatory parameters (mostly paths). Just be sure that the $datadir is not under the web server's DOCUMENT_ROOT!

After this, download the Blosxom Flavour Sampler and install it in Blosxom's $datadir. A "flavour" in blosxom is what some programs call a "skin". Look and feel only. The sampler has 3, and the flavour registry has a lot more, with fancy colours and special effects. I neither have the time, nor the interest -- in fact, weird colours go against my philosophy of creating sites that are usable from even a text browser!

The default flavour is "html", so I changed the corresponding files to suit my taste. head.html had the most changes -- when you install yours, compare how the side bar looks on yours from mine and you will see. "View Source" if needed. Another small but important change is in foot.html; I don't like date-based "permalinks", so I changed them to hierarchy-based ones.

Finally, download a few plugins from the plugin registry. Plugins allow extra functionality. For example, somewhere in my head.html I have $categories::categories. This invokes the categories plugin, which shows the browsable list of categories you see below the "vanity disclaimer".

The plugins I use (with a one-line description of non-obvious changes I made, if any) are:

  • bookmarklet
  • breadcrumbs
  • categories (the DATAsection also changed quite a bit to get rid of the unordered list and make it a "2-space indented" list)
  • entries_index
  • find
  • timezone
  • wikieditish (the actual submit button invokes an HTTPS URL rather than an HTTP URL, since a password needs to be transmitted. What can I say -- I'm paranoid!)
Read more about these plugins on the plugin registry page.

Apart from these, my text to HTML program was converted into a blosxom plugin called "siki". [I haven't submitted it yet, but I intend to do this sooner or later]. Naturally, this took the longest time. You can always write plain HTML of course, but it sucks!

Total effort for the important bits was around 8-10 hours (done over a few evenings, about one hour each time). As is common, tweaking the system after it was working "OK" took about the same time. It's like the old joke: the first 90% of the work takes 90% of the time, the rest 10% takes another 90% of the time ;-)

2004-06-24

(malware,funny,criminal) What happened to "honor among thieves"?

SecurityFocus HOME News: Backdoor program gets backdoored

"It obviously says you should always use open-source Trojans," says Mark Loveless, a senior security analyst with Bindview Corporation. "That's the moral. You can't even trust Windows malware."

I don't know if this guy was serious or tongue-in-cheek but it's a helluva funny comment!

Maintaining this website

...couldn't be easier!

It used to be a single custom script that did everything -- or at least everything I thought I needed.

Then I saw blosxom and I got greedy :-)

Now this is mostly blosxom+plugins; I only added one plugin, (called siki), which allows me to write plain text and converts it to HTML on the fly -- quite like what wiki's do, but tailored to my tastes. None of the existing plugins appealed to me for one reason or other.

Actually, the only website maintainance software I really like is TWiki, but that would be somewhat overkill here!

And I really, really don't like HTML. I would much rather edit a simple text file, and not worry too much about bold, italics, etc. I also hate maintaining links, remembering exact locations, and -- heck -- even exact spellings!

Here are the main features:

  • translating plain text to HTML.

    • *bold* becomes bold
    • /italic/ becomes italic
    • _underline_ becomes underline
    • an empty line following a non-empty line causes a paragraph break
    • lists (UL and OL), as well blockquote sections, are derived from indentation[1]
    • it is possible to create tables also, as you will see on some pages (one example is the set of image links on Joey and Geetha's wedding page).

  • URLs are handled very nicely. You see, even though I felt TWiki would be overkill for a one-man site, I do like the "automatic" linking (a.k.a "accidental" linking) that all Wikis share.

    So I just borrowed that feature, and in fact went one teeny step further. The program that converts the plain text to HTML will also create links by actually looking for the URL in the parts of the webtree that it is allowed to look in.

    If the URL resolves to an image then there is a little extra smarts to it: if an anchor text was provided, that will be used; otherwise, a thumbnail version will be used for the anchor.

    The best part is that the URL can be a regexp, and if there is only one match found, that's what gets used!

  • Finally, I can just use HTML, anywhere in the file, if I need something more complex!

the software

Yes, once it has moderately stabilised I will put up the siki plugin here. The rest of it is plain blosxom, plus the following plugins:

  • bookmarklet
  • breadcrumbs
  • entries_index
  • find
  • siki
  • state
  • wikieditish


[1] My Python-ista friend Raj pulls my leg, saying, "Even perl people have to appreciate the beauty of indentation"