[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] script for controlling leafnode fetch



Greisberger Christophe <greisberger@xxxxxxxxxxxxxxx> wrote:
>What shall I do to stop leafnode from fetching newsgroups that I don't read
anymore?
>Is is automatic after some time?
>Do I have to delete /var/spool/news/interesting.groups/the.news.group.name


yes, and yes.

For anyone interested, here is the script I use for invoking leafnode.
It is very useful in cutting down the overall news traffic, as it
protects from "accidental" subscriptions and also cuts off unnecessary
news fetching for unread groups.

I use method #2, since I read news on my (normally) single-user box.

-------------- cut here ------------------------------
#!/bin/sh
#-----------------------------------------------------------------------
#
# dofetch -- add some special processing to fetch
#
# Fetchnews normally works in an automatic manner, fetching
# groups which have been recently requested by users.
#
# This shell script provides a bit more control over what is
# fetched.  It can either
#    1.  fetch groups in a pre-specified file
#    2.  fetch groups based on a particular user's .newsr file
#    3.  fetch groups on the command line
#
# License as per leafnode, share and enjoy!
# Mark Harrison, markh@xxxxxxxxxxxxxxxxx
#-----------------------------------------------------------------------

#-----------------------------------------------------------------------
# First clean things up.  This is not strictly necessary, but
# it's convenient in many cases.
/texpire

#-----------------------------------------------------------------------
# 1.  Hardcoded list.  Put the newsgroups list, one per line,
#     in the file "my.interesting.newsgroups"

groups=`cat my.interesting.newsgroups`

#-----------------------------------------------------------------------
# 2.  Newsrc.  Put the path to your own newsrc file below.
#     *** comment this out if you use method 1 ***

groups=`grep : /home/markh/.newsrc|sed s/:.*//`

#-----------------------------------------------------------------------
# 3.  Command line.  If a list of newsgroups is given on the
#     command line, just fetch those newsgroups.

if test $# -ne 0; then
    groups=$*
    echo fetching only groups: $groups
fi

#-----------------------------------------------------------------------
# Now that we have the newsgroup list, zap entries in the
# interesting.groups directory, repopulate the directory,
# and fetch news as usual.

rm -f /var/spool/news/interesting.groups/*
for i in $groups;do
    touch /var/spool/news/interesting.groups/$i
done
/fetchnews -vvv

-------------- cut here ------------------------------

---------------------------------------------------------------------
Mark Harrison                       "Open the floppy disk door, Hal."
AsiaInfo Computer Networks          http://usai.asiainfo.com:8080/
Beijing, China / Santa Clara, CA    markh@xxxxxxxxxxxxxxxxx


-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list