pnews(8)

NAME
pnews - article composing program

SYNOPSIS
pnews [-d] [ newsgroup ]

DESCRIPTION

With this program, one can post items called articles to the local system and to the network. It has an article composing editor similar to the one found in the wmail(1) program. When the article is finished, it is handed to the inews(8) program for delivery.

POSTING AN ARTICLE
When one wishes to post an article on the NEWS network, one has to know some things before the article can be composed. Probably the most important issue is the newsgroup(s) to which the article has to be posted. Also, it is considered civilized to give the article a title (also called a subject ), to enable people to scan for interesting topics very quickly. To make sure that your article about your computer being for sale is not going to be posted around the whole world, you can also restrict the distribution of the article to anything other than the default of (usually) " world ".

To start the program, type the command:

pnews

If an argument is given, that will will be taken as the default news group to post to. Usually, the program will reply by asking you the question:

Subject: _

Type a short description of the subject of the article. Note, that the program insists on having a subject text, since most people who read news prefer to receive it with this line present. It allows them to select articles very fast.

Next, the program asks you to enter some:

Keywords: _

for the article. These have about the same value as the Subject: line above. Please enter some keywords, followed by (or only, if you don't want to enter keywords) the RETURN key. The program will now ask you to enter:

Newsgroups [comp.os.coherent]:
> _

The name between the two brackets is the news group it will use if you type only the RETURN key as an answer (the value of this text can be set by changing the value in the DFLT_NEWSG macro in the wnews.h file before compiling pnews) or by typing its name as the argument to the program (see above). If you want the article to go to other news groups than the default one, enter multiple groups separated by either a space or a comma.

If you type the name of a non-existent news group, the program will tell you so and reprompt. Finally, it asks you what the:

Distribution [world]: _

will be. Again, it uses the text between the two brackets if you answer by typing RETURN only. The value of this text is determined by the value of the macro DFLT_DIST in the wnews.h file. Again, you will be told when a non-existent type of distribution is chosen. You will then be asked to re-type it. If the distribution type is not local (i.e. only post it on the local machine), the program will indicate what the effect of your posting will be, and it will ask you if you really want to continue. Use this opportunity to quit, if you are unsure about posting the message. It causes bad karma to post silly messages on the network...

Pnews is now in the Article Editor Mode, which basically means that you can enter the article text now. See the section called THE ARTICLE EDITOR for a description of how to compose articles.

Pnews will have created the article header, which looks like the following:

Subject: the subject of this article
Keywords: keywords, if any
Newsgroups: comma separated list of news groups
Distribution: type of distribution
<empty line>

for example:

Subject: W-NEWS: a news package for Linux, Coherent and Minix
Keywords: minix news
Newsgroups: comp.os.minix,mugnet.sources.d
Distribution: world
<empty line>

From now on, all text entered until the article is finished will appear after this header. The article can be finished by typing a dot on a new line, or by typing CTRL-D at any time. For example, we may have composed the article:

Dear All,

I just finished the W-NEWS version 4.40 News Procesing
Package for the freeware ?nix systems. It looks like B News 2.11
very much, and it works great on Linux. This package will
be put on sunsite.unc.edu very soon.

Regards,
        Fred van Kempen.

Pnews will now append the user's signature file (usually the file called .signature in the user's home directory) to the contents of the article, and then close the article file. After finishing the article, pnews will send it to the inews(8) program for the actual posting of the article. Be patient, this may take some time.

Instead of using the keyboard as input to the pnews, you may also use a ready-to-run file as input to the program by typing the command:

pnews < file_name

in which case the contents of file file_name will be used as input to the pnews program. Note, that when the standard input of the pnews program is a file, it will still ask for the Subject: etc. lines. It will not , however, append a signature in that case.

ARTICLE EDITOR
The pnews program has lots of useful commands to help composing the article. Usually, when an article is posted, one just types in the text one wishes to send, but when one has to insert other documents, or the contents of the article(s) one is replying to, composing an article can be a difficult thing to do without these commands.

As soon as pnews is ready to accept lines of text for the article (see above for entering the header lines), the built-in Article Editor can be used. To invoke commands of this editor, type a tilde ( ~ ) character on the first character of a line, followed by the command and its arguments. Pnews will then interpret the given command (without the tilde character), instead of adding it to the article text. To add the tilde character itself, type two of them at the beginning of the line; pnews will then insert the latter into the article text.

You can get a summary of all available editor commands by typing the ~? command, which means help. The summary looks like this:

    *** W-NEWS PostNews Article Editor Help ***
~?           This Help Screen
~!           Escape into Shell
~a           Append .signature to article
~e           Invoke line editor on article
~q           Quit (with save) sending this article
~r filename  Insert file into article
~R filename  Insert quoted file into article
~v           Invoke visual editor on article
~x           Exit (abort) sending this article

We will now have a closer look at each of the available commands.

~? - Show Editor Command Help
    When this command is typed, a command summary similar to the one above will be displayed, and the user can continue adding text. No arguments are needed.

~! - Escape to System Shell
    This command allows the user to either execute a system command, or to temporarily escape into a system shell. In the first form, a command line of:

    ~! commandname [arguments] ...

    is typed, with commandname being the name of the command to be executed, and arguments (if present) the arguments for that command. Here is a simple example of such a command line:

    ~! ls -lg /usr/bin

    In the latter form, no arguments are needed, and this command will execute a system shell for the user. To go back to pnews, type the usual CTRL-D sequence to the shell.

    After executing the command or shell, pnews prints the message [continue] to the user, to indicate that one is back in the editor, and that one can continue adding text.

~a - Append .signature to article
    Usually, it is nice to have the posting program appending some sort of personal signature to the article being composed. The pnews program automatically appends a file called .signature from the user's home directory to the message before it is being handed over to the system posting program called inews(1) (see manual page of inews for more detailed information on how articles are posted).

    This command allow you to force the program to append the .signature file to the article at this point in the article as well. After having added the signature, pnews prints the message [continue] to the user, to indicate that one is back in the editor, and that one can continue adding text.

~e - Invoke line (or other) editor on article

~v - Invoke visual (or other) editor on article
    Sometimes it can be useful to edit the article with a real text editor instead of the pnews Article Editor. Especially articles which need a lot of cut-and-paste operations can be composed easier with a text editor. By convention, the ~e command invokes a line editor (for terminals which cannot handle visual editors) such as ed(1) , and the ~v command invokes a screen visual editor, such as vi(1) . By changing the values in the header file at compilation time, the names of these editors can be changed, to have pnews invoke different editors than the ones named above. As soon as we are back in pnews, it prints the message [continue] to the user, to indicate that one is back in the editor, and that one can continue adding text.

~q - Quit (with save to dead.letter) posting this article
    This command allows one to abort the posting of an article, in case of a misspelled newsgroup, for example. The contents of the article processed this far as saved into a file called dead.article in the user's home directory, to allow for later reposting of the article. No arguments are needed.

~r - Insert file into article

~R - Insert quoted file into article
    When posting articles, it is often desirable to include files in the article. With these two commands, one can insert the contents of the designated file into the article being composed. They both expect an argument which should be the file name of the file to be included, following the usual UNIX file naming conventions. If the ~R command is used, the file will be quoted (i.e. all lines of the file will be prepended with the "> " text). When the file has been inserted, pnews will print the number of lines and characters inserted into the article, followed by the [continue] text to indicate that one is back in the editor, and that one can continue adding text.

~x - Exit (abort) posting this article
    When this command is typed, pnews will abort posting the article. The contents of the article are discarded, no save takes place. No arguments are expected.

FILES
/usr/lib/news/distributions,
/usr/lib/news/newsgroups,
$HOME/dead.article
(you may find these files in /conf/news)

AUTHORS
Fred N. van Kempen, waltje@Infomagic.COM
Udo Munk, udo@umunk.GUN.de (Coherent)