home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / SWAP40.ZIP / SWAP.FAQ < prev   
Text File  |  1995-06-01  |  11KB  |  247 lines

  1.                       SWAP -- EXAMPLES/Q&A
  2.                       ====================
  3.           This file contains examples of tricks & traps while
  4.           planning your configuration file and lists. 
  5.  
  6.  
  7. CONFIGURATION FILE
  8. ==================
  9.  
  10.      The .CFG file may have comments: ie.
  11.  
  12. C:\WILDCAT\ROTATE\HELLO\          this is a legal comment for line 1. 
  13.  this is a legal comment in place of line 2. Note the leading space!
  14. this is NOT a legal comment for line 3. Note the LACK of a leading space!
  15. C:\WILDCAT\ROTATE\GOODBYE\ 4 this is a legal comment for line 4
  16. C:\WILDCAT\ROTATE\HOLIDAYS\5 this is NOT a legal comment for line 5
  17.  
  18.  This is legal for line 7. Note a blank line is legal for line 6.
  19. C:\WILDCAT\ROTATE\HOLIDAYS\    8 -INPUT Path: FIXED HOLIDAY SCR files
  20.    etc. Lines 9 to 33 skipped for brevity.
  21. COPYIT.BAT                     34-BATch file you must execute.
  22. NONE                           35-NO log file
  23.  
  24.      Line 34 is the ONLY line which is REQUIRED (although if the remainder
  25.      are not used, why run the program?). It MUST be a legal dos BATch
  26.      filename! Very little error checking here. If the program DOES find an
  27.      error in the batch filename, it will HALT with an error.
  28.  
  29.      The program does NOT check for proper PATHS and FILENAMES. It will
  30.      HALT if a bad filename is specified for COPYIT.BAT or if the lines
  31.      1-13 do NOT contain "\" -- as will the example line 5 above.
  32.  
  33.  
  34. HOLIDAY LISTS
  35. =============
  36.  
  37.      below: The Variable Holiday list may have comments. ie.
  38.  
  39. 09293,TEST1.BBS,TEST1.SCR,TEST1.RIP          This is a comment.
  40.  
  41.      above: The file(s) TEST1.BBS/SCR/RIP will copied to the files
  42.      specified in the .CFG file on 29 September "IF" it is a Tuesday 
  43.      (day 3).
  44.  
  45. 09292,TEST1.BBS,,TEST1.RIP                   This is a comment.
  46.  
  47.      above: The file TEST1.BBS/RIP will be copied to files specified in the
  48.      .CFG file on 29 September "IF" it is a Monday (day 2). The .SCR file
  49.           will be skipped.
  50.  
  51. 12017,,TEST1.SCR,                   This is a comment.
  52.  
  53.      above: The file TEST1.SCR will be copied to files specified in the
  54.      .CFG file on 1 December "IF" it is a Saturday (day 7). The .BBS/.RIP
  55.      files will be skipped.
  56.  
  57.      below: The following examples will produce errors:
  58.  
  59. 017,TEST1.BBS,TEST1.SCR,TEST1.RIP      This will be ignored
  60. 12017TEST1.BBS,TEST1.SCR,TEST1.RIP     Program will HALT with an error
  61. 12017,TEST1.SCR,TEST1.BBS,TEST1.RIP    NON-ANSI callers will get it anyway.
  62. 12017,,,                               Nothing will be copied. No error.
  63. HOLY COW,TEST1.RIP                     Nothing will be copied. No error.
  64.  
  65.      Most of what was covered in the Variable Holiday list applies to the
  66.      Fixed Holiday list. The fixed holiday list has only FOUR numbers,
  67.      representing MMDD, ie.:
  68.  
  69. 0101,1996.BBS,1996.SCR,1996.RIP                'For New Years DAY only
  70.      
  71.      This means that 1993.BBS/SCR/RIP will be copied to files
  72.      specified in the .CFG file on 1 January.
  73.  
  74.  
  75. HELLO AND GOODBYE (BBS/SCR) LISTS
  76. =================================
  77.  
  78.      The HELLO and GOODBYE lists are functionally identical. HELLO screens
  79.      generally get rotated to screen(s) which the user reads when he/she
  80.      logs into the BBS. GOODBYE screens are shown when the user logs off.
  81.      Both may have comments as shown below.
  82.  
  83. GIRLFACE.BBS,                 'Adult Conf advert in WC3 format
  84.  Only the BBS (ASCII) file will be rotated. This line will be purged.
  85. ,WCLOGO.SCR                   'WC Logo (old)
  86.  Only the SCR (ANSI) file will be rotated. This line will be purged.
  87. ,,                             No files. No error. Line will be purged.
  88. ,                              No error. Legal comment not purged.
  89.                                This line will be purged.
  90. WELCMBNR.BBS,WELCMBNR.SCR     'And this is o.k.
  91. WELCOME.SCR,WELCOME.BBS       'Your non-ANSI callers will not be happy.
  92.                               'Remember to put .BBS files FIRST!
  93.  
  94. MUSIC LISTS
  95. ===========
  96.      The music list (MUSIC.LST), if used, behaves in a the same manner as the
  97. other lists, except that the files therein are prepended (put in the front of)
  98. a file you specify (ie. DOORS.SCR).
  99.  
  100. Purging: HELLO and GOODBYE lists only.
  101. =======
  102.  
  103.      If you have any EXTRA lines or lines in the HELLO or GOODBYE list
  104.      which the program does NOT recognize, that line will be removed from
  105.      your list (purged) as detailed above. A line starting with ONE COMMA
  106.      and a COMMENT is NOT purged. Lines such as this will NOT produce a
  107.      screen for that day. Call them "dummy" entries for lack of a better
  108.      word. ie:
  109.  
  110. ,    this is o.k.
  111.  ,   this will be purged
  112.  
  113.      This could prove handy if you want a particular screen to remain in
  114.      place for two or more days. Example from a HELLO list:
  115.  
  116. ONE.BBS,ONE.SCR        My Favourite screens!!!
  117. ,                      Hold them for one more day.
  118. THREE.BBS,THREE.SCR    normal screens (whatever)
  119.  
  120.      Bearing in mind the TOP file in the list is the NEXT file to be
  121.      rotated, given the above example, the files ONE.xxx will be rotated
  122.      the next time SWAP was run and your HELLO LIST would reflect the
  123.      following:
  124.  
  125. ,                      Hold them for one more day. (nothing changes)
  126. THREE.BBS,THREE.SCR    normal screens (whatever)
  127. ONE.BBS,ONE.SCR        My Favourite screens!!!
  128.  
  129.  
  130.      The next day, when SWAP is again run, your favourite files (ONE.xxx)
  131.      will NOT be replaced as there is a "dummy". Your LIST will then
  132.      reflect that shown below. Note that THREE.xxx WILL be swapped the
  133.      following night.
  134.  
  135. THREE.BBS,THREE.SCR    normal screens (whatever)
  136. ONE.BBS,ONE.SCR        My Favourite screens!!!
  137. ,                      Hold it for one more day.
  138.  
  139.      You could put two or more "dummy" entries in your HELLO or GOODBYE
  140.      lists to hold a special file for any two or more days... one for each
  141.      dummy entry.
  142.  
  143. QUESTIONS and ANSWERS
  144. =====================
  145.  
  146. Q.   Can I combine HELLO and GOODBYE lists?
  147.  
  148. A:   Yes. Just specify the same .LST file in the .CFG file. However, you
  149.      would not have much control over which file went where, when. (get
  150.      that?)
  151.  
  152.  
  153. Q.   Can I combine FIXED HOLIDAY and VARIABLE DATE holiday lists?
  154.  
  155. A:   NO!. The algorithm for the fixed holiday is such that it looks at the
  156.      first four numbers and then gets the filenames delimited by commas.
  157.      You can imagine what your users would say if a screen were produced
  158.      for a non-holiday.
  159.  
  160.  
  161. Q.   Can I combine a HELLO or GOODBYE list with a FIXED HOLIDAY or VARIABLE
  162.      DATE HOLIDAY list?
  163.  
  164. A:   NO!. Again, the algorithms for each section is slightly different. I
  165.      apply the KISS technique [Keep It Simple SysOp!].
  166.  
  167.  
  168. Q.   Using an environment specified log, can I log to, say, an ACTIVITY.2
  169.      log while someone is online on that node?
  170.  
  171. A:   SWAP is meant to be run during an event just after midnight....
  172.      If node 1 is running the event, then you should log to ACTIVITY.1 to
  173.      avoid potential problems. Same goes for postcall. If you use SWAP in a
  174.      POSTCALL.BAT, you should log to the activity log for that node, or
  175.      don't log after POSTCALL at all. An alternative is to log to your
  176.      LOCAL node log. That is what I do and it works well. Or log to ANY
  177.      file for that matter. For example, you might log to a file in file
  178.      area which only you can access. Then, all you have to do is read the
  179.      file while online. Use your imagination (and your head).
  180.  
  181.  
  182. Q.   How can I swap several HELLO screens. 
  183.      For example, I want a HELLO1, HELLO2, HELLO3, HELLO4 and HELLO5.
  184.  
  185. A.   I personally would not recommend so many screens. It bores the users
  186.      when they have to wade through all that material to get to the BBS.
  187.      However, since you asked....
  188.      1.   Create a SWAP.CFG for HELLO1 and GOODBYE.BBS and your holidays
  189.           (as per normal).
  190.      2.   Create a 2nd .CFG (ie. SWAP2.CFG for HELLO2 and HELLO3), with the
  191.           HELLO3 replacing GOODBYE input/output paths and filenames and the
  192.           GOODBYE list cited as the HELLO list. Don't use holidays.
  193.      3.   Create a 3rd .CFG (ie. SWAP3.CFG for HELLO4 and HELLO5), with the
  194.           HELLO5 replacing the GOODBYE input/output paths and filenames and
  195.           the GOODBYE list cited as the HELLO list. Don't use holidays.
  196.      Your EVENT batch file should show something similar to:
  197.  
  198. @ECHO OFF
  199. REM DO SOME WORK AND THEN DO THE SWAP PROGRAM
  200. SET SWAPLOG=YOURFILE.TXT      'set an environment variable for logging.
  201. SWAP                          'run the normal swap
  202. CALL COPYIT.BAT               'switch the files
  203. SWAP SWAP2.CFG                'produce BAT for only HELLO2/3
  204. CALL COPYIT.BAT               'switch the files
  205. SWAP SWAP3.CFG                'produce BAT for only HELLO4/5
  206. CALL COPYIT.BAT               'switch the files
  207. SET SWAPLOG=                  'get rid of environment string
  208. REM DO MORE WORK
  209. NODE1                         'run Wildcat (leave blank for WC swap-out)
  210.  
  211.      Let your imagination run wild!
  212.  
  213.  
  214. Q.   I have set an environment log but it doesn't seem to work. What could
  215.      be wrong?
  216.  
  217. A:   Chances are that when the BBS shells out to run SWAP, the computer is
  218. out of environment space.  If you can't "temporarily" remove something
  219. BEFORE "setting" SWAPLOG=, then use the log in the config file. You may
  220. also specify a log in your configuration file (line 31).  If so, make sure
  221. you are not setting it in the environment otherwise the environment log is
  222. still functional, and the one specified in the config file is redundant.
  223.  
  224.  
  225. Q.   Can a PATH to the list files be used? I mean, can I have my GOODBYE
  226.      list in one directory and the HELLO list in another?
  227.  
  228. A.   Yes. IMHO, this complicates things, but if you want to do it go right
  229. ahead. For all that matters, you may specify paths to all of your LISTS,
  230. BATch file and LOGFILE, ie.:
  231.  
  232. C:\TEMP\HELLO1.LST          27'List of HELLO screens (BBS/SCR)
  233. C:\OTHER\GOODBYE.LST        28'List of GOODBYE screens (BBS/SCR)
  234. Z:\RIP.LST                  29'List of RIP files (hello,goodbye)
  235. E:\HOLS\HOLIDAYF.LST        30'List of fixed date holiday screens (BBS/SCR/RIP)
  236. Q:\BORING\HOLIDAYV.LST      31'List of variable holiday screens (BBS/SCR/RIP)
  237. F:\COMPLICA.TED\MUSIC.LST   32'List of MUSIC files
  238.  
  239. But why make it so hard to manage?  Keep it simple. You will find management
  240. MUCH easier that way.
  241.  
  242.  
  243. Q.   Can I send you some money for using this program?
  244.  
  245. A:   Yes!  Check the SWAP.DOC file for details.
  246.  
  247.