home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / SWAP20.ZIP / EXAMPLES.TXT < prev    next >
Text File  |  1992-10-12  |  14KB  |  397 lines

  1.  
  2.  
  3.  
  4.      ===========================================================================
  5.                             EXAMPLE FILE for SWAP PROGRAM          12 October 92
  6.      ===========================================================================
  7.  
  8.  
  9.                This file contains examples of tricks & traps while
  10.                planning your configuration file and lists. 
  11.  
  12.  
  13.      CONFIGURATION FILE
  14.      ==================
  15.  
  16.           The .CFG file may have comments: ie.
  17.  
  18.      C:\WC3O\ROTATE\HELLO\          this is a legal comment for line 1.
  19.       this is a legal comment in place of line 2. Note the leading space!
  20.      this is NOT a legal comment for line 3. Note the LACK of a leading space!
  21.      C:\WC3O\ROTATE\GOODBYE\ 4 this is a legal comment
  22.      C:\WC3O\ROTATE\HOLIDAY\5 this is NOT a legal comment
  23.  
  24.       This is legal for line 7. Note a blank line is legal for line 6.
  25.      C:\WC3O\ROTATE\HOLIDAY\        8 -INPUT Path: VARIABLE HOLIDAY SCR files
  26.         etc. Lines 9 to 20 skipped for brevity.
  27.      COPYIT.BAT                     21-BATch file you must execute.
  28.  
  29.           Line 21 is the ONLY line which is REQUIRED (although if the remainder
  30.           are not used, why run the program?). It MUST be a legal dos BATch
  31.           filename! Very little error checking here. If the program DOES find an
  32.           error in the batch filename, it will HALT with an error.
  33.  
  34.           The program does NOT check for proper PATHS and FILENAMES. It will
  35.           HALT if a bad filename is specified for COPYIT.BAT or if the first 8
  36.           lines do NOT contain "\" -- as will the example line 5 above.
  37.  
  38.  
  39.      HOLIDAY LISTS
  40.      =============
  41.  
  42.           below: The Variable Holiday list may have comments. ie.
  43.  
  44.      09293,TEST1.BBS,TEST1.SCR          This is a comment.
  45.  
  46.           above: The file(s) TEST1.BBS and TEST1.SCR will copied to the files
  47.           specified in the .CFG file on 29 September "IF" it is a Tuesday 
  48.           (day 3).
  49.  
  50.      09292,TEST1.BBS,                   This is a comment.
  51.  
  52.           above: The file TEST1.BBS will be copied to files specified in the
  53.           .CFG file on 29 September "IF" it is a Monday (day 2). The .SCR file
  54.           will be skipped.
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.      ===========================================================================
  62.                                          1/6
  63.      ===========================================================================
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      ===========================================================================
  71.                             EXAMPLE FILE for SWAP PROGRAM          12 October 92
  72.      ===========================================================================
  73.  
  74.      12017,,TEST1.SCR                   This is a comment.
  75.  
  76.           above: The file TEST1.SCR will be copied to files specified in the
  77.           .CFG file on 1 December "IF" it is a Saturday (day 7). The .BBS file
  78.           will be skipped.
  79.  
  80.           below: The following examples will produce errors:
  81.  
  82.      017,TEST1.BBS,TEST1.SCR      This will be ignored
  83.      12017TEST1.BBS,TEST1.SCR     Program will HALT with an error
  84.      12017,TEST1.SCR,TEST1.BBS    NON-ANSI callers will get it anyway.
  85.      12017,,                      Nothing will be copied. No error.
  86.      HOLY COW                     Nothing will be copied. No error.
  87.  
  88.           Most of what was covered in the Variable Holiday list applies to the
  89.           Fixed Holiday list. The fixed holiday list has only FOUR numbers,
  90.           representing MMDD, ie.:
  91.  
  92.      0101,1993.BBS,1993.SCR                'For New Years DAY only
  93.  
  94.           This means that 1993.BBS and 1993.SCR will be copied to files
  95.           specified in the .CFG file on 1 January.
  96.  
  97.  
  98.      HELLO AND GOODBYE LISTS
  99.      =======================
  100.  
  101.           The HELLO and GOODBYE lists are functionally identical. HELLO screens
  102.           generally get rotated to screen(s) which the user reads when he/she
  103.           logs into the BBS. GOODBYE screens are shown when the user logs off.
  104.           Both may have comments as shown below.
  105.  
  106.      GIRLFACE.BBS,                 'Adult Conf advert in WC3 format
  107.       Only the BBS (ASCII) file will be rotated. This line will be purged.
  108.      ,WCLOGO.SCR                   'WC Logo (old)
  109.       Only the SCR (ANSI) file will be rotated. This line will be purged.
  110.      ,,                             No files. No error. Line will be purged.
  111.      ,                              No error. Legal comment not purged.
  112.                                     This line will be purged.
  113.      WELCMBNR.BBS,WELCMBNR.SCR     'And this is o.k.
  114.      WELCOME.SCR,WELCOME.BBS       'Your non-ANSI callers will not be happy.
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.      ===========================================================================
  128.                                          2/6
  129.      ===========================================================================
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      ===========================================================================
  137.                             EXAMPLE FILE for SWAP PROGRAM          12 October 92
  138.      ===========================================================================
  139.  
  140.      Purging: HELLO and GOODBYE lists only.
  141.      =======
  142.  
  143.           If you have any EXTRA lines or lines in the HELLO or GOODBYE list
  144.           which the program does NOT recognize, that line will be removed from
  145.           your list (purged) as detailed above. A line starting with ONE COMMA
  146.           and a COMMENT is NOT purged. Lines such as this will NOT produce a
  147.           screen for that day. Call them "dummy" entries for lack of a better
  148.           word. ie:
  149.  
  150.      ,                             this is o.k.
  151.       ,                            this will be purged
  152.  
  153.           This could prove handy if you want a particular screen to remain in
  154.           place for two or more days. Example from a HELLO list:
  155.  
  156.      ONE.BBS,ONE.SCR        My Favourite screens!!!
  157.      ,                      Hold it for one more day.
  158.      THREE.BBS,THREE.SCR    normal screens (whatever)
  159.  
  160.           Bearing in mind the TOP file in the list is the NEXT file to be
  161.           rotated, given the above example, the files ONE.xxx will be rotated
  162.           the next time SWAP was run and your HELLO LIST would reflect the
  163.           following:
  164.  
  165.      ,                      Hold it for one more day. (nothing changes)
  166.      THREE.BBS,THREE.SCR    normal screens (whatever)
  167.      ONE.BBS,ONE.SCR        My Favourite screens!!!
  168.  
  169.  
  170.           The next day, when SWAP is again run, your favourite files (ONE.xxx)
  171.           will NOT be replaced as there is a "dummy". Your LIST will then
  172.           reflect that shown below. Note that THREE.xxx WILL be swapped the
  173.           following night.
  174.  
  175.      THREE.BBS,THREE.SCR    normal screens (whatever)
  176.      ONE.BBS,ONE.SCR        My Favourite screens!!!
  177.      ,                      Hold it for one more day.
  178.  
  179.           You could put two or more "dummy" entries in your HELLO or GOODBYE
  180.           lists to hold a special file for any two or more days... one for each
  181.           dummy entry.
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.      ===========================================================================
  194.                                          3/6
  195.      ===========================================================================
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      ===========================================================================
  203.                             EXAMPLE FILE for SWAP PROGRAM          12 October 92
  204.      ===========================================================================
  205.  
  206.      QUESTIONS and ANSWERS
  207.      =====================
  208.  
  209.      Q.   Can I combine HELLO and GOODBYE lists?
  210.  
  211.      A:   Yes. Just specify the same .LST file in the .CFG file. However, you
  212.           would not have much control over which file went where, when. (get
  213.           that?)
  214.  
  215.  
  216.      Q.   Can I combine FIXED HOLIDAY and VARIABLE DATE holiday lists?
  217.  
  218.      A:   NO!. The algorithm for the fixed holiday is such that it looks at the
  219.           first four numbers and then gets the filenames separated by commas.
  220.           You can imagine what your users would say if a screen were produced
  221.           for a non-holiday.
  222.  
  223.  
  224.      Q.   Can I combine a HELLO or GOODBYE list with a FIXED HOLIDAY or VARIABLE
  225.           DATE HOLIDAY list?
  226.  
  227.      A:   NO!. Again, the algorithms for each section is slightly different. I
  228.           apply the KISS technique [Keep It Simple Stupid!].
  229.  
  230.  
  231.      Q.   Using an environment specified log, can I log to, say, an ACTIVITY.002
  232.           log while someone is online on that node?
  233.  
  234.      A:   It should be o.k. File locking is used, but I am not sure what WC
  235.           would do if it tried to write to the log at the EXACT same time as
  236.           SWAP is logging to it. SWAP is meant to be run during an event. If
  237.           node 1 is running the event, then you should log to ACTIVITY.001 to
  238.           avoid potential problems. Same goes for postcall. If you use SWAP in a
  239.           POSTCALL.BAT, you should log to the activity log for that node, or
  240.           don't log after POSTCALL at all. An alternative is to log to your
  241.           LOCAL node log. That is what I do and it works well. Or log to ANY
  242.           file for that matter. For example, you might log to a file in file
  243.           area which only you can access. Then, all you have to do is read the
  244.           file while online. Use your imagination (and your head).
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.      ===========================================================================
  260.                                          4/6
  261.      ===========================================================================
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      ===========================================================================
  269.                             EXAMPLE FILE for SWAP PROGRAM          12 October 92
  270.      ===========================================================================
  271.  
  272.      Q.   How can I swap several HELLO screens. 
  273.           For example, I want a HELLO1, HELLO2, HELLO3, HELLO4 and HELLO5.
  274.  
  275.      A.   I personally would not recommend so many screens. It bores the users
  276.           when they have to wade through all that material to get to the BBS.
  277.           However, since you asked....
  278.           1.   Create a SWAP.CFG for HELLO1 and GOODBYE.BBS and your holidays
  279.                (as per normal).
  280.           2.   Create a 2nd .CFG (ie. SWAP2.CFG for HELLO2 and HELLO3), with the
  281.                HELLO3 replacing GOODBYE input/output paths and filenames and the
  282.                GOODBYE list cited as the HELLO list. Don't use holidays.
  283.           3.   Create a 3rd .CFG (ie. SWAP3.CFG for HELLO4 and HELLO5), with the
  284.                HELLO5 replacing the GOODBYE input/output paths and filenames and
  285.                the GOODBYE list cited as the HELLO list. Don't use holidays.
  286.           Your EVENT batch file should show something similar to:
  287.      @ECHO OFF
  288.      REM DO SOME WORK AND THEN DO THE SWAP PROGRAM
  289.      SET SWAPLOG=YOURFILE.TXT      'set an environment variable for logging.
  290.      SWAP                          'run the normal swap
  291.      CALL COPYIT.BAT               'switch the files
  292.      SWAP SWAP2.CFG                'produce BAT for only HELLO2/3
  293.      CALL COPYIT.BAT               'switch the files
  294.      SWAP SWAP3.CFG                'produce BAT for only HELLO4/5
  295.      CALL COPYIT.BAT               'switch the files
  296.      SET SWAPLOG=                  'get rid of environment string
  297.      REM DO A MORE WORK
  298.      NODE1                         'run Wildcat (node whatever)
  299.  
  300.           Let your imagination run wild!
  301.  
  302.  
  303.      Q.   I have set an environment log but it doesn't seem to work. What could
  304.           be wrong?
  305.  
  306.      A:   Chances are that when the BBS shells out to run SWAP, the computer is
  307.      out of environment space.  If you can't "temporarily" remove something
  308.      BEFORE "setting" SWAPLOG=, then use the log in the config file. You may
  309.      also specify a log in your configuration file (line 22).  If so, make sure
  310.      you are not setting it in the environment otherwise the environment log is
  311.      still functional, and the one specified in the config file is redundant.
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.      ===========================================================================
  326.                                          5/6
  327.      ===========================================================================
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      ===========================================================================
  335.                             EXAMPLE FILE for SWAP PROGRAM          12 October 92
  336.      ===========================================================================
  337.  
  338.      Q.   Can a PATH to the list files be used? I mean, can I have my GOODBYE
  339.           list in one directory and the HELLO list in another?
  340.  
  341.      A.   Yes. IMHO, this complicates things, but if you want to do it go right
  342.      ahead. For all that matters, you may put paths to all of your LISTS, BATch
  343.      file and LOGFILE, ie.:
  344.  
  345.      C:\WC30\ROTATE\HELLO1.LST      17-Listing of HELLO screens.
  346.      B:\GOODBYE.LST                 18-Listing of GOODBYE screens.
  347.      C:\WC30\HOLIDAYF.LST           19-Listing of FIXED HOLIDAY screens.
  348.      Z:\HOLIDAYV.LST                20-Listing of VARIABLE HOLIDAY screens.
  349.      D:\THISDIR\COPYIT.BAT          21-BATch file you must execute.
  350.      C:\ARC\ACTIVITY.003            22-LOG file for TERSE logging.
  351.  
  352.  
  353.      Q.   Can I send you some money for using this program?
  354.  
  355.      A:   Yes!  Check the SWAP.DOC file for details.
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.      ===========================================================================
  392.                                          6/6
  393.      ===========================================================================
  394.  
  395.  
  396.  
  397.