home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / sqflo130.zip / TEMPLATE.DOC < prev   
Text File  |  1995-07-02  |  6KB  |  164 lines

  1.                           SqFilter & Templates
  2.                           --------------------
  3.  
  4. For SqFilter, templates are texts which may contain variable parts. This
  5. variable parts are defined as a function name surrounded by '{' and '}'
  6. characters in the text. The function name may optionnaly be followed by
  7. an argument list enclosed by parenthesis. Here's the syntax for a
  8. template function :
  9.  
  10. <template_function>     : {<function_name>[(<parameters>)]}
  11.  
  12. where <parameters> is defined as :
  13.  
  14. <parameters>            : <parameter>[,<parameters>]
  15.  
  16. <parameter> may be one of the following :
  17.         <pad>           : a number. If positive, the result will be
  18.                           left-padded to the specified length. If
  19.                           negative, the result will be right-padded.
  20.                           Default is no padding.
  21.  
  22.         b|k|m           : some numeric results may be given in bytes,
  23.                           kilobytes or megabytes. The default is bytes.
  24.  
  25.         <disk>          : a disk drive letter, optionnaly followed by a
  26.                           colon. Default is current drive.
  27.  
  28. Template functions are separated in five groups. Depending on the
  29. template, one or more group(s) of functions are available. Generally
  30. speaking, groups of functions are available for templates where they
  31. make sense. For instance, functions that return informations about the
  32. message currently being written would not make sense in the All Files
  33. Listing (AFL*) templates, while they are usefull in the templates that
  34. describe an answer to Allfix requests (AfxFound*).
  35.  
  36. G1- File area functions
  37.     -------------------
  38.         These functions return information related to the relevant file
  39.         area. Available in the following templates :
  40.  
  41.         AfxAreaTpl, FStAreaTpl, AFLAreaHdr, AFLAreaFtr.
  42.  
  43.         . {FileAreaTag([<pad>])}
  44.           Returns the tagname of the current file area.
  45.  
  46.           Ex : {FileAreaTag(20)}        -> '            OS2TOOLS'
  47.  
  48.         . {FileAreaDesc([<pad>])}
  49.           Returns the description of the current file area.
  50.  
  51.           Ex : {FileAreaDesc(-20)}      -> 'Tools for OS/2      '
  52.  
  53.         . {FileAreaPath([<pad>])}
  54.           Returns the path to the current file area's files.
  55.  
  56.           Ex : {FileAreaDesc}           -> 'e:\lora\files\os2tools\'
  57.  
  58.         . {FileAreaCount([<pad>])}
  59.           Returns the number of files in the current file area.
  60.  
  61.           Ex : {FileAreaCount(5)}       -> '   18'
  62.  
  63.         . {FileAreaSize([<b|k|m>[,<pad>]])}
  64.           Returns the sum of the current file area's files' sizes.
  65.  
  66.           Ex : {FileAreaSize}           -> '1234567'
  67.                {FileAreaSize(k)}        -> '1205'
  68.                {FileAreaSize(k, 6)}     -> '  1205'
  69.  
  70.         . {FileAreaAvgDate}
  71.           Returns the average file date of the current file area's
  72.           files. The date format is dependant on the country settings.
  73.  
  74.           Ex : {FileAreaAvgDate}        -> '08-07-94'
  75.  
  76. G2- Message functions
  77.     -----------------
  78.         These functions return information on the message being
  79.         currently generated by SqFilter. They are available in the
  80.         following templates :
  81.  
  82.         NFAMsgFtr, FStFtr, StatFtr, AfxFoundHdr, AfxFoundFtr.
  83.  
  84.         . {MsgFirstName([<pad>])}
  85.           Returns the first name of the message recipient.
  86.  
  87.           Ex : {MsgFirstName}           -> 'Raphaël'
  88.  
  89.         . {MsgLastName([<pad>])}
  90.           Returns the last name of the message recipient.
  91.  
  92.           Ex : {MsgLastName(-20)}       -> 'Vanney              '
  93.  
  94.         . {MsgName([<pad>])}
  95.           Returns the full name of the message recipient.
  96.  
  97.           Ex : {MsgLastName()}          -> 'Raphaël Vanney'
  98.  
  99. G3- Message area functions
  100.     ----------------------
  101.         These functions return information on the current message area.
  102.         They are available in the following templates :
  103.  
  104.         StatFtr, AfxFoundHdr, AfxFoundFtr, NFAMsgHdr, NFAMsgFtr,
  105.         FStAreaTpl, FStFtr.
  106.  
  107.         (none of these functions are currently implemented. Those that may
  108.         come : base type, message count...)
  109.  
  110. G4- List of file areas functions
  111.     ----------------------------
  112.         These functions return information on the list of file areas
  113.         being used. They are available in the following templates :
  114.  
  115.         NFAMsgHdr, NFAMsgFtr,           (areas defined through NFAScan)
  116.         FStFtr, FstAreaTpl,             (  "      "       "    FStScan)
  117.         AFLFileHdr, AFLAreaHdr,         (  "      "       "    AFLScan)
  118.         AFLAreaFtr, AFLFileFtr,         (  "      "       "    AFLScan)
  119.         AfxFoundHdr, AfxFoundFtr.       (  "      "       "    AfxScan)
  120.  
  121.         . {AreasFileCount([<pad>])}
  122.           Returns the total number of files in the file areas.
  123.  
  124.         Ex : {AreasFileCount}           -> '386'
  125.  
  126.         . {AreasFileSize([<k|b|m>[,<pad>]])}
  127.           Returns the total size of the files in the file areas.
  128.  
  129.         Ex : {AreasFileSize(m, 3)}      -> ' 78'
  130.  
  131.         . {AreasFileAvgDate}
  132.           Returns the average file date. The date format is dependant on
  133.           the country setting.
  134.  
  135.         Ex: {AreasFileAvgDate}          -> '04/10/94'
  136.  
  137. G5- Miscellaneous functions
  138.     -----------------------
  139.         These functions are available in all the templates.
  140.  
  141.         . {DiskFree(<disk>[,<b|k|m>[,<pad>]])}
  142.           Returns the free space on the specified drive.
  143.  
  144.         Ex : {DiskFree(,k)}             -> '20342'
  145.              {DiskFree(D:, M)}          -> '19'
  146.              {DiskFree(c,m,5)}          -> '   79'
  147.  
  148.         . {LocalAddr([<pad>])}
  149.           Returns the local address as defined by the 'Address' keyword.
  150.  
  151.         Ex : {LocalAddr}                -> '2:320/215.9'
  152.  
  153. Note
  154. ----
  155.  
  156. I've voluntarily not been too far in this template thing : I much prefer
  157. to hear from you before and do what you think is necessary. What's here
  158. now fulfills my needs <g>.
  159.  
  160. Do send suggestions to
  161.  
  162. Internet : rvanney@ibm.net
  163. Fidonet  : 2:320/215.9
  164.