home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
BBS
/
SWAP40.ZIP
/
SWAP.FAQ
< prev
Wrap
Text File
|
1995-06-01
|
11KB
|
247 lines
SWAP -- EXAMPLES/Q&A
====================
This file contains examples of tricks & traps while
planning your configuration file and lists.
CONFIGURATION FILE
==================
The .CFG file may have comments: ie.
C:\WILDCAT\ROTATE\HELLO\ this is a legal comment for line 1.
this is a legal comment in place of line 2. Note the leading space!
this is NOT a legal comment for line 3. Note the LACK of a leading space!
C:\WILDCAT\ROTATE\GOODBYE\ 4 this is a legal comment for line 4
C:\WILDCAT\ROTATE\HOLIDAYS\5 this is NOT a legal comment for line 5
This is legal for line 7. Note a blank line is legal for line 6.
C:\WILDCAT\ROTATE\HOLIDAYS\ 8 -INPUT Path: FIXED HOLIDAY SCR files
etc. Lines 9 to 33 skipped for brevity.
COPYIT.BAT 34-BATch file you must execute.
NONE 35-NO log file
Line 34 is the ONLY line which is REQUIRED (although if the remainder
are not used, why run the program?). It MUST be a legal dos BATch
filename! Very little error checking here. If the program DOES find an
error in the batch filename, it will HALT with an error.
The program does NOT check for proper PATHS and FILENAMES. It will
HALT if a bad filename is specified for COPYIT.BAT or if the lines
1-13 do NOT contain "\" -- as will the example line 5 above.
HOLIDAY LISTS
=============
below: The Variable Holiday list may have comments. ie.
09293,TEST1.BBS,TEST1.SCR,TEST1.RIP This is a comment.
above: The file(s) TEST1.BBS/SCR/RIP will copied to the files
specified in the .CFG file on 29 September "IF" it is a Tuesday
(day 3).
09292,TEST1.BBS,,TEST1.RIP This is a comment.
above: The file TEST1.BBS/RIP will be copied to files specified in the
.CFG file on 29 September "IF" it is a Monday (day 2). The .SCR file
will be skipped.
12017,,TEST1.SCR, This is a comment.
above: The file TEST1.SCR will be copied to files specified in the
.CFG file on 1 December "IF" it is a Saturday (day 7). The .BBS/.RIP
files will be skipped.
below: The following examples will produce errors:
017,TEST1.BBS,TEST1.SCR,TEST1.RIP This will be ignored
12017TEST1.BBS,TEST1.SCR,TEST1.RIP Program will HALT with an error
12017,TEST1.SCR,TEST1.BBS,TEST1.RIP NON-ANSI callers will get it anyway.
12017,,, Nothing will be copied. No error.
HOLY COW,TEST1.RIP Nothing will be copied. No error.
Most of what was covered in the Variable Holiday list applies to the
Fixed Holiday list. The fixed holiday list has only FOUR numbers,
representing MMDD, ie.:
0101,1996.BBS,1996.SCR,1996.RIP 'For New Years DAY only
This means that 1993.BBS/SCR/RIP will be copied to files
specified in the .CFG file on 1 January.
HELLO AND GOODBYE (BBS/SCR) LISTS
=================================
The HELLO and GOODBYE lists are functionally identical. HELLO screens
generally get rotated to screen(s) which the user reads when he/she
logs into the BBS. GOODBYE screens are shown when the user logs off.
Both may have comments as shown below.
GIRLFACE.BBS, 'Adult Conf advert in WC3 format
Only the BBS (ASCII) file will be rotated. This line will be purged.
,WCLOGO.SCR 'WC Logo (old)
Only the SCR (ANSI) file will be rotated. This line will be purged.
,, No files. No error. Line will be purged.
, No error. Legal comment not purged.
This line will be purged.
WELCMBNR.BBS,WELCMBNR.SCR 'And this is o.k.
WELCOME.SCR,WELCOME.BBS 'Your non-ANSI callers will not be happy.
'Remember to put .BBS files FIRST!
MUSIC LISTS
===========
The music list (MUSIC.LST), if used, behaves in a the same manner as the
other lists, except that the files therein are prepended (put in the front of)
a file you specify (ie. DOORS.SCR).
Purging: HELLO and GOODBYE lists only.
=======
If you have any EXTRA lines or lines in the HELLO or GOODBYE list
which the program does NOT recognize, that line will be removed from
your list (purged) as detailed above. A line starting with ONE COMMA
and a COMMENT is NOT purged. Lines such as this will NOT produce a
screen for that day. Call them "dummy" entries for lack of a better
word. ie:
, this is o.k.
, this will be purged
This could prove handy if you want a particular screen to remain in
place for two or more days. Example from a HELLO list:
ONE.BBS,ONE.SCR My Favourite screens!!!
, Hold them for one more day.
THREE.BBS,THREE.SCR normal screens (whatever)
Bearing in mind the TOP file in the list is the NEXT file to be
rotated, given the above example, the files ONE.xxx will be rotated
the next time SWAP was run and your HELLO LIST would reflect the
following:
, Hold them for one more day. (nothing changes)
THREE.BBS,THREE.SCR normal screens (whatever)
ONE.BBS,ONE.SCR My Favourite screens!!!
The next day, when SWAP is again run, your favourite files (ONE.xxx)
will NOT be replaced as there is a "dummy". Your LIST will then
reflect that shown below. Note that THREE.xxx WILL be swapped the
following night.
THREE.BBS,THREE.SCR normal screens (whatever)
ONE.BBS,ONE.SCR My Favourite screens!!!
, Hold it for one more day.
You could put two or more "dummy" entries in your HELLO or GOODBYE
lists to hold a special file for any two or more days... one for each
dummy entry.
QUESTIONS and ANSWERS
=====================
Q. Can I combine HELLO and GOODBYE lists?
A: Yes. Just specify the same .LST file in the .CFG file. However, you
would not have much control over which file went where, when. (get
that?)
Q. Can I combine FIXED HOLIDAY and VARIABLE DATE holiday lists?
A: NO!. The algorithm for the fixed holiday is such that it looks at the
first four numbers and then gets the filenames delimited by commas.
You can imagine what your users would say if a screen were produced
for a non-holiday.
Q. Can I combine a HELLO or GOODBYE list with a FIXED HOLIDAY or VARIABLE
DATE HOLIDAY list?
A: NO!. Again, the algorithms for each section is slightly different. I
apply the KISS technique [Keep It Simple SysOp!].
Q. Using an environment specified log, can I log to, say, an ACTIVITY.2
log while someone is online on that node?
A: SWAP is meant to be run during an event just after midnight....
If node 1 is running the event, then you should log to ACTIVITY.1 to
avoid potential problems. Same goes for postcall. If you use SWAP in a
POSTCALL.BAT, you should log to the activity log for that node, or
don't log after POSTCALL at all. An alternative is to log to your
LOCAL node log. That is what I do and it works well. Or log to ANY
file for that matter. For example, you might log to a file in file
area which only you can access. Then, all you have to do is read the
file while online. Use your imagination (and your head).
Q. How can I swap several HELLO screens.
For example, I want a HELLO1, HELLO2, HELLO3, HELLO4 and HELLO5.
A. I personally would not recommend so many screens. It bores the users
when they have to wade through all that material to get to the BBS.
However, since you asked....
1. Create a SWAP.CFG for HELLO1 and GOODBYE.BBS and your holidays
(as per normal).
2. Create a 2nd .CFG (ie. SWAP2.CFG for HELLO2 and HELLO3), with the
HELLO3 replacing GOODBYE input/output paths and filenames and the
GOODBYE list cited as the HELLO list. Don't use holidays.
3. Create a 3rd .CFG (ie. SWAP3.CFG for HELLO4 and HELLO5), with the
HELLO5 replacing the GOODBYE input/output paths and filenames and
the GOODBYE list cited as the HELLO list. Don't use holidays.
Your EVENT batch file should show something similar to:
@ECHO OFF
REM DO SOME WORK AND THEN DO THE SWAP PROGRAM
SET SWAPLOG=YOURFILE.TXT 'set an environment variable for logging.
SWAP 'run the normal swap
CALL COPYIT.BAT 'switch the files
SWAP SWAP2.CFG 'produce BAT for only HELLO2/3
CALL COPYIT.BAT 'switch the files
SWAP SWAP3.CFG 'produce BAT for only HELLO4/5
CALL COPYIT.BAT 'switch the files
SET SWAPLOG= 'get rid of environment string
REM DO MORE WORK
NODE1 'run Wildcat (leave blank for WC swap-out)
Let your imagination run wild!
Q. I have set an environment log but it doesn't seem to work. What could
be wrong?
A: Chances are that when the BBS shells out to run SWAP, the computer is
out of environment space. If you can't "temporarily" remove something
BEFORE "setting" SWAPLOG=, then use the log in the config file. You may
also specify a log in your configuration file (line 31). If so, make sure
you are not setting it in the environment otherwise the environment log is
still functional, and the one specified in the config file is redundant.
Q. Can a PATH to the list files be used? I mean, can I have my GOODBYE
list in one directory and the HELLO list in another?
A. Yes. IMHO, this complicates things, but if you want to do it go right
ahead. For all that matters, you may specify paths to all of your LISTS,
BATch file and LOGFILE, ie.:
C:\TEMP\HELLO1.LST 27'List of HELLO screens (BBS/SCR)
C:\OTHER\GOODBYE.LST 28'List of GOODBYE screens (BBS/SCR)
Z:\RIP.LST 29'List of RIP files (hello,goodbye)
E:\HOLS\HOLIDAYF.LST 30'List of fixed date holiday screens (BBS/SCR/RIP)
Q:\BORING\HOLIDAYV.LST 31'List of variable holiday screens (BBS/SCR/RIP)
F:\COMPLICA.TED\MUSIC.LST 32'List of MUSIC files
But why make it so hard to manage? Keep it simple. You will find management
MUCH easier that way.
Q. Can I send you some money for using this program?
A: Yes! Check the SWAP.DOC file for details.