Thread View: news.software.nn
6 messages
6 total messages
Started by Robert Story
Mon, 08 Nov 1993 18:06
two .newsrc files ?
Author: Robert Story
Date: Mon, 08 Nov 1993 18:06
Date: Mon, 08 Nov 1993 18:06
11 lines
1169 bytes
1169 bytes
is there a way to have two .newsrc files? I have a commercial account and want to be able to specify a 'work' and a 'personal' newsrc, so I only see the groups for that newsrc. I tried the man page and the FAQ, but couldn't find a way to have nn read anything besides a file called .newsrc in your home directory. a way to pass the name of the file or a way to make it look in the current directory (as opposed to the home directory) would be great.. -- Robert Story | rstory@crl.com | rstory@aol.com | #include <std/disclaimer.h>
Re: two .newsrc files ?
Author: Milt Epstein
Date: Mon, 08 Nov 1993 19:43
Date: Mon, 08 Nov 1993 19:43
28 lines
1989 bytes
1989 bytes
In <2bm1rb$afl@crl.crl.com> rstory@crl.com (Robert Story) writes: >is there a way to have two .newsrc files? I have a commercial account >and want to be able to specify a 'work' and a 'personal' newsrc, so I >only see the groups for that newsrc. I tried the man page and the FAQ, >but couldn't find a way to have nn read anything besides a file called >.newsrc in your home directory. a way to pass the name of the file or >a way to make it look in the current directory (as opposed to the home >directory) would be great.. Here's something you could try that would give you a behavior kind of like this: 1. Have two separate .nn directories (perhaps .nn1 and .nn2, or .nnwork and .nnpersonal). 2. In the init file in each of these directories, set the newsrc variable to ~/.nn/.newsrc (e.g. "set newsrc ~/.nn/.newsrc"). 3. Write a script (or two) that shifts one of these directories over to .nn -- then you have access to that particular .newsrc file. This allows you to switch back and forth between these two newsgroup situations. I don't know that there is a more direct way to do this. -- Milt Epstein Department of Computer Science University of Illinois epstein@cs.uiuc.edu
Re: two .newsrc files ?
Author: Richard A. Ball
Date: Mon, 08 Nov 1993 20:13
Date: Mon, 08 Nov 1993 20:13
37 lines
1470 bytes
1470 bytes
rstory@crl.com (Robert Story) writes:
>is there a way to have two .newsrc files?
Yes. This works for me, your mileage may vary...
1) create an init file '.nn/b' with contents
set newsrc ~/.nn/nb
sequence
2) create newsrc file '.nn/nb' with desired groups
comp.infosystems.www:
comp.sys.sun.announce:
3) invoke nn with
nn -I,init,b -B
This will initialize nn with your normal defaults, then override
with items specific to file 'b'; namely newsrc.
You can also setup a shell or function to save some keystrokes. ie.
#!/bin/ksh
#nnx <init file>
nn -I,init,$* -B
$ nnx work # uses init file 'work' and newsrc 'nwork'
$ nnx hobbies # uses init file 'hobbies' and newsrc 'nhobbies'
--
Opinions expressed are my own, and do not represent those of my employer.
Re: two .newsrc files ?
Author: Urban Fredriksson
Date: Wed, 10 Nov 1993 10:01
Date: Wed, 10 Nov 1993 10:01
59 lines
2561 bytes
2561 bytes
If you want to have two .newsrc files, probably you'll find it convenient to switch between them depending on what time it is. If so, you could put something like this into your ~/.nn/init file: on `date +%H` 06 18 19 20 21 22 23 set newsrc ~/.nn/.newsrc.home else set newsrc ~/.nn/.newsrc.work end Personally however, I find it better to have one .newsrc file and separate sequences. Otherwise I'll see new files twice and there's a problem with groups that are both "home" and "work". I used to have a problem with getting .newsrc updated correctly for cross-posting across the work-home line, but now I've solved it. And should I wish to read a group on the other side of the line, I can do so with "nn group.name" at other times. I've put this into my init file, as I'm quite sure I don't want to read control, and it's unlikely to ever be empty, so I'll enter it last in both sequences: # To get .newsrc updated in spite of groups beeing in different sequences on entry control quit end Then, at the end of the init file (the main part with all settings and macros is the same for both sequences), I've got these statements: on `date +%H` 06 18 19 20 21 22 23 chain init.s end on `` 09 12 15 chain init.l else exit end #EOF The init.home and init.work look something like this: # $HOME/.nn/init.home * * * * * sequence # Begin command; End is EOF rec.arts.sf. .pets # control . # Only to get .newsrc updated for the groups I don't read here #EOF # $HOME/.nn/init.l * * * * * sequence # Begin command; End is EOF >rec.arts.sf. >.pets # In order to get .newsrc updated, these are included here >control > NEW # control is flag to quit; NEW is last among those I read # .risks comp.unix. .nn .news. comp.os. comp.sys. # EOF -- Urban Fredriksson urf@icl.se
Re: two .newsrc files ?
Author: Andrew M Langmead
Date: Wed, 10 Nov 1993 21:26
Date: Wed, 10 Nov 1993 21:26
30 lines
2172 bytes
2172 bytes
rstory@crl.com (Robert Story) writes: >is there a way to have two .newsrc files? I have a commercial account >and want to be able to specify a 'work' and a 'personal' newsrc, so I >only see the groups for that newsrc. I tried the man page and the FAQ, >but couldn't find a way to have nn read anything besides a file called >.newsrc in your home directory. a way to pass the name of the file or >a way to make it look in the current directory (as opposed to the home >directory) would be great.. Are you sure that you need two different .newsrc files, or just two different presentation sequences. Two different presenation sequences would allow you to have comp.lang.c show up only during work time, and alt.folklore.urban show up during the evening. If you have a newsgroup that is in both presentation sequences, makring an article as read in one presentation sequence would keep the article as read in the other presentation sequence. Two different .newsrc files would have the article show up twice. (once for each .newsrc file) The online manual (type ":man" to access it) talks about the "on" command in the section "Command Groups." There is an example on how multiple init file sequences can be chosen depending on the time of day by having the "on" command chain to different init files. You could either do something like this and have different presenation sequeces in each init file, or have the on command set the newsrc variable to a different .newsrc file. -- ---- Andrew Langmead / aml@world.std.com / BIX a.langmead / CIS 72411,1560
Re: two .newsrc files ?
Author: Penny Gaines
Date: Fri, 12 Nov 1993 13:14
Date: Fri, 12 Nov 1993 13:14
24 lines
1227 bytes
1227 bytes
Most of the suggestions have involved 2 .newsrc files of varying names, which means you may see the same article twice. My alternative is to have a script like so: triton% cat bin/nn2 nn $* alt.ql.creative alt.usage.english uk.wic \ alt.feminism soc.women triton% nn group.name will start nn and only show articles in group.name. So this scripts displays the given groups and updates the same .newsrc as nn does. (The $* allows you to call it like so: %nn2 comp.lang.c and get that group too.) Penny Gaines -- penny@root.co.uk Unisoft Ltd, Spa House, 9 Chapel Place, Rivington Street, London EC2A 3DQ U.K.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads