Home » Archimedes archive » Acorn User » AU 1995-07.adf » !Internet_StarterPak » !Newsbase/Support/taylor/Doc/lrnews

!Newsbase/Support/taylor/Doc/lrnews

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1995-07.adf » !Internet_StarterPak
Filename: !Newsbase/Support/taylor/Doc/lrnews
Read OK:
File size: 037C bytes
Load address: 0000
Exec address: 0000
File contents
Using lrnews
------------

This is lrnews, a simple unbatcher for incoming news. All it does is
take a newsbatch as polled with taylor uucp on stdin, and act upon it
depending on what is on the first line.
If it finds "#! rnews ..." on the first line, it just copies the
article to Uucp$NewsDir.
If the first line starts with "#! ", then it copies the article to the
Scrap directory and starts the program given in the first line with
<Wimp$ScrapDir>.name as input file and <Uucp$NewsDir>.name as output
file. Take a look at support.zunbatch and support.cunbatch for examples.

Adding other unbatching types
-----------------------------

If you want to receive your news packed with, for example, freeze, the
quasi-standard header for that would be "#! funbatch". So all you have
to do if to write an obey script called funbatch, which contains the
line

freeze -d < %0 > %1

and that's it.
00000000  55 73 69 6e 67 20 6c 72  6e 65 77 73 0a 2d 2d 2d  |Using lrnews.---|
00000010  2d 2d 2d 2d 2d 2d 2d 2d  2d 0a 0a 54 68 69 73 20  |---------..This |
00000020  69 73 20 6c 72 6e 65 77  73 2c 20 61 20 73 69 6d  |is lrnews, a sim|
00000030  70 6c 65 20 75 6e 62 61  74 63 68 65 72 20 66 6f  |ple unbatcher fo|
00000040  72 20 69 6e 63 6f 6d 69  6e 67 20 6e 65 77 73 2e  |r incoming news.|
00000050  20 41 6c 6c 20 69 74 20  64 6f 65 73 20 69 73 0a  | All it does is.|
00000060  74 61 6b 65 20 61 20 6e  65 77 73 62 61 74 63 68  |take a newsbatch|
00000070  20 61 73 20 70 6f 6c 6c  65 64 20 77 69 74 68 20  | as polled with |
00000080  74 61 79 6c 6f 72 20 75  75 63 70 20 6f 6e 20 73  |taylor uucp on s|
00000090  74 64 69 6e 2c 20 61 6e  64 20 61 63 74 20 75 70  |tdin, and act up|
000000a0  6f 6e 20 69 74 0a 64 65  70 65 6e 64 69 6e 67 20  |on it.depending |
000000b0  6f 6e 20 77 68 61 74 20  69 73 20 6f 6e 20 74 68  |on what is on th|
000000c0  65 20 66 69 72 73 74 20  6c 69 6e 65 2e 0a 49 66  |e first line..If|
000000d0  20 69 74 20 66 69 6e 64  73 20 22 23 21 20 72 6e  | it finds "#! rn|
000000e0  65 77 73 20 2e 2e 2e 22  20 6f 6e 20 74 68 65 20  |ews ..." on the |
000000f0  66 69 72 73 74 20 6c 69  6e 65 2c 20 69 74 20 6a  |first line, it j|
00000100  75 73 74 20 63 6f 70 69  65 73 20 74 68 65 0a 61  |ust copies the.a|
00000110  72 74 69 63 6c 65 20 74  6f 20 55 75 63 70 24 4e  |rticle to Uucp$N|
00000120  65 77 73 44 69 72 2e 0a  49 66 20 74 68 65 20 66  |ewsDir..If the f|
00000130  69 72 73 74 20 6c 69 6e  65 20 73 74 61 72 74 73  |irst line starts|
00000140  20 77 69 74 68 20 22 23  21 20 22 2c 20 74 68 65  | with "#! ", the|
00000150  6e 20 69 74 20 63 6f 70  69 65 73 20 74 68 65 20  |n it copies the |
00000160  61 72 74 69 63 6c 65 20  74 6f 20 74 68 65 0a 53  |article to the.S|
00000170  63 72 61 70 20 64 69 72  65 63 74 6f 72 79 20 61  |crap directory a|
00000180  6e 64 20 73 74 61 72 74  73 20 74 68 65 20 70 72  |nd starts the pr|
00000190  6f 67 72 61 6d 20 67 69  76 65 6e 20 69 6e 20 74  |ogram given in t|
000001a0  68 65 20 66 69 72 73 74  20 6c 69 6e 65 20 77 69  |he first line wi|
000001b0  74 68 0a 3c 57 69 6d 70  24 53 63 72 61 70 44 69  |th.<Wimp$ScrapDi|
000001c0  72 3e 2e 6e 61 6d 65 20  61 73 20 69 6e 70 75 74  |r>.name as input|
000001d0  20 66 69 6c 65 20 61 6e  64 20 3c 55 75 63 70 24  | file and <Uucp$|
000001e0  4e 65 77 73 44 69 72 3e  2e 6e 61 6d 65 20 61 73  |NewsDir>.name as|
000001f0  20 6f 75 74 70 75 74 0a  66 69 6c 65 2e 20 54 61  | output.file. Ta|
00000200  6b 65 20 61 20 6c 6f 6f  6b 20 61 74 20 73 75 70  |ke a look at sup|
00000210  70 6f 72 74 2e 7a 75 6e  62 61 74 63 68 20 61 6e  |port.zunbatch an|
00000220  64 20 73 75 70 70 6f 72  74 2e 63 75 6e 62 61 74  |d support.cunbat|
00000230  63 68 20 66 6f 72 20 65  78 61 6d 70 6c 65 73 2e  |ch for examples.|
00000240  0a 0a 41 64 64 69 6e 67  20 6f 74 68 65 72 20 75  |..Adding other u|
00000250  6e 62 61 74 63 68 69 6e  67 20 74 79 70 65 73 0a  |nbatching types.|
00000260  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000270  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 0a 49  |-------------..I|
00000280  66 20 79 6f 75 20 77 61  6e 74 20 74 6f 20 72 65  |f you want to re|
00000290  63 65 69 76 65 20 79 6f  75 72 20 6e 65 77 73 20  |ceive your news |
000002a0  70 61 63 6b 65 64 20 77  69 74 68 2c 20 66 6f 72  |packed with, for|
000002b0  20 65 78 61 6d 70 6c 65  2c 20 66 72 65 65 7a 65  | example, freeze|
000002c0  2c 20 74 68 65 0a 71 75  61 73 69 2d 73 74 61 6e  |, the.quasi-stan|
000002d0  64 61 72 64 20 68 65 61  64 65 72 20 66 6f 72 20  |dard header for |
000002e0  74 68 61 74 20 77 6f 75  6c 64 20 62 65 20 22 23  |that would be "#|
000002f0  21 20 66 75 6e 62 61 74  63 68 22 2e 20 53 6f 20  |! funbatch". So |
00000300  61 6c 6c 20 79 6f 75 20  68 61 76 65 0a 74 6f 20  |all you have.to |
00000310  64 6f 20 69 66 20 74 6f  20 77 72 69 74 65 20 61  |do if to write a|
00000320  6e 20 6f 62 65 79 20 73  63 72 69 70 74 20 63 61  |n obey script ca|
00000330  6c 6c 65 64 20 66 75 6e  62 61 74 63 68 2c 20 77  |lled funbatch, w|
00000340  68 69 63 68 20 63 6f 6e  74 61 69 6e 73 20 74 68  |hich contains th|
00000350  65 0a 6c 69 6e 65 0a 0a  66 72 65 65 7a 65 20 2d  |e.line..freeze -|
00000360  64 20 3c 20 25 30 20 3e  20 25 31 0a 0a 61 6e 64  |d < %0 > %1..and|
00000370  20 74 68 61 74 27 73 20  69 74 2e 0a              | that's it..|
0000037c