home *** CD-ROM | disk | FTP | other *** search
-
- PEEKER.EXE v2.22 copyright (c) 1988/89/90/91/92 by M. Kimes
- All rights reserved
- ==============================
-
- Peeker is a short XBBS utility that will look inside archives (ZOO, ARC,
- PKA, PAK, LZH, ARJ, ad nauseum), read FILES.BBS listings, and optionally
- create extract files from archives, all online.
-
- Peeker requires a FOSSIL driver. It also requires a control file, but
- we'll get into that after we get Peeker's argument list out of the way.
-
- Usage: PEEKER.EXE args...
- Args can be any of the following:
-
- ! (Turns on debug mode, off by default)
- #<#> (Controls how many files Peeker will list on a wildcard request)
- L<screen lines> (Defaults to 24 lines)
- W<screen width> (Defaults to 80 columns)
- T<time in minutes> (Defaults to 30 minutes)
- D<D:\path to files directory> (Must pass if not using A arg)
- F<name of files.bbs-type file> (Defaults to FILES.BBS)
- A<name of flsearch.ctl-type file> (No default, not used if not passed)
- B<baudrate (0-38400...?)> (Defaults to 0 or local)
- G<graphics (0 or 1)> (Defaults to off or 0)
- C<commport (0=COM1)> (Fossil-style, defaults to 0 or COM1)
- S<user's security level> (Used in conjunction with A argument, 5 default)
- X<D:\path to extraction directory> (No extraction allowed without this)
- H<D:\path to home directory> (Defaults to directory where PEEKER starts)
- R<track d/l's by timestamp (0 or 1)> (Defaults to 0, no tracking)
- V<videomode (0=direct video, 1=BIOS, 2=DOS)> (0 default)
- M (no multitasker timeslicing)
- N<control file name> (Defaults to PEEKER.CTL)
- E<Filename> (Allow use of external reader locally)
- P<D:\path\filename> (File to peek at on entry, then exit. ERRORLEVEL 99
- is returned if this file isn't successfully Peeked at)
- I<EMS or D:> (Activate swap to EMS or Drive D: (A:, B:, C: etc.))
- U<User_Name> (Send user's name if no ONLINE.XBS or USERINFO.XBS is available)
- Z<maxK> (Activate Build-an-archive and assign max K component size)
-
- You'll get a listing like this if you type PEEKER H, for quick
- reference.
-
- WARNING...WARNING...WARNING...WARNING...Improper use of the X argument
- can cause data loss! All files in the Xtract directory will be wiped
- out by Peeker! DON'T MESS IT UP. When running Peeker with the X
- argument, do NOT do so from the command line, where a typo can erase
- valuable information. Do so only from batch files or your BBS's command
- line options, if available. BE CAREFUL! Honest, you could easily hurt
- yourself with a finger's slip.
-
- A sample call to Peeker:
- PEEKER.EXE ! DD:\IBM\COMM\ T15 B1200 C1 M2
-
- (A QuickBBS sysop would say PEEKER.EXE ! DD:\IBM\COMM\ T*T B*B C1 M2
- and an XBBS sysop would say PEEKER.EXE ! D*D T*T B*B C1 M2 and an
- Opus sysop would say "my BBS is primitive!")
-
- All this argument passing is simple for BBS's like QuickBBS or XBBS, but
- may be a little more complicated for others. Keep this in mind: the
- baud rate is used to determine nothing more than whether the user is
- online or local. A B1 is as good as a B9600 because Peeker uses the
- commport the way it finds it. The two exceptions to this are FILES.BBS
- paging (ANSI users 2400 baud or higher only) and transmit buffer
- flushing (Peeker flushes the output buffer after every line at 2400 baud
- or less). You could set a time limit of, say, 15 minutes and call two
- separate batch files, one for graphics and one for ASCII (OPUS sysops),
- and run Peeker from just about anything. I'm not interested in adapting
- Peeker to any particular BBS type, so don't bother asking. If your BBS
- can't pass command line arguments, complain to your BBS's author, not
- me.
-
- If Peeker can find a USERINFO.XBS or ONLINE.XBS file in the default
- directory, it'll get the user's name out of it; otherwise, it won't.
- The U command line option is provided for use by other systems.
-
- Archivers:
- =========
-
- For full support of the archivers in the included PEEKER.CTL, you should
- have PK(X)ARC.EXE, ZOO.EXE, PAK.EXE, PK(UN)ZIP.EXE, LHA.EXE and ARJ.EXE
- somewhere on your DOS Path. To see what your Path is, type SET at the
- DOS prompt without parameters. Check your DOS manual for information on
- how to Set a Path if you need help.
-
- PAK, ZOO, PK(X)ARC, PK(UN)ZIP ARJ and LHARC are the work of and
- copyrighted by their respective authors. All but ZOO and LHARC are
- Shareware, and you should read the registration and licensing
- agreements included in their distribution packages. Other archivers
- should work fine with Peeker, but these are the ones that I've
- included control settings for in PEEKER.CTL.
-
- The enclosed PEEKER.CTL is set up for PAK 2.5, PK(UN)ZIP 1.01, ZOO 2.01,
- LHARC 2.12, ARJ 2.00 and PK(X)ARC 3.61. If you have older or newer
- versions, you may need to adjust PEEK.TXT and recompile it with
- XPEEK.COM. (Note: There is now a program available to edit PEEKER.CTL
- (among other XBBS control files) directly called XEDIT, available as
- XEDIT.LZH from 1:380/16, but XPEEK still works).
-
- How it works:
- ============
-
- Peeker redirects the output of your archiver's view/list command to a
- temporary unique file and reads it (formatted just a little) to the
- user. Peeker uses a standard FOSSIL driver for modem i/o and DOS calls
- (well, sorta) for local i/o. When Peeker extracts a doc file from an
- archive for reading, it does so to the default directory (checking first
- to be sure there isn't already a file by that name), reads the file to
- the user, then deletes the file. If you've passed the X argument,
- Peeker switches to the eXtract directory and uses it for everything.
- Peeker always switches to the Home directory when finished.
-
- Control File:
- ============
-
- Peeker requires a control file. To create one, make a flat ASCII text
- file with the required information on your various archivers, and run
- XPEEK.COM on it. For instance, to replicate the enclosed PEEKER.CTL
- from PEEK.TXT, type XPEEK PEEK.TXT. Peeker creates a file named
- PEEKER.CTL from the text file you pass on the command line. Keep a
- backup of the text file so you can add, delete or change things later.
- Peeker will use as many archiver entries in the control file as will fit
- in available memory.
-
- I won't go into the format of the text file here; take a look at
- PEEK.TXT (it's heavily commented) to find the format. One thing to keep
- in mind is that you always want the command line to include the option
- to turn off any keyboard input (such as might be requested if a given
- file already exists during an extract). If the archiver pauses waiting
- for a local keypress and you're not there, your system will hang. For
- examples, with LHARC you'd want to include the /m switch and with PAK
- you'd want to include the /WA switch.
-
- I've included the source for XPEEK.COM in case someone wants to write
- something a little less spartan for creating control files, or just see
- what the structure looks like. You might also want XEDIT for an easier
- way to directly edit PEEKER.CTL; it's available separately as it has
- other uses, too.
-
- FLSEARCH.CTL:
- ============
-
- If you pass the A argument (a filename in FLSEARCH.CTL format), Peeker
- will allow the user to list the FILES.BBS in any directory to which the
- user's security level is equal to or greater than. Pass the user's
- security level with the S argument (Opus sysops can use ORUN, QBBS
- sysops can use a "stacked" autoexecuting menu, and XBBS sysops can just
- use *s#). Peeker will also find files in all the directories to which
- the user has access; especially handy with wildcards. FLSEARCH.CTL-type
- files have the following format:
-
- D:\PATH\ SECLVL# Name_of_area [FLAGS# D:\Upload_PATH\ Min.Age Flags Leech%]
-
- Path does not have to end with a backslash. SECLVL# must be a positive
- integer from 0 to 65535. Also notice that no spaces are allowed in the
- Name_of_area...use the underline character instead (Peeker will replace
- the underline with a real space for you). The "extended" information
- (in [] brackets) isn't used by Peeker, but is by some programs (notably
- XBBS). Peeker doesn't insist on it being there.
-
- Peeker will use up to 200 directories listed in the file. The
- previously mentioned XEDIT program can also edit FLSEARCH.CTL files with
- the extended information in them.
-
- Extraction:
- ==========
-
- Peeker can also allow users to extract parts of an archive and recombine
- them with the archiver of their choice. This is OPTIONAL. For this
- mechanism to become active, you must pass the X<drive:\Path\> argument
- on Peeker's command line. The contents of the eXtract directory are
- volatile; Peeker will wipe them before attempting to build a new
- archive, so BE CAREFUL. If the user creates an archive here, Peeker
- will exit with an ERRORLEVEL of 100. The calling program (BBS) must
- then allow the user to download the new file (XFILE.*, extension ZOO,
- PAK, ZIP, LZH, ARC or whatever) and preferably wipe the eXtract
- directory to tidy up. With QuickBBS, for example, you could call Peeker
- from a type 7 exit to a batch file. After Peeker runs, trap ERRORLEVEL
- 100 or just check for EXIST "XFILE.*" in the eXtract directory, and run
- FileDoor or DSZ if there's something waiting to be downloaded. That
- will take care of everything in one exit, making it a little faster and
- neater. If you're running XBBS, take a look at the sample u/d area text
- file in the archive...you can make it automatic by branching to a
- download call based on the program's returned ERRORLEVEL.
-
- When the user is using [B]uild an archive instead of [E]xtract, they can
- continue to extract from different files until Z's <maxK> argument has
- been met or exceeded. At that point, repack and exit occurs (is forced)
- as above.
-
- You can change the ERRORLEVEL with which Peeker exits after extracting
- and building a new archive. This is a little complicated, so you might
- want to skip it, but for the adventurous among you, here goes...
-
- Make a flat ASCII text file called PEEKER.EXT in the Home directory. On
- the first line of the file, place a string of alphanumeric characters
- which will be the "keys" for a menu you're about to build. Then make
- the rest of the file your menu. Peeker will read the first line to find
- out what your "keys" are, then display the rest of the file to the user.
- After the file is displayed, Peeker will ask the user "Please select: "
- and wait for a keypress. If the key pressed is not one you listed on
- the first line, it is erased and a bell is rung. When the user selects
- something valid, Peeker exits with the ERRORLEVEL corresponding to that
- key's ASCII value. Your batch file can then trap the ERRORLEVEL and do
- what you wanted (probably run an external protocol like DSZ to do the
- file transfer of XFILE.*). Here's a sample:
-
- .__Only Peeker "sees" this first line
- |
- ---------Cut here-------- |
- XYZ <--------------------+
- Available transfer protocols:
- [X]modem (yech!)
- [Y]modem (blah.)
- [Z]modem (yea!)
- ---------Cut here--------
-
- Then you'd trap ERRORLEVELs 88-90 to determine which the user selected.
- You might add a "Q" in there to allow the user to Quit without
- downloading (remember to DEL XFILE.*). Keep in mind that DOS traps
- ERRORLEVELs from highest to lowest (read your DOS manual if you don't
- know how to write a batch file--but if you don't know how to write a
- batch file, you shouldn't be running a BBS).
-
- You can also use PEEKER.EXT without enabling the menu...just put a blank
- (no spaces, just blank) line as the first line. Peeker will read the
- rest of the file and then exit with ERRORLEVEL 100 as usual. You could
- use this to give FileDoor instructions for getting the archive (QuickBBS
- sysops).
-
-
- Help, etc.:
- ==========
-
- Peeker can give the user help if you have a file called "PEEKER.HLP" in
- the Home directory or on the DOS path. There are no embedded text
- commands available; it should be a flat ASCII file for all users.
- Peeker will not offer help if this file is not available. There is one
- included in the archive, which you should edit to taste and to reflect
- the way you're using Peeker. Peeker will also not offer to read
- FILES.BBS if there isn't one in the Ddirectory Peeker is pointed at on
- the command line, nor will it offer to extract files if the eXtract
- directory is unavailable, nor will it offer to Build an archive if the
- Z<maxK> argument isn't passed. Peeker will add a list of extracted
- files to a logfile called "XBBS.LOG" if it finds one in the Home
- directory. How much Peeker will do is up to you and the way you call
- it.
-
-
- FILES.BBS Format:
- ================
-
- Although Peeker can certainly be used on systems that do not use the
- FILES.BBS-style files to keep track of available downloads, it works
- much better on those that do, since Peeker can list these files for the
- user (avoiding 'flipping' back and forth from Peeker to the BBS). Here
- is a sample of what a FILES.BBS can look like:
-
- -------------------------Cut here---------------------------------
- Any line beginning with at least one space, like this one, is a comment.
- v---Space between filename and description
- FILENAME.EXT Description of file
- Any text starting here is considered
- a continuation of the above comment.
- It lines up with that comment when listed.
- ; Any line with a first non-whitespace character semi-colon is ignored
- -------------------------Cut here---------------------------------
-
- Peeker will fill in the file's date and size-in-bytes for you, and add
- color for ANSI users. This is the "standard" FILES.BBS format with the
- addition of XBBS's extended comments (shouldn't affect anything on
- non-XBBS systems). Peeker does *not* consider lines beginning with a
- hyphen "-" to be comments. This is a 'broken' strategem, since "-" is a
- legitimate filename character in MS-DOS.
-
- Peeker will "page" FILES.BBS for ANSI users at 2400 baud or higher
- (allow reading forward and backward; always keeps a filename together
- with its extended comment line(s) if any). Peeker can also (optionally)
- track the number of times a file has been downloaded by the file's
- timestamp (an XBBS convention). Peeker probably does a better job of
- reading FILES.BBS than your BBS does (unless you're running XBBS :-).
- Now if we could just convince the SDS to use Peeker at all its sites and
- implement the multiple description lines...
-
-
- Special Local Keys:
- ==================
- ALT-C...Chat mode
- ALT-H...Hang up (drop DTR)
- ALT-J...Jump to DOS
- ALT-X...Abort program
- Up/Dn...Arrows add or subtract time from user
- Remember that Peeker is a Door,
- and your BBS won't know what you
- did with the user's time while
- s/he was in Peeker...
- ALT-CTL-DEL...Guess
-
- Peeker ERRORLEVEL possibilities:
- ===============================
- 0.....No problems; don't worry, be happy
- 1.....Carrier loss (or ALT-H hangup)
- 2.....User timeout (two minutes with no activity)
- 3.....Major screw-up (no FOSSIL, invalid command line)
- 4.....Ran out of memory during dynamic allocation
- 100...User created an archive for download
- Other ERRORLEVELs may be passed (see discussion of PEEKER.EXT)
-
-
- Miscellaneous stuff:
- ===================
-
- Peeker will be updated from this version only if I get a real brainstorm
- (hey, it could happen) or find a real bug. It should now be flexible
- enough to work with whatever archivers come along (at least for the next
- six months ;^). The latest version of Peeker is always available here
- under the magic filename PEEKER. Don't request using wildcards or you
- might get an unpleasant surprise from the phone company (the result of
- multiple copies being sent). I accept FReqs from anyone 23 hours/day
- (though I reserve the right to change my mind about it) using whatever
- piece of alpha trash I'm writing at the moment (as of this writing,
- 05/01/92, that'd be XBBS-PM OS/2 0.00).
-
- Peeker is free for the asking and free for the using so long as you
- don't charge anything...ANYTHING...for the service on which it's used or
- try to save anyone's soul (disgusting habit). You can distribute it in
- the unmodified archive to anyone you want so long as no fee is involved
- in the exchange (not even disk cost). FREE do you hear me?!! FREE!! HA
- HA HA ha ha ha!! Oops, sorry about that...
-
- If you feel guilty and wanna send money, go for it. I'll take the wife
- out for pizza and tell her where the money came from. Pizza raids cost
- $15.00. If you don't feel guilty, don't worry about it.
-
- Source code is included in the archive. You are authorized to modify
- and recompile but you may *not* distribute modified versions. Doing so
- violates my copyright and sets you up for a lawsuit (I hope you have a
- *lot* of money).
-
-
- I will support Peeker in the following manner only:
- --------------------------------------------------
- If you want netmail support, you'll have to send me a message, wait a
- day or few, and poll me for the answer. Since you're footing the bill,
- it'll be to your advantage to provide enough information for me to be
- able to help you. Include everything you can think of, no matter how
- trivial, that might lead to a clue as to why you're having problems, or
- if you've found a bug, give me all the detail you can on what happens
- before and after it strikes. And be sure you RTFM'd first! I'll do
- everything I can to help you out, within the limits of the information
- you give me, up to and including putting a fixed version on hold for
- you. An alternative to this manner would be the good old U.S.nail.
- Include an S.A.S.E. I can be reached at the following address:
-
- M. Kimes
- 542 Merrick
- Shreveport, LA 71104 USA
-
- In other words, I'm giving the program's use away free, but I'm not
- footing the bill for your questions.
-
-
- Revision History:
-
- New for revision 1.02:
- =====================
- o Paged reading supported for text files and archive listings.
- o A search string can be given when listing FILES.BBS.
- o Wildcards are supported wherever practical.
- o Sample Help file included in archive.
-
- New for revision 1.03:
- =====================
- o Improved reading of text files, particularly those that are formatted
- for printing. Peeker will now strip out more than one blank line in a
- row, and strips formfeed characters that caused blanking of some
- screens, making for quicker and neater file reading. If you're using
- Peeker strictly for text files, check out Library instead.
- o Peeker pauses at the end of a file read or archive listing now with
- the paged reading prompt, and the "Read again?" and "List again?"
- prompts have been removed.
- o Took out path information where possible (as far as user seeing it).
- o Better wildcard support.
- o Added the output switch (mode) as last command line parameter to speed
- up reading of files (at least locally) and bypass ANSI to avoid nasty
- files. Kept straight DOS writes optional for non-compatible compatibles.
- o Added LHARC support.
- o Added path search for archivers/dearchivers before allowing access to
- them (check existence of executable files before shelling).
- o Added ARC rearchive support through PAK, made PAK "backup" for PK(X)ARC.
- o Generally made Peeker a little more intelligent.
- o Added lewd, crude chat mode. Warning: uses INT 10H pos check call
- May change it to a FOSSIL call someday...
- o Added PEEKER.EXT (alternate ERRORLEVEL exit support)
- o Added paged reading for local mode and ANSI users > 1200 baud in
- FILES.BBS
-
- New for revision 2.00:
- =====================
- o Peeker is now an .EXE file instead of a .COM file
- o Peeker requires a .CTL file now, and comes with XPEEK.COM to make it
- o Now uses FLSEARCH.CTL (optionally) by popular demand, but this is
- _still_ a generic door, so don't ask me to make it EXITINFO.BBS-
- dependent again, dammit!
- o Just about everything else
-
- New for revision 2.01:
- =====================
- o Added ability to use an external reader, like List, locally.
- o Added limited ability to list contents of archives within archives.
- o Added [#] argument to prevent someone from listing an entire directory
- if you don't want them to (read: you can control the user-friendliness)
-
- New for revision 2.02:
- =====================
- o Added limited ability to extract from archives within archives.
-
- New for revision 2.03:
- =====================
- o Added [P] argument for some specific requirements
-
- New for revision 2.04:
- =====================
- o Added [I] argument for swapping to EMS or disk (courtesy of TurboPower)
-
- New for revision 2.06:
- =====================
- o Peeker will now look in HomeDir for Peeker.HLP and Peeker.EXT first,
- then search the DOS path them.
-
- New for revision 2.07:
- =====================
- o Peeker will redirect stdout and swap when getting an archive listing
- (if you're allowing swapping, of course).
- o Peeker will allow a user to extract when using the [P] argument (if
- you're allowing extraction, naturally).
- o Added [F]ind [H]ome etc. to internal file reader.
-
- New for revision 2.09:
- =====================
- o Added U<username> command line argument.
- o Added [B]uild an archive command (Z<maxK> command line argument).
-
- New for revision 2.10:
- =====================
- o Some really messed up doc files could lock up Peeker's reader.
- This has been circumvented, though they still may not display
- correctly.
- o File sharing is now used (files are opened in denynone mode where
- possible).
-
- New for revision 2.11:
- =====================
- o Extract will now give default of last filename that of which user
- listed the contents.
- o Miscellaneous code cleanup.
- o Made Peeker treat lines in FILES.BBS beginning with a semi-colon as a
- comment (skip, no list).
- o Couple of minor bugfixes (annoyances, nothing fatal).
- o Added source to archive.
-
- New for revision 2.12:
- =====================
- o Made FILES.BBS "comments" any string with first non-whitespace char ';'
-
- New for revision 2.13:
- =====================
- o Corrected bug in Build command.
-
- New for revision 2.20:
- =====================
- o Peeker now strips lines of a file it's reading to 80 characters.
- Someone didn't like the line wrap from .ARJ file listings.
- o Multitasker awareness, timeslice giveaway
- o Peeker should work with screens of any size now
- o Added status line
- o Added support for PEEKER.CLR file, list of colors (up to 26) that
- Peeker will use (uses defaults if not available). Colors are decimal
- integers in a flat text file, all on one line, separated by spaces. No
- real docs on this, UTSL (Use The Source, Luke) if you feel you need
- it.
- o Changed command line parm M's meaning, V has old meaning
-
- New for revision 2.21:
- =====================
- o Internal ANSI emulation.
-
- New for revision 2.22:
- =====================
- o Added optional external menu files PEEKER.MNU (ASCII or only
- available) and PEEKER.MNG (ANSI only). If present, Peeker will read
- them in lieu of its internal menu. Note that you can get rid of the
- last CR/LF on the file by putting a semi-colon there (many editors
- insist on adding a CR/LF to the last line, and it messes up your
- prompt. This works around it.).
- o Added ARJ to the default configuration file. No biggie; you'd already
- done that yourself, right? :-)
-
-
-
- M. Kimes
- 1:380/16.0@fidonet
- (318)222-3455 Data
-