YAHP
Yahp is an html pre-processor.
The current version is
0.14 See the Changelog for what has
changed since the last revision.
As of version 0.14 I have taken over as project maintainer from the
original author Izak
Burger. The
original project webpage is still available. I have made some quite large
additions and code changes to 0.14 so please contact me for support
not Izak.
Notes
- YAHP stands for Yet Another Html Pre-processor
- Yahp is an html pre-processor. It's design is largely based on that
of pre_html and some of the tags are similar and has the same
function. Yahp however is written in C using flex, while pre_html is
written in perl.
- Yahp builds html pages out of "templates". It is especially useful
for building web sites where the look and feel of all pages should be
the same. Yahp is especially good when combined with a good Makefile
system.
- Yahp scans the template for key words embedded in html comments. It
will then perform some action as specified by this tag. Yahp has the
ability to include the contents of other files into the generated html
document. It can also read data from a mysql database, write portions
of the generated html page to another file (called an index file) for
inclusion into other pages and insert the current date.
- MySQL support is especially useful where certain information needs to
be shared. The master copy can then reside on a single system.
Installing
- You need to have MySQL's development files installed to compile yahp.
- You also need flex.
- You need make
- You need a compiler
- Unpack the source tar.
- Type make - Known to work on Linux and solaris 2.6 (with gcc)currently.
- Copy the resulting executable to a convenient location in your
path. Never make yahp suid root. It was not written with that in
mind.
If you have trouble compiling Yahp, please check the values of CFLAGS
and LOADLIBES at the top of the Makefile.
Good values for Redhat 6.1, 6.2 and 7.0 are:
CFLAGS=-I/usr/include/mysql
LOADLIBES=-L/usr/lib/mysql -lfl -lmysqlclient
I don't know about other distro's. On debian I use a non-deb
version of MySQL, which makes mine about as non-standard as it gets :)
Basic Operation
command usage
yahp [options] [template file]
Option Switches and their explanations
Switch | Name | Default | Description |
v |
Version |
|
Prints the version infomation |
i |
Index File |
|
Sets the index file to use |
t |
Title file |
|
Sets the title file to use |
I |
Include |
|
Sets the include dir |
h |
Host |
|
Sets the Mysql host to use |
m |
Database |
|
Sets the mysql db to use |
u |
User |
|
Sets the mysql user to use |
p |
Password |
|
Sets the mysql user password to use |
s |
Shell |
/bin/sh |
Sets the shell command to use for macros |
Known Problems & Omissions
- more flexible use of mysql data i.e. I need to get rid of the
hardcoded htmlblocks table and the hardcoded field names.
- A configuration file might be nice. That way you don't have to
pass all that options on the command line. On the other hand...
Licensing
See the licence file for more details
Any problems with this web page mail Vincent Sanders
There's lots more to the site! A good place to start is the Main Page.
100% hand typed HTML
© Vincent Sanders
$Id: index.html,v 1.1 2002/12/15 00:05:05 vince Exp $