🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
3 messages
3 total messages Started by Bill Petro Tue, 26 Jun 1990 05:20
YARNFR
#640
Author: Bill Petro
Date: Tue, 26 Jun 1990 05:20
60 lines
2752 bytes
Yet Another Rampant Nn Feature Request


There is something that would make life easy for news junkies who must
be away from nn for a few days or weeks (like vacation) but don't want
to miss those things that their local site might expire.

How about an "nn batch mode"?  If it already exists, please direct me to
the man page location.  But what I'm looking for is a way to get cron to
call nn every day, or every couple of days, and auto-save those messages
that my auto-select would mark, and save them to a file.

Example 1:
	nn -b rec.arts.startrek +STARTREK

	Start nn in batch (-b) and search the newsgroup
	rec.arts.startrek and save the auto-select messages 
	into the folder STARTREK, and then junk those selected.  
	Retain those unselected.

Example 2:
	nn -b BatchInstructionFile


	Start nn in batch (-b) and search all newsgroups mentioned 
	in the file BatchInstructionFile and save the auto-select messages
	into the corresponding folders named in BatchInstructionFile, 
	and then junk those selected.  Retain those unselected.

	The file BatchInstructionFile would look like this:

	rec.arts.startrek +STARTREK
	news.software.nn +NN
	comp.mail.mush +MUSH
	comp.sys.sun +SUN

	etc...

Note, these folders might be different than the default folders set in
the nn .init file.

It would allow me to sleep easily while I travel, knowing that a
semi-intelligent cron agent were collecting my news for me :-)




While were talking about YARNFR, here is something else I've wanted for
a long time.  I have all my custom nn macro's bound to almost every key
and control key on my keyboard.  Other than using the function and right
and left keys (which I don't have when I log in from home on my
Macintosh) how about another prefix?  I have tried meta and escape, but
to no avail.  Could some other key be used as a prefix to extend the
number of things that could be bound to keys?  Other programs, like vi
and mush, will allow the @ key to act as a prefix.


--
     Bill Petro  {decwrl,hplabs,ucbvax}!sun!Eng!rock
"UNIX for the sake of the kingdom of heaven"  Matthew 19:12
Re: YARNFR
#642
Author: Dean Brooks
Date: Tue, 26 Jun 1990 14:07
23 lines
1608 bytes
rock@warp.Eng.Sun.COM (Bill Petro) writes:

>Yet Another Rampant Nn Feature Request

>How about an "nn batch mode"?  If it already exists, please direct me to
>the man page location.  But what I'm looking for is a way to get cron to
>call nn every day, or every couple of days, and auto-save those messages
>that my auto-select would mark, and save them to a file.

YES!!  This could perhaps be the most useful feature of NN if implemented
correctly.  Like many people, I am unable to read news on a daily basis and
our expire times are very frequent.  Because of this, I have a very long
auto-select list (to the point where I can almost just 'X' through every
group and catch only the selected articles).

If NN could automatically save those articles via the command line, it would
completely alleviate my problem.  Anybody else interested in this?

--
dean@coplex.UUCP   Dean A. Brooks
                   Copper Electronics, Inc.
                   Louisville, Ky
UUCP: !uunet!coplex!dean
Re: YARNFR -- how to run nn in batch mode (almost)
#657
Author: Kim F. Storm
Date: Fri, 29 Jun 1990 23:27
97 lines
3395 bytes
rock@warp.Eng.Sun.COM (Bill Petro) writes:

>How about an "nn batch mode"?  If it already exists, please direct me to
>the man page location.  But what I'm looking for is a way to get cron to
>call nn every day, or every couple of days, and auto-save those messages
>that my auto-select would mark, and save them to a file.

>Example 2:
>	nn -b BatchInstructionFile

You can *almost* do that with 6.4.6 if you simply use a different init
file, e.g. ~/.nn/batch, which you would invoke as

	nn -Ibatch

The tricky part is to make sure input is a tty and TERM is set!
I'm not sure how you can do that from cron.


The contents of 'batch' would be something like:

# --------- INIT FILE FOR BATCH MODE -----------

# include your normal .newsrc maintenance variables here
set keep-unsubscribed
set new-group-action 3

# no need to print large menus
set window 20

# don't ask for save file name or confirmation
set quick-save
unset confirm-create
unset confirm-append

# keep things in arrival order
set sort-mode 0

# save selected articles and continue to next group
on entry
	save-full '+'
	next-group
end

sequence 

	rec.arts.startrek +STARTREK
	news.software.nn +NN
	comp.mail.mush +MUSH
	comp.sys.sun +SUN
	etc...
# include this if you only want to save articles in the listed groups
!!

#---------------- END OF BATCH FILE ----------

The problem is that 6.4.6 will quickly complain about a MACRO STACK overflow
because the effect of the "next-group" command is to invoke the entry macro
of the next group before the current macro has completed.

The following patch (which will be included in patch 7) will fix that:

----- patch follows -----

*** LAST/macro.c	Mon Jun 25 15:46:43 1990
--- macro.c	Fri Jun 29 23:46:47 1990
***************
*** 453,458 ****
--- 453,460 ----
  
      if (m_level == 0)
  	no_advance = 0;
+     else if (m == NULL)
+ 	m_level--;
      else {
  	if (m_level > MSTACK) {
  	    msg("Macro stack overflow");

------ end of patch ------

I will think about adding a -b option to nn to disable the output, or
at least remove the requirement that the input is a tty - maybe in
patch #7 as well.


>Could some other key be used as a prefix to extend the
>number of things that could be bound to keys?  Other programs, like vi
>and mush, will allow the @ key to act as a prefix.

This is one of the things I have planned for release 7.  However,
it will be relatively trivial to do, so maybe you will not have
to wait that long....  Anyway, with patch #6, keymaps have an additional
96 entries if you run in 8 bit mode (set data-bits 8).

-- 
Kim F. Storm  <storm@texas.dk>		No news is good news,
Texas Instruments A/S, Denmark		  but nn is better!
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