News-WWW Gateway
Copyright (C) 1995 by
Víctor Parada
Current version is V0.2b 95/01/31
Description
This CGI script acts as a WWW gateway for News, providing access
to all the newsgroups available for the WWW server, that are
authorized for distribution through the WWW.
It can be linked by Information Services to simplify the maintainance
of the Information (this was the motivation of the gateway script).
The gateway provides a nice interfase to News, using HTML+
(HTML 3.0) tags to format the display.
The user can control many of the features in a newsreader
(list articles in a newsgroup, retrieve an article,
search for a string in a subject, ...)
just specifying what (s)he wants to do in the requesting URL.
Also, (s)he can follow links contained in articles while reading them.
Using the Gateway
In a HTML document, a provider can put an hypertext anchor as usual,
giving a special URL in the HREF argument of it.
Doing this, for example, a Home Page can provide a link to the
most recent article in some newsgroup, without the need of updating
the link each time a new article is posted.
Also, a user can use the "Open Location" command in his/her preferred
WWW browser to access the News-WWW Gateway.
The following are the requested actions that can be specified in the
URL:
- List of available (authorized) groups:
http://www.server:port/cgi-bin/news/
- List of newest articles in a group:
http://www.server:port/cgi-bin/news/group.name/
- List of articles with subject containing "string" in a group:
http://www.server:port/cgi-bin/news/group.name/?string
- List of all articles in a group:
http://www.server:port/cgi-bin/news/group.name/ALL
- List of articles numbered from "a" to "b" in a group:
http://www.server:port/cgi-bin/news/group.name/LIST-a-b
- List of newer articles numbered from "a" in a group:
http://www.server:port/cgi-bin/news/group.name/NEW-a
- List of older articles numbered up to "b" in a group:
http://www.server:port/cgi-bin/news/group.name/OLD-b
- Newest article available in a group:
http://www.server:port/cgi-bin/news/group.name/LAST
- Article "n" in a group:
http://www.server:port/cgi-bin/news/group.name/n
- Article "<id>" in a group:
http://www.server:port/cgi-bin/news/group.name/<id>
Note: http://www.server:port portion
of the URL can be ommited if the Gateway is linked from a page at the
same host and port number.
Also, port number can be omited if it equals to "80".
- Make sure you have
perl(1) (4.036 or higher) in the
machine where the httpd server resides.
- Make sure your news-server supports
XOVER
NOV extension command for the NNTP protocol.
InterNet News (INN) supports it.
- Make sure your news-server can be accessed from the host
where the httpd server resides.
The script will connect to it using
sockets.
- Make sure you have write access to the "cgi-bin" directory of
your WWW server, or you can have a script to be executed by the
httpd server.
- Request for the gateway program sending an e-mail to
vparada@inf.utfsm.cl
or pick it at
ftp://ftp.inf.utfsm.cl/pub/utfsm/perl/nw-gw.tgz
- Unpack the sources using GNU's
gunzip and
tar.
- Edit the first line of the news script to tell it
where
perl resides,
for example: #!/usr/local/bin/perl.
- Edit the few last lines of the news script to tell it
the host name of the News server and the socket port number.
- Edit the few last lines of the news script to tell it
the list of authorized newsgroups and their description.
- Copy/move the modified news script to the "cgi-bin"
directory of the WWW httpd server. Rename it if required and give it
required execution permissons.
- Access it with the WWW browser of your choise, opening the URL:
http://your.www.host/cgi-bin/news/
(the trailing slash is required; if omited, an automagic redirection
is done).
- E-mail me your comments,
bugs report, ...
Bugs
- It is still in BETA stage. (wanna be a beta-tester?)
- It is slooooowwwww due to unnecessary
if conditions
to debug it.
- It was written in
perl(1) (This is not a bug :-)
- It doesn't use forms (for backward compatibility)
- Only one key can be specified for a search.
- Searches are done over all the
XOVER database for a
given group, so author names, e-mail addresses, message identifier and
article's references can also be matched.
Wanna see a demo?
At U.T.F.S.M., the gateway is accessed through the following URL:
http://www.inf.utfsm.cl/~vparada/cgi-bin/news-demo/
License Agreement and Lack of Warranty:
- The author of this program is Victor Parada <vparada@inf.utfsm.cl>.
- This program is "Freeware", not "Public Domain".
- This program must be distributed for free, and cannot be included in
commercial packages without prior written permisson from the autor.
- This program cannot be distributed if modified in any way.
- This program can be used by anyone if the copyright and this notice
remains intact in every file.
- If you modify this program, please e-mail patches to the the author.
- This is a Beta version of the program. You have been warned!
- This program is provided ``AS IS'', without any warranty.
- This program can cause huge file transfers and all the related effects.
- Neither the author nor UTFSM are responsibles for the use of this program.
- Bug reports, comments, questions and suggestions are welcome! But
please check first that you have the latest version!
If you (want to) use this program, please send
e-mail to the author.
He will try to notify you of any updates made to it.
95/11/05
Víctor Parada
(vparada@inf.utfsm.cl)