bpublish
January, 2001

I usually call bpublish an automatic HTML generator, but it's really much more than that. It allows you to design your own content description language, specifically tailored to the type of content you need to describe, and provides a framework for writing your own output generator, for whatever sort of output you need to generate.

Basically, you write up your content with the flexible bpub syntax and user-defined keywords. You then use Perl code to describe what each keyword means. bpublish ties everything together, and provides your Perl code with everything it needs to do the job easily.

Hand-writing HTML for a complex website constantly involves tedious and error-prone duplication of common constructs and themes. Graphical editors give you little control over the low-level details. Both make you specify what you want, instead of letting you describe how to make what you want. bpublish gives you the how as well as the what. You get complete control over the details, but it eliminates the tedium by turning website design into a programming problem. You don't write the HTML -- you write Perl code to write HTML for you.

The main thing is that if you design your architecture right, you can end up with complete localization of the description -- each bit of information defined in just one place. On this website, for example, if I want to correct a spelling error, or add an item to an index, or change how paragraphs are formatted, or change how indexes are laid out, or change the entire color scheme or layout, I just make that change in one single place. I then type "bpub main.bpub" and that change propagates to one, or ten, or a hundred HTML files in just a couple of seconds. If I want to add images to a page, I don't have to make any changes whatsoever. I just drop the image files into the right directory, and my bpub code finds them, figures out their dimensions, and puts them on the page. Because the output generation is handled by custom Perl code, I don't have to tell it anything that it can't figure out on its own.

bpublish has matured a lot over the last year, and now includes dynamic evalution, image inspection, persistent data structures (database, sort of), keywords for programming constructs, methods for easily sharing functionality among keywords, and all sorts of other neat stuff. I've built two very different websites with it, and use it for other text-generation tasks, and I absolutely love it.

If you want to try it out for yourself, you're free to download the entire program, or browse the docs. The manual is complete and well-detailed, and the full package contains most of the source code for this website for example purposes.

bpublish.tar.gz (v1.41, 67Kb)
bpublish_manual.txt (v1.41, 46Kb)
bpublish_changelog.txt (v1.41, 4Kb)