Thread View: news.software.readers
4 messages
4 total messages
Started by Kevin Rodgers
Thu, 02 Jun 1994 16:23
tin: How to save articles to a newsgroup directory hierarchy?
Author: Kevin Rodgers
Date: Thu, 02 Jun 1994 16:23
Date: Thu, 02 Jun 1994 16:23
22 lines
1697 bytes
1697 bytes
With rn, I was able to save articles to a newsgroup directory hierarchy by specifying the -/ option on the command line, or in (a file named by) the RNINIT environment variable. For instance, saving an article in gnu.emacs.announce to "emacs-20.1" would actually write it to the file ~/News/gnu/emacs/announce/emacs-20.1. Now with tin [1.2 PL2], it seems that I'll have to maintain the group attributes file, with two lines for each newsgroup to which I'm subscribed: newsgroup=gnu.emacs.announce savedir=gnu/emacs/announce 1. Is there another way to emulate rn's -/ option? Otherwise I'll end up automating the attributes file updates with make & sed. 2. Is savedir interpreted relative to ~/News? -- Kevin Rodgers <kevinr@ihs.com> Project Engineer Information Handling Services Electronic Systems Development 15 Inverness Way East, M/S A203 Englewood CO 80112 USA (303) 397-2807[voice]/-2620[fax]
Re: tin: How to save articles to a newsgroup directory hierarchy?
Author: Kevin Lentin
Date: Sat, 04 Jun 1994 08:30
Date: Sat, 04 Jun 1994 08:30
25 lines
2105 bytes
2105 bytes
Kevin Rodgers (kevinr@sauron.ihs.com) wrote:
> 1. Is there another way to emulate rn's -/ option? Otherwise I'll end
> up automating the attributes file updates with make & sed.
Yes, put a + before the filename uyou want to save. It's in the man page!
s Save current article / thread / auto selected (hot) articles /
articles matching pattern / tagged articles to file / files /
mailbox. To save to a mailbox enter '=' or '=mailbox' when
asked for filename to save to. To save in <newsgroup
name>/<filename> format enter '+filename'. Environment
variables are allowed within a filename (i.e.
$SOURCES/dir/filename).
> 2. Is savedir interpreted relative to ~/News?
Yes. Unless it has any other special characters to change that like =, $, +, ~, /.
--
[==================================================================]
[ Kevin Lentin |___/~\__/~\___/~~~~\__/~\__/~\_| ]
[ kevinl@bruce.cs.monash.edu.au |___/~\/~\_____/~\______/~\/~\__| ]
[ Macintrash: 'Just say NO!' |___/~\__/~\___/~~~~\____/~~\___| ]
[==================================================================]
Re: tin: How to save articles to a newsgroup directory hierarchy?
Author: Soh Kam Yung
Date: Sun, 05 Jun 1994 04:39
Date: Sun, 05 Jun 1994 04:39
27 lines
1893 bytes
1893 bytes
Kevin Lentin (kevinl@bruce.cs.monash.edu.au) wrote: : Kevin Rodgers (kevinr@sauron.ihs.com) wrote: : > 1. Is there another way to emulate rn's -/ option? Otherwise I'll end : > up automating the attributes file updates with make & sed. : Yes, put a + before the filename uyou want to save. It's in the man page! Sorry, but that was not what the original poster was looking for. He wanted to save an article in, say, newsgroup gnu.emacs.announce as ~/News/gnu/emacs/announce/<filename> Using the +<filename> option in tin would save it as ~/News/gnu.emacs.announce/<filename> Note the difference. Regards -- +----------------------------------------------------------+ + Soh Kam Yung | sauron@ee.nus.sg | engp3010@leonis.nus.sg + +----------------------------------------------------------+ + "Violence is the last refuge of the incompetent." + + Mayor Salvor Hardin, "Foundation" by Isaac Asimov + +----------------------------------------------------------+
Re: tin: How to save articles to a newsgroup directory hierarchy?
Author: Kevin Rodgers
Date: Mon, 06 Jun 1994 15:32
Date: Mon, 06 Jun 1994 15:32
59 lines
2952 bytes
2952 bytes
I wrote:
>With rn, I was able to save articles to a newsgroup directory hierarchy
>by specifying the -/ option on the command line, or in (a file named by)
>the RNINIT environment variable. For instance, saving an article in
>gnu.emacs.announce to "emacs-20.1" would actually write it to the file
>~/News/gnu/emacs/announce/emacs-20.1.
>
>Now with tin [1.2 PL2], it seems that I'll have to maintain the group
>attributes file, with two lines for each newsgroup to which I'm
>subscribed:
>
> newsgroup=gnu.emacs.announce
> savedir=gnu/emacs/announce
Actually, since the attribute's savedir isn't interpreted relative to
the global savedir, the second line should be
savedir=~/News/gnu/emacs/announce
>1. Is there another way to emulate rn's -/ option? Otherwise I'll end
> up automating the attributes file updates with make & sed.
No one has responded with another way, so I'll post my solution:
(1) Rename your current attributes file to save any group attributes
you've set:
mv ~/.tin/attributes ~/.tin/attributes.default
(2) Create ~/.tin/Makefile that appends a savedir line to the default
attributes for each subscribed newsgroup:
attributes: attributes.default $(HOME)/.newsrc
-rm -f $@
cat attributes.default > $@
echo '# The following lines have been added automatically by $HOME/.tin/Makefile' >> $@
grep -v ! $(HOME)/.newsrc | \
sed -e 's/:.*$$//' | \
nawk '{ \
printf "\nnewsgroup=%s\nsavedir=~/News/", $$0; \
gsub("\\.", "/", $$0); print $$0; \
}' >> $@
If your system doesn't have nawk, you can use this awk command instead:
awk -F. '{ \
printf "\nnewsgroup=%s\nsavedir=~/News/", $$0; \
ORS = "/"; for (i = 1; i < NF; i++) print $$i; printf "%s\n", $$NF; \
}'
(3) Define a C shell alias to automatically update the attributes file
after reading news:
alias tin 'tin \!* && (cd ~/.tin; make)'
--
Kevin Rodgers <kevinr@ihs.com> Project Engineer
Information Handling Services Electronic Systems Development
15 Inverness Way East, M/S A203
Englewood CO 80112 USA (303) 397-2807[voice]/-2620[fax]
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