If nn does not do this natively (and I wouldn't really blame it for
not doing this, after all, nn is meant for *reading* news), is there a
way to select a group of articles matching certain headers and
download the appropriate parts in such form that they can be processed
by an external program? Does anyone have any experience with this?
- Aaron
--
Aaron Hsu <sp...@sacrificumdeo.net>
nn can handle uuencoded articles, and that's about it. (There
are some cases of uuencoding that it misbehaves on.)
The best way I've found to handle yEncs is to save each article
into a separate file using "*" in the save filename (like "q*"),
then use a separate program (like "ydecode -k q*") to decode the
pieces.
There are some problems:
1. The ydecode program that was written by Don Moore
<bb...@bboy.net> seems to think that all article files are in
"wire format" and need unescaping of dots at the beginning of
the lines. nn already does the unescaping--what newsreader
doesn't?--so I've had to patch ydecode.c to make it work (see
below). (There is a yydecode program out there, but I had
similar problems with it.)
2. ydecode does not handle extra copies of the same parts
well. So don't do that. Sometimes this is hard to avoid,
particularly when the poster is using a "stuttering" posting
program.
3. Sometimes there is corruption from missing parts or
whatever. If the file was posted with par2 files, what I do
is to use ydecode -k to decode all of the files, good or bad,
rename all the *.bad-* files to their proper names, and use
the par2 program to attempt to recover the data. Occasionally
this even works!
I'm not an expert on this process, because I do it very
infrequently, so it could be that there is a much better way to
make it work.
I have never attempted downloading a MIME-encoded multipart
binary that turned out to be worth even half the trouble.
--- work/yencode-0.46/src/ydecode.c.orig Fri Mar 15 23:29:14 2002
+++ work/yencode-0.46/src/ydecode.c Sun Sep 28 09:47:03 2003
@@ -461,9 +461,9 @@
else if (*b == '\t')
Verbose("%s:%lu:%d: %s", y->input_filename, lineno + y->line_offset, linect+1,
_("line begins with an unescaped TAB"));
- else if (*b == '.' && *(b+1) != '.')
+/* else if (*b == '.' && *(b+1) != '.')
Verbose("%s:%lu:%d: %s", y->input_filename, lineno + y->line_offset, linect+1,
- _("line begins with an unescaped single dot"));
+ _("line begins with an unescaped single dot")); jpc */
}
if (*(b+1) == '\r' || *(b+1) == '\n')
{
@@ -478,8 +478,8 @@
/* If this is the beginning of a line, and it's a plain dot, and the next character is also a dot,
move one character forward. */
- if (linect == 0 && *b == '.' && *(b+1) == '.')
- b++;
+/* if (linect == 0 && *b == '.' && *(b+1) == '.')
+ b++; jpc */
/* For all relevant characters, set char_escaped if it was escaped (for strict checking line length) */
if (*b != '\n' && *b != '\r')
--
J. Porter Clark <j...@suespammers.org>