using Okami/NEWSwatch for selective article downloads
This is only one way of doing the job: the Okami utilities are very flexible and have lots of possibilities!
NB I make no guarantees, use this method at your own risk and all that stuff! YOU HAVE BEEN WARNED!
That said, while I'm not currently doing selective downloads for any group, this method seemed to work OK for the brief period I used it.
The NEWSwatch documentation is very clear about using the program for downloading article headers for selection and where it looks for a GET file and its format (it mirrors NOS for use with Okami, so you could use this method with NOS too I suppose - NB I haven't tried it!), so I'll refer you to those docs and assume you have that sussed. The rest of this description concerns the Okami bit.
This approach uses flags, rather than saving headers to a file and processing them (which is what MAKE_GET does very usably in conjunction with the NOS programs or Oasis 1). This is largely because Ofind can write a list of message IDs directly without using MAKE_GET.
Assuming you have downloaded headers successfully:
- You mark each message you want to retrieve with a chosen combination of flags and use that combination to select the messages with Ofind. In my case I chose killed and protected, for reasons which will become apparent. If you were feeling adventurous you could set up a keyboard shortcut to set this combination of flags in KEYMAP.INF. Using the combination of flags differentiates messages for retrieval from those which you are simply marking for deletion using the killed flag on its own and prevents accidental erasure as the protected flag takes precedence.
- You then run Ofind with parameters to select all articles within the group with those flags set and extract the message IDs to the GET file.
- You then run Ofind again (with different parameters) to remove the protected flags from those messages, making them vulnerable to deletion.
- You run Oexpire with parameters to delete those messages in the group that have the killed flag set. This gets rid of the headers for messages which you are gong to retrieve while leaving other headers alone in case you decide later that you want to retrieve those messages.
The following batch file (I called it GET.BAT in a fit of originality
*grin*) is for MCMD (the MagiC shell) and does steps 2-4. You'll have to edit
the path for the location of the get file and also the initial changing to
the directory where the Okami programs are located. BTW if anyone knows of a
neater way to get MCMD to switch to a directory on another drive I'd love to
know. The obvious cd e:\o doesn't seem to work and when you
switch drives it doesn't always land in the root directory (hence the
preliminary switch to the root of the new drive).
If you don't specify a group name this will work on all groups including mail - best to specify I think! You can name more than one group separating the names with | I think - look in ofind.man and the section in the HYP on regexs (which is a little impenetrable - I don't fully understand it anyway!) for full details.
#GET.BAT for extracting selected message IDs #for downloading of full articles. echo "GET file create" #Change directory to where the Okami programs are located e: cd \ cd o\ #Run Ofind to extract message IDs to GET file. #Using -a rather than -o allows you to do this #more than once before downloading as it appends #to an existing file rather than recreating it. #NEWSwatch will delete the get file once it's #retrieved the articles. echo "Extracting message IDs" ofind -a i:\oasis\spool\news\get --flgs kp --Mid group.name #Run Ofind to clear protected flags from those #messages with both killed and protected set. #Should leave alone messages protected but not killed. echo "Clearing protected flags" ofind -a i:\oasis\spool\news\get --flgs kp --Cflg p group.name #Run Oexpire to delete all messages in group #with killed flag set. echo "Deleting headers and killed messages" oexpire -k group.name exit