Htmlppc — Usage

Usage

You simply write your HTML pages with your favorite editor and style them with CSS. To let htmlppc process them, you need to add special HTML comments:

<!-- include Identfier -->
Some testing stuff here
<!-- end -->

The lines between the both comments will be replaced by htmlppc. You create a file include.txt, in the top level directory of your project, which looks something like this:

# This line is a comment and not processed at all
Identifier
<a href="index.html">Start</a>
<a href="test.html">Test</a>

AnotherIdentifier
<p>Some stuff</p>

If you run the htmlppc command in your project's directory, the lines from your include.txt will be inserted in the desired places of your HTML files.

Do your navigation this way, and you can easily extend your project by additional pages without editing lots of pages manuallly. That's the reason why I wrote htmlppc.

You can use as many identifiers in include.txt as you want, there is no restriction. There may even be unused identifiers. Only if you use an undefined identifier in one of your HTML pages, it is an error.

Possible problems

Identifiers in include.txt have to be unique. Otherwise, only an error message is generated.

All identifiers in include.txt and in your HTML files are case-sensitive.

An identifier must not contain spaces. It will not work. And it can only use the alphanumeric characters, digits and the underscore.

Manual-page

Of course, there is a manual page installed with htmlppc. If your are not using a unixoid operating system, you can read an automatically created PDF version of the man-page.

An example

This little HTML documentation is processed with htmlppc. You may look at it to see htmlppc in a simple, but real-life project. It is easy for me to add a new page, write a line in the include.txt and let the computer do the dirty work instead of editing all pages manually.

The reason computers exist is, that stupid things are better done by a stupid machine than by an intelligent being.