Here's the complete text for the download you were just reading about. For those that hate to read documentation, here's a link to DOWNLOAD blok 0.96.

To return to the Downloads page, click the Downloads button at left.

blok 0.96

The blok plugin intercepts the "story" subroutine and converts Mac (ascii 13) or Windows (ascii 13,10) line-ends to the "newline" (ascii 10) that blosxom expects.

This enables you to stop thinking about the line-end format in your word processor, and whether your ftp app is set to convert your native line-ends to *nixies. (Also helpful for processing writebacks.)

You want this to load early, so be prepared to prepend "00" to the plugin's file name. See Blosxom documentation for full details on setting plugin load order.

Installing blok

To install blok, just drop the file into your Blosxom plugins folder. That's it. Depending on what other plugins you're using, you may need to force blok to load before other plugins; prepend its file name with "00" and you'll be O.K.

Configuring blok

No configuration is available; plug'n'play, baby.

Using blok

blok works behind the scenes to convert Mac line-ends (\r) and Windows line-ends (\n\r) to Unix line-ends (\n).

blok operates in the following manner:

  1. If ascii13 (\r) exists in $title, then some type of "foreign" line-ending has been used, and 0-or-more "lines" of $body are trapped in $title; it's even possible for $body to be empty. So --
    • blok first changes all returns in $title to newlines;
    • blok then re-loads the $title and $body vars.
  2. blok next scans $body -- if ascii13 (\r) is found, then some type of "foreign" line-ending has been used. So --
    • blok first changes all Windows line-ends (\r\n) in $body to newlines;
    • blok then changes all Mac line-ends (\r) in $body to newlines.

blok Limitations & Compatibility

blok makes no effort to preserve any \r characters that may intentionally be in your entry files. The best way to assess blok' compatibility with your entry files is to try it out; if entries don't look good, then adios, blok! (Remember: blok does nothing to your actual files -- any mistakes it makes with your entries only appear in Blosxom's output.


DOWNLOAD blok 0.96