hsc adds some special attributes, which can be quite useful to include special data or configure the parser.
HSC.ANCHOR
contains destination URI of last anchor
HSC.CLICK-HERE
declare keywords for "click here"-syndrome
HSC.COLOR-NAMES
declare values to be used as colors-names
HSC.DOCUMENT.NAME
filename of html-object
HSC.DOCUMENT.PATH
directory of html-object
HSC.DOCUMENT.URI
full relative URI of html-object
HSC.EXEC.RESULT
contains return-code of command invoked by <$exec>
HSC.LF
contains a single linefeed-character
HSC.SOURCE.NAME
filename of hsc-source
HSC.SOURCE.PATH
directory of hsc-source
HSC.SOURCE.FILE
full path and filename of hsc-source
HSC.SYSTEM
contains value depending on operating system
HSC.FORMAT.FILESIZE
how to render GetFileSize()
HSC.FORMAT.TIME
how to render GetTime()
and GetGMTime()
HSC.TMP.*
temporary attributes for internal use
This attribute is defined internaly during startup and is maintained by hsc. It contains the URI of the last anchor referenced to.
For example,For updates, take a look at the <A HREF="http://www.giga.or.at/~agi/hsc/index.html">hsc-support-page</A> at <STRONG><(HSC.ANCHOR)></STRONG>.will be converted to
For updates, take a look at the hsc-support-page at http://www.giga.or.at/~agi/hsc/index.html.
These attributes are defined internaly during startup and are read-only. They contain the filename, the directory and the whole relative URI of the to be created html-object.
For example,hsc FROM people/hugo.hsc TO html:my_project/will lead to
attribute | value ------------------+---------------- HSC.DOCUMENT.NAME | "hugo.html" HSC.DOCUMENT.PATH | "people/" HSC.DOCUMENT.URI | "people/hugo.html"Note that
HSC.DOCUMENT.PATH
does not contain the whole
destination-directory, but only the relative path.
<$exec>
. It is updated after every call of this hsc-tag.
\n
´´)
and can be used to include linefeeds into attribute-values without
hsc whining about them.
These attributes are defined internaly during startup and are read-only. They contain the filename, the directory and the full path and filename of the hsc-source you've passed specified when invoking hsc.
For example,hsc FROM people/hugo.hsc TO html:my_project/will lead to
attribute | value ----------------+---------------- HSC.SOURCE.NAME | "hugo.hsc" HSC.SOURCE.PATH | "people/" HSC.SOURCE.FILE | "people/hugo.hsc"
This attribute is defined internaly during startup and is read-only. It contains a value depending on the operating system hsc is running on.
OS | HSC.SYSTEM --------+----------- AmigaOS | AMIGA Unixoid | UNIXThis can be useful if you are executing a shell-command during conversion. See
<$exec>
for an example how to include a
listing of the current directory, working with more then only
a specific OS.
For several tasks, hsc declares it's own temporary attributes for internal use. Most of them can't even be refered to by you. The only reason why I list them here is, that some of them might show up in messages.
For example, if you are using the special tag
<(...)> (insert expression),
hsc creates an attribute HSC.TMP.insert.expression
to
assign the value of the expression you passed between the brakets.
If this expression now is corrupt, you will achive a message mentioning
the attribute HSC.TMP.insert.expression
.
This attribute is defined in hsc.prefs and can be altered to the user's needs. However, it's value is only scanned once and later changes will not be recognised by hsc.
For attributes of type
COLOR
,
you can not only use the
cryptic #rrggbb
-style, but also use some predefined
values. With this attribute you can declare which values hsc should
know about, each separated by a vertical bar (``|
´´).
<$define HSC.COLOR-NAMES:string/c="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow">
This one contains all values recommended for html-0.32 and is in the hsc.prefs that came with this distribution.
This attribute is defined in hsc.prefs and can be altered to the user's needs. However, it's value is only scanned once and later changes will not be recognised by hsc.
Inside an anchor tag (<A HREF="...">
), the normal text is
scanned for special keywords indicating a ``click here´´-syndrome.
With this attribute you can declare these keywords
, each separated by a vertical bar (``|
´´).
Example:
<$define HSC.CLICK-HERE:string/c="click|here">
When processing german documents, probably this one would fit better:
<$define HSC.CLICK-HERE:string/c="klicken|hier">
GetFileSize()
should be rendered. Conversion specifications:
%b is replaced by the filesize in bytes. %k is replaced by the filesize in kilo-bytes. %m is replaced by the filesize in mega-bytes. %g is replaced by the filesize in giga-bytes. %a is replaced by the filesize, with a reasonable unit computed automatically %u is replaced by the unit for %aThis attribute is defined internaly during startup, and contains the value
"%a%u"
, leading to results like "123K"
or
"12M"
. It can be changed by the user at any time.
GetTime()
and GetGMTime()
should be rendered.
Conversion specifications
(Techn. Note: These are the same as for ANSI-C's strftime()
):
%A is replaced by the full weekday name. %a is replaced by the abbreviated weekday name, where the abbreviation is the first three characters. %B is replaced by the full month name. %b or %h is replaced by the abbreviated month name, where the abbreviation is the first three characters. %C is equivalent to ``%a %b %e %H:%M:%S %Y´´ %c is equivalent to ``%m/%d/%y´´. %D is replaced by the date in the format ``mm/dd/yy´´. %d is replaced by the day of the month as a decimal number (0131). %e is replaced by the day of month as a decimal number (131); single digits are preceded by a blank. %H is replaced by the hour (24hour clock) as a decimal number (0023). %I is replaced by the hour (12hour clock) as a decimal number (0112). %j is replaced by the day of the year as a decimal number (001366). %k is replaced by the hour (24hour clock) as a decimal number (023); single digits are preceded by a blank. %l is replaced by the hour (12hour clock) as a decimal number (112); single digits are preceded by a blank. %M is replaced by the minute as a decimal number (0059). %m is replaced by the month as a decimal number (0112). %n is replaced by a newline. %p is replaced by either ``AM´´ or ``PM´´ as appropriate. %R is equivalent to ``%H:%M´´ %r is equivalent to ``%I:%M:%S %p´´. %t is replaced by a tab. %S is replaced by the second as a decimal number (0060). %s is replaced by the number of seconds since the Epoch, UCT. %T or %X is equivalent to ``%H:%M:%S´´. %U is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number (0053). %W is replaced by the week number of the year (Monday as the first day of the week) as a decimal number (0053). %w is replaced by the weekday (Sunday as the first day of the week) as a decimal number (06). %x is equivalent to ``%m/%d/%y %H:%M:%S´´. %Y is replaced by the year with century as a decimal number. %y is replaced by the year without century as a decimal number (0099). %Z is replaced by the time zone name. %% is replaced by ``%´´.This attribute is defined internaly during startup, and contains the value ``
%d-%b-%Y, %H:%M
´´, leading to results like
"04-Dec-1996, 02:49
".