How External Works


Return to Start



For predetermined (your choice) URL types Bobcat will automatically run
helper programs. These helper programs may be called either automatically
or manually. 


AUTOMATICALLY:

This is called AUTO_EXTERN and the definition is made in the
lynx.cfg file. The syntax for auto_extern is to put lines like
AUTO_EXTERN:FTP in lynx.cfg. Every time bobcat sees a URL ftp://..
it will run "external" with the URL as a parameter. Otherwise it
will run the internally defined function for that URL type, if it
exists..  External breaks down the url information and feeds it to 
the  correct batch file which you create  in the external subdirectory.
This method has been chosen to allow you maximum flexibility. And it has 
tested with many support applications.

You must create a batch file in the external subdirectory for external
do do anything.  If you have not created the correct batch file in the
external subdirectory you will just return to Bobcat.

Since there is no Telnet built into Bobcat and FTP still has some
problems it is suggested that these two be run as helper applications.
Minuet will work for both.

MANUALLY:

Bobcat has also a ctrl-A special function key  that allows manual
switching to external programs and loading the active URL when switching.

HOW:

External feeds the URL to a program called EXTRACT.EXE in the /external
subdirectory. EXTRACT.EXE in turn breaks the URL into its component
parts, identifies the URL type and calls a different batch file
for each type.

Users of Bobcat then have option of selecting alternative
programs to reach each type of URL by just creating batch files to call
the helper programs..

To do this you must write a batch file which
1. Makes sure that the IP address is passed properly to the second program.
2. Changes to the proper directory where the second program is installed
3. Runs the second (spawned) program with the correct form of command line
4. Changes back to the Bobcat directory.

All these batch files must be located in the \external subdirectory.

Extract.exe passes the address with information on the command line
to the batch file in the following way.
%1 is the entire address stripped of its URL type.
%2 is the host machine name
%3 is the host port. If no port is assigned Extract will fill in a 
    "well known port" for each url type. If it does not recognize the
    URL type it will fill in %3 as "NO_PORT". 
%4 .The remaining if any will be sent as %4.
    All Directories and pages after host and port are included in the %4.

For FTP only after revision E-04 we have added a furthur breakdown of %4 to allow use with 
some additional programs , particularily wattcp ftp
 %1  all URL
 %2  host
 %3  port?
 %4  path stripped of leading and trailing /
 %5  file name


Some sample batch files are provided.

DOSLYNX gopher.bat

@echo off
cd ..\..\doslynx
doslynx gopher://%1
cd ..\bobcat

MINUET ftp.bat

@echo off
cd ..\..\minuet
echo"~U~rl|ftp://%1  " > custom.txt
keytap minuet  //[F10]WU[ret]
cd ..\bobcat

Note: VE3LGS developed this batch method for BOBCAT use.
It writes a command line in a file called custom.txt and then runs it
within Minuet.
It uses several unique tricks to feed information to Minuet.
Note the (") right after the echo and the space after the %1
which causes the batch file to ignore the pipe (|). 
I do not know why this works or whether it is published anywhere.
It sure is not in anything in my docs from SoftMicro or IBM

Using custom.txt as a command line feed for Minuet is also undocumented
and took quite a bit of time to discover.  Also, the program keytap
works where others don't. 
Put them all together and the result is amazing.
Just don't bother using Minuet 19a.

WATTCP ftp.bat
from suggestions by Ralf Mueller

rem FTP.BAT
rem creates a script for use with wattcp ftp to semi automate
rem change the login password for your server (4 places) 

rem @echo off
cd ..\..\ftp
if not  "%5"=="" goto GETFILE
if not  "%4"=="" goto GODIR
if not  "%2"=="" goto OPENFTP
echo actually nothing to do - press any key
pause
goto END

rem %1  all URL
rem %2  host
rem %3  port?
rem %4  path stripped of leading and trailing /
rem %5  file name

:GETFILE
echo Do you want File %5 transfer in binary mode?
echo Yes will be BINARY
echo  No will be ASCII 
getyn
if errorlevel 1 goto BINARY
goto ascii

:BINARY
echo open %2 > ftp.scr
echo. >> ftp.scr
echo user anonymous >> ftp.scr
echo pass bobcat@foo.net >> ftp.scr
echo binary >> ftp.scr
echo cd /%4/ >> ftp.scr
echo get %5 >> ftp.scr
echo bye >> ftp.scr
ftp.exe -f ftp.scr
goto END

:ASCII
echo open %2 > ftp.scr
echo. >> ftp.scr
echo user anonymous >> ftp.scr
echo pass bobcat@foo.net >> ftp.scr
echo ascii >> ftp.scr
echo cd /%4/ >> ftp.scr
echo get %5 >> ftp.scr
echo bye >> ftp.scr
ftp.exe -f ftp.scr
goto END
:GODIR
echo open %2 > ftp.scr
echo. >> ftp.scr
echo user anonymous >> ftp.scr
echo pass bobcat@foo.net >> ftp.scr
echo binary >> ftp.scr
echo cd /%4/ >> ftp.scr
echo ls >> ftp.scr
ftp.exe -f ftp.scr
goto END


:openftp
echo open %2 > ftp.scr
echo. >> ftp.scr
echo user anonymous >> ftp.scr
echo pass bobcat@foo.net >> ftp.scr
echo binary >> ftp.scr
echo ls >> ftp.scr
ftp.exe -f ftp.scr
goto END

:END
cd ..\bobcat


ARACHNE http.bat

@echo off
cd ..\..\chaos
call arachne.bat http://%1 
cd ..\bobcat

Note: Yes, you can run Arachne as a helper application to Bobcat. 
Just follow the rules for external batch files above, and create a
http.bat. Note: Arachne must be in Connection:Ready in Arachne.cfg.
You can then browse  in faster text mode with Bobcat until
something looks interesting enough to require a graphics browser. Hit
CTL-A and you will spawn Arachne at the exact same site. Quitting
Arachne will bring you back to Bobcat at the same site as you left. 
Warning: Do not put AUTO_EXTERN:http in lynx.cfg or you will never
run Bobcat.

TN3270 telnet.bat or tn3270.bat

@echo off
cd ..\..\cutcp
SET $CUTCP1=myip~%myip%
tn3270 %2 %3
cd ..\bobcat

Re: Minuet 16 and 17
There is no way I can make either ver 16 or 17 work as well as ver 
18 (with Bobcat) because the built in parsing of an address does not 
seem to have been  added until ver 18 . I can get it to connect to a 
server with any site with ver 17 but not do the neat directory 
switching that can be done with ver 18.

To use ver 16 or 17 of Minuet as a helper to Bobcat the best I can do 
is this example for ftp.bat which should be located in  
\bobcat\external\

@REM FOR VERSION 16 AND 17 MINUET ONLY
@echo off
cd c:\dialnet\minuet
echo"~U~rl|ftp|%2  " > custom.txt
keytap minuet  //[F10]WU[ret]
cd c:\dialnet\bobcat
exit
!
The structure of line 4 is changed. 

For gopher and telnet, there needs to be similar changes to the 
gopher.bat and telnet.bat.

Note:
We have had strong complaints that the supplied external applications
are not suitable for one persons particular computer. 
Bobcat is the program, the rest applications which have been tossed in 
as examples of how to set it up for outside applications. You are free 
to change anything you want , even the source code to make any 
improvement you like. We had to start somewhere. The DVPEG, PLANY, 
ARACHNE, and Minuet can be anywhere you want or leave them out. They 
are examples. 

And if you have good suggestions on other applications and what to add 
to this program to improve it for others let us know.
The whole purpose is to:
Have fun.



Return to Start