rapple usage guide
assuming that you have correctly installed and configured rapple it is now time to start
building your website. it is assumed that you have source files
ready for processing along with an XSLT (if you do not have one
then try using the XSLT
used to generate this website).
rapple does not take any file arguments and is invoked according
to the follow option syntax:
%rapple [-chvVx] [-f configfile] [-H host] [-d
srcdir] [-o webdir]
the following table describes these options
Option |
Description |
-c |
checking configuration |
-d |
specify alternative sources directory (overrides
configuration file srcdir setting) |
-f |
specify configuration file (overrides
RAPPLE_CONF variable setting) |
-h |
displays help message |
-H |
specify alternative host (overrides
configuration file domain setting) |
-o |
specify alternative output directory (overrides
configuration file webdir setting) |
-v, -V |
specify version information |
-x |
deletes any content in datastore and quits |
finding your configuration file
rapple looks for control information in a configuration file and
searchs for it in the following order:
- the file specified by the -f option on the command line;
- the file specified by the value of the RAPPLE_CONF environment
variables;
- a file called rapple.conf in the current working
directory.
if rapple does not find a configuration using the above methods
then it will fail.
building your website
before building your site for the first time it is worth running
rapple with the -c option to check that your configuration
looks fine. assuming that all is in order let us suppose that your
sources are located in the directory /home/joesoap/html/src,
that you want to build your website in
/usr/local/www/html/mysite and that you are using the
datastore location /home/joesoap/html/dsi.
you can have rapple locate your configuration file by setting
the RAPPLE_CONF environment variable to point to it. for example in
the bash shell this is doing using the export command:
%export RAPPLE_CONF=/path/to/my/rapple.conf
alternatively if RAPPLE_CONF is not set then you can place your
configuration file in the root directory of your sources (make sure
that it is called "rapple.conf".) In either case the site can be
built by issuing the following command:
%rapple
if you need to use a different configuration file then use the
-f option. for example you might to experiment with an
alternative configuration in which case you could issue:
%rapple -f /path/to/alternative/rapple.conf
if you wish to use source and/or web directories other than
those stated in the configuration file then use the appropriate
-d and -o options:
%rapple -d /home/joesoap/html/othersrc -o
/home/joesoap/html/web
finally you may wish to specify an alternative host (i.e.,
domain) for your site in which case use the -H option. for
example you may wish to build a local test site for development
purposes hosted at http://localhost/mysite/, a (public but
restricted) test environment website for user testing hosted at
http://test.mysite.com/ and, a live site for production
hosted at http://www.mysite.com/. rather than have three
(nearly identical) configuration files you could define a
configuration file based on your development environment and when
finished developing your local website build your test site by
overriding the development host (and, if necessary, the output
directory) using:
%rapple -H http://test.mysite.com/ -o
/home/joesoap/html/test
and your live site using:
%rapple -H http://www.mysite.com/ -o
/home/joesoap/html/live
removing files
you may wish to remove some of the files that rapple creates
once you are finished building your website. to remove the
datastore by-products issue the following:
%rapple -x
note that as a precaution only the rapple subdirectories of the
datastore are removed (tidy products and parsing etc.) and that the
datastore affected is the one indicated by the configuration that
controls rapple (if you intended to delete an alternate datastore
then include the appropriate -f option)
troubleshooting
many vendors abuse HTML standards by adding their own extensions
which can cause problems for rapple (and other standards based web
tools). there are several sources of information you can go to if
you encounter problems:
-
check your logfiles: to see if any problems occuring
during processing take a look at the log file
%more /path/to/your/logdir/rapple.log
tip:
whilst running rapple in one window you may
wish to open another window and issue the following command to
continually track changes to the logfile:
%tail -f /path/to/your/logdir/rapple.log
-
look into the datastore: since the datastore cotains
copies of tidy transformations (along with error reports) and
output from the rapple parser it is a useful place to look to
investigate before/after behaviour of the tool.
-
ask for help: if you think you have found a bug or have
a question then contact the rapple development team (mail the users
mailing list) providing a sample of the input you are using.
|