project page


SourceForge Logo
  Getting started| Project file| Definition file| Tag file| Source file| Functions| Template file

Build-in Functions

<#date> :returns the current date, you can supply a format as argument( e.g.<#date& dd-mm-yyyy> to overrides the one defined in the project file. If you didn't give any format as argument nor in the project file, the default format dd/mm/yyyy hh:min a.m. will be used. Inside the format there should be no space, if you want a space you can use a underscore _ , it'll be translated into a space during substitution.e.g."th_month,yyyy_night" will output 9th August,2001 night. Possible values are:

 dd: it returns the day in two digit  numbers, e.g. 07
 mm: it returns the month in two digit  numbers, e.g. 05
 yy: it returns the year in two digit numbers, e.g. 99
 yyyy: it returns the year in four digit numbers, e.g. 2001
 hh: it returns hour in 2 digit numbers, e.g. 11
 min: it returns minutes in 2 digit numbers, e.g. 23
 sec: it returns seconds in 2 digit numbers, e.g. 55
 12: it returns a.m. or p.m. 
 th: it returns the day, e.g. 1st, 22nd, 17th
 night: it returns a word according to the hours of the day, 
        they're :midnight, evening, afternoon, noon, morning,
        late night
 wday: it returns the name of the weekday, e.g. Monday, Tuesday

<#user@email.com> will returns <a href=mailto:user@ email.com>user@email.com</a>
If you supply a name as argument, it'll use that name as link instead. e.g.<user@email.com John_Smith> Again you need to use underscore instead of space in argument, it'll be translated into space when it make the substitution. Note that is use ASCII code instead of the @ symbol, the result will be the same, only it can prevent your email address being fetched by robots. It's helpful for preventing SPAM. ----------------------------------------------------------------------

<#http://www.italiagratis.com> will returns <a href=http://www.italiagratis.com> http://www.italiagratis.com</a>, you can supply argument to define the name of the link and target. for the name, replace space with underscore(it'll be translated when writing to output), other arguments are:

 n ---it'll open the link in a new window, TARGET="_BLANK"
 t ---it'll open the link at top, TARGET="_TOP"
 t:targetname --- it'll open the link in the targetname, 

e.g.<#http://www.italiagratis.com ItaliaGratis_web_site t:link> will returns ItaliaGratis web site ----------------------------------------------------------------------

<#link:file.html>, it has the same convention as the above one, except it's for local link, for example <#link:file/download.exe> or <#link:page1.html t>, you can define target like previous case. ----------------------------------------------------------------------

<#image.jpg> will returns <img src=image.jpg width=110 height=78 border=0> (width and height is according to the image.) Note the the path to the image is relative to the IMG_DIR in the project file, if the source that call this function is /in/travel/index.html and IMG_DIR is /out/img, first it'll check the image at /out/img/image.jpg, if it's not found, it'll check in /in/travel/image.jpg, note that in the second case, image information can be retrieved correctly, but the link will be incorrect as the image file is not in the output directory, that's one reason why it's recommended to separate image files and html files. Possible arguments are:

  l --- align="left"
  r --- align="right"
  t --- target="_top" 
  (take effect only if l:http://... is presence)
  n --- target="_blank" 
  (take effect only if l:http://... is presence)
  t:targetname --- target="targetname" 
  (take effect only if l:http://... is presence)
  b:1 --- border=1 (default is border=0)
  caption_of_the_image --- alt="caption of the image" 
  (replace space wth underscore)
  bc:#ffffff --- bordercolor="#ffffff"
  l:http://www.italiagratis.com ---
  <a href=http://www.italiagratis.com>
  (useful when the image is a button or a link)

e.g. <#image.jpg l t:link this_is_an_image b:1 bc:#ffffff l:http://www.italiagratis.com> will returns <a href=http://www.italiagratis.com target=link><img src=image.jpg width=110 height=78 border=1 bordercolor=#ffffff align=left alt="This is an image"></a> ----------------------------------------------------------------------

<#fs file.exe> will return the file size of file.exe in KB, possible arguments are "b" and "m", when it's "b", it returns the size in bytes, if it's "m" it returns the size in MB, e.g.<#fs file.exe b> returns 2567Bytes. Again the location of file is relative to the location of the project file. e.g., the file is in /out/binary/file.exe, you should put <#fs out/binary/file.exe> ----------------------------------------------------------------------

<#bg.jpg s> returns the correct path to the image bg.jpg, useful for background image, the path is relative to the IMG_DIR defined in the project file, so you can skip thinking how to enter the right path to the image. (as input and output directories can be of different level) e.g.<#bg.jpg s> returns img/bg.jpg (in case IMG_DIR is "out/img" the source file is in "out")

To escape a function being executed, enclose it with double quotation, for example "<#date>" will returns <#date>

Template file


Copyright ©  2001 vaivai.com.All rights reserved.