htmlpp, an html preprocessor ?
htmlpp is a perl program I wrote starting back in 1994 to
format and maintain html pages and web sites. At the time, I was
playing a lot with my own web
pages. Obviously, it was solving a widespread need, and several
persons across the world started using it. Also, many people came up
with their own solutions, and there are many other htmlpp's around.
Now times have changed, and I guess that most of the problems htmlpp
was designed to tackle with can better be solved using recent tools
like PHP, XML and style sheets. However, from the hits I get on the
web page, htmlpp seems to still be in use!
Anyway, I now have other games to play with, and I try to spend as
little time as possible dealing with web pages. Hence, I am not using
htmlpp intensively myself. That makes me a very bad developper, and
htmlpp has not evolved recently. If anybody is interested in taking
over the development, please contact me!
Note that the web page for htmlpp is now hosted at Source Forge.
htmlpp is an HTML preprocessor based on a system of macro
expansion and interfaced with perl.
It allows to drastically reduce the amount of context HTML stuff to
write and to focus on the contents.
For example, a single macro can handle a standard footer for the
document: navigation icons, email address, links to other versions of
the same document (other language, text-only,... optimized for a
certain browser)). By changing this macro, you can change at once the
standard look of a whole group of HTML documents. Other macros can
contain often used URLs, etc.
It also allows to have a single source file for different versions of
Finally, it's complete interface with perl allows to simply add
- translations in different languages,
- with/without frames, with/without java,...
- optimised for certains browsers.
source pages as short as possible, and with minimum redondance
to make it easy to modify and move theim arround.
a reasonnable general look of each page (navigation icons,
last modification date, links to translations of the same page, all
of this being customizable at once, not in each pages
- multilingual pages, with the source combined in one file with
just different version of the text, so as to avoid duplicating
everything else (links, format,...).
htmlpp construct from a source file and the name of a
language the corresponding page for this language. It does almost work
like the c preprocessor cpp (ie macro expansion), but with a more html
like syntax, and many more functionnalities. In particular, it's fully
interfaced with perl.
Using makefiles, it's possible to completely automatize the update
of the html files versus the prehtml files. You just type make,
and htmlpp is invoked with the correct arguments.
I choosed to use a syntax as html like as possible, to have
homogeneous source files, but with a '#' (in reference to cpp:
#define) in front of all the tags to be sure not to make a mix.
However, I conceived this program, such as to make it as easy as
possible to change the syntax (and thus just the strict minimum number
of definitions necessary for the bootstrap in the code). Thus, if you
don't like it, it should be easy to modify it. It should also be easy
to add new functionnalities.
Condition of use
Beside, I would appreciate if you would send me
an e-mail if you
use htmlpp so that I can keep track of the number of users, and can
send you a message if I ever release a new version. Also, I would
appreciate if you would add a reference anywhere in your
pages. Something like:
This document has been formated by
You can use the macro <#htmlpp> or <#htmlpp::ref>
For suggestions, bug reports (and fixes!), flames or praises, please
send an email to firstname.lastname@example.org.
I would like to thank Source
Forge who is hosting this project, and providing us with all those