[ The Sunny Spot ] WPP v2.13 - The Web Preprocessor
Author : Marco Lamberto
Preprocessed by WPP
   Index < Previous    Next >   

  Variables assignment [ ^ ]

@NAME=val@
Valid names can contain uppercase letters, numbers and the '_' underscore char.
The value can contain other variables and macro calls delimitated by the @ char.
Source file
<!-- assigns to FOO_0 the value Title -->
   @FOO_0=Title@

<!-- deletes FOO_1 if defined -->
   @FOO_1=@

<!-- sets FOO_0 to FOO_1 -->
   @FOO_0=@FOO_1@@

  Variables substitution [ ^ ]

@NAME@
Simply put the variable name between two '@'.
Source file
@FOO1=A@
@FOO2=B@
Choose @FOO1@ or @FOO2@ ?
=
Output file
Choose A or B ?

  Special variables [ ^ ]

@DATE_FORMAT@
This variable holds the @DATE@ and @RCS_DATE@ output format. It can be assigned to any string value. Ordinary characters placed in the format string are copied to it without conversion. Conversion specifiers are introduced by a `%' character, and are replaced as follows:
%a The abbreviated weekday name according to the current locale.
%A The full weekday name according to the current locale.
%b The abbreviated month name according to the current locale.
%B The full month name according to the current locale.
%c The preferred date and time representation for the current locale.
%d The day of the month as a decimal number (range 01 to 31).
%H The hour as a decimal number using a 24-hour clock (range 00 to 23).
%I The hour as a decimal number using a 12-hour clock (range 01 to 12).
%j The day of the year as a decimal number (range 001 to 366).
%m The month as a decimal number (range 01 to 12).
%M The minute as a decimal number.
%p Either `am' or `pm' according to the given time value, or the corresponding strings for the current locale.
%S The second as a decimal number.
%U The week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week.
%W The week number of the current year as a decimal number, starting with the first Monday as the first day of the first week.
%w The day of the week as a decimal, Sunday being 0.
%x The preferred date representation for the current locale without the time.
%X The preferred time representation for the current locale without the date.
%y The year as a decimal number without a century (range 00 to 99).
%Y The year as a decimal number including the century.
%Z The time zone or name or abbreviation.
%% A literal `%' character.
Source file
@DATE_FORMAT=Year: %Y - Month: %m@
@DATE@
Output file
Year: 2000 - Month: 12

  Read-only variables [ ^ ]

@WPP_VERSION@
The program version.
@INCLUDE@
Contains the name of the last included template.
@FILENAME@
The bare name without extensions (.raw or .html) and path.
@TEMPLATE@
If evaluated into a template is the template name, otherwise is an empty string.
@DATE@
Is the modify time for the output file.
@RCS_DATE@
RCS $Date$ tag value (if you use RCS, otherwise is the last modify time or, if the source is STDIN, the current date).
@AT@
The '@' char.
@EXTENSION@
Contains the extension of the output file (default is 'html'). It can be changed into a config file through the @DEFAULT_EXTENSION@ variable.
@RAW_EXTENSION@
Contains the extension of the input file (default is 'raw'). It can be changed into a config file through the @DEFAULT_RAW_EXTENSION@ variable.
@TMPL_EXTENSION@
Contains the extension of the template files (default is 'tmpl'). It can be changed into a config file through the @DEFAULT_TMPL_EXTENSION@ variable.
@OUTPUTDIR@
Contains the output directory. It can be changed into a config file through the @DEFAULT_OUTPUTDIR@ variable.
@OUTPUTSUBDIR@
Contains the output subdirectory path.
By running wpp on @OUTPUTSUBDIR@/ex.raw the output file will be placed into @OUTPUTDIR@/@OUTPUTSUBDIR@/ex.html.
@RAWDIR@
Contains the directory of the raw sources.
@TMPLDIR@
Contains the templates director It can be changed into a config file through the @DEFAULT_TMPLDIR@ variable.

   ^ Top < Previous    Next >   
Marco (LM) Lamberto lm@geocities.com
Revised: 2000/12/10 12:34:09
http://www.geocities.com/Tokyo/1474/wpp/manual_4.html
Preprocessed by WPP Graphics by GIMP