home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
url_util.zip
/
README.TXT
< prev
Wrap
Text File
|
1997-07-16
|
4KB
|
80 lines
Three utilities for your slrn URL browsing pleasure from
pardoz@io.com. Last modified July 16, 1997.
Geturl.cmd and downurl.cmd are designed for offline Web browsing
from slrn. Geturl appends a URL to an HTML file suitable for use as a
bookmark file in your Web browser next time you go online; downurl
creates (or appends to) a file of URLs to be downloaded using sslurp -
the files can then be loaded into your favourite browser when you're
offline, which can be useful reducing online charges (see the sslurp
documentation for more details on using the program and the .CMD file
itself for more information on where to find sslurp) or downloading Web
large pages or files in the middle of the night.
Picker.sl is an S-Lang macro that allows you to choose which Web
browser you want to invoke from slrn. To install it either copy it to
your slrn directory and add
interpret picker.sl
to your slrn.rc file or append the contents of the file to the end of
your existing slrn.sl file.
MODIFYING PICKER.SL
The first part you may wish to modify looks like this:
rsp = select_list_box ("Select Browser:",
"Lynx", "Bookmark", "Download", 3,
2);
"Lynx", "Bookmark", and "Download" are the three default browsers. If
you wish to change one replace the name in quotation marks with the new
name (and see below) - for example if you wish to use Netscape instead
of Lynx change the first value to "Netscape". The '3' is the number of
options to choose from - if you wish to use more or fewer choices,
modify the number appropriately (for example if you wish to use these
three choices plus Netscape change the '3' to a '4'). The '2' is the
default value you will be presented with in the listbox, currently
corresponding to "Bookmark". Changing this value to '1' would make
Lynx the default browser to invoke.
The other part you may wish to modify is the section reading:
switch (rsp)
{ case "Lynx" : browservbl = "lynx2.cmd %s" }
{ case "Bookmark" : browservbl = "echo %s | geturl.cmd > nul" }
{ case "Download" : browservbl = "echo %s | downurl.cmd > nul" }
In case you're curious about lynx2.cmd, it looks like this:
@echo off
REM Set up appropriate environment variables for Lynx
set home=e:\lynx2
set tmp=e:\lynx2
set terminfo=e:\lynx2\terminfo
set term=ansi-color-2
set lynx_config=e:\lynx2\lynx.cfg
REM Change to the Lynx directory
cd \lynx2
REM Start Lynx with the selected URL in a separate window in the
REM background and close the window when Lynx exits
start /C /B e:\lynx2\lynx.exe %1
If you modified one or more of the values above, make the same
changes here. For example if you replaced "Lynx" with "Netscape" in
the first section replace { case "Lynx" ...} with { case "Netscape"
...} and change the "lynx2.cmd %s" to "netscape.cmd %s" or something
similar, where netscape.cmd looks something like this:
cd \netscape
start netscape %1
If you added or removed a browser in the first section make
appropriate changes here. For example if you changed the selection box
to give you four choices (Lynx, geturl, downurl, and Netscape) this
section should look like this:
switch (rsp)
{ case "Lynx" : browservbl = "lynx2.cmd %s" }
{ case "Bookmark" : browservbl = "echo %s | geturl.cmd > nul" }
{ case "Download" : browservbl = "echo %s | downurl.cmd > nul" }
{ case "Netscape" : browservbl = "netscape.cmd %s" }