Article View: news.software.readers
Article #76792Re: Muliti-Part Posts
From: Murray Peterson
Date: Tue, 17 Apr 2001 16:10
Date: Tue, 17 Apr 2001 16:10
83 lines
5033 bytes
5033 bytes
"Jack" <jkt@home.net> wrote in
<cdlndtgon044rr98it2fimcg1vspk6kj9e@4ax.com>:
>I want my program to automatically combine attachments (like Agent)
>instead of cluttering the screen with parts. Here is an example from one
>of the binaries newsgroup:
>
>Repost: LK Cisco CCNA 2 - Cd 1 of 5 - see (0/1) for posting nfo -
>[09/28] - LKCCNA2-cd1.r07 (08/45)
>
>Apparently the guy is trying to send a file, LKCCNA2-cd1.r07 in 45
>parts. By looking at the subject, how would your program decide if this
>is multi-part post (45 parts in this case)? There are lots of stuff
>there -- like [09/28], which probably indicates that the cd has 28
>rars. The program has to be real clever to not get confused due to
>(0/1), [09/28] and (08/45) all of which appear in the subject.
You are agonizing over this problem way too much. There are posts that are
so badly malformed that you will *never* be able to determine if they are
multi-part, and if so, match them up correctly. Do like most newsreaders
do -- go with a solution that works 99% of the time, and allow for the user
to edit, arrange, and override the settings to handle that last 1%. As a
general case, always look for the last xx/yy in the subject line, and
ignore all others.
>You said I should look at other posts from the author when making a
>decision if the post is mult-part, but if the guy gets disconnected
>after sending 10 parts and resends rest of the parts using different
>name or email, wouldn't relying on author in that case be a problem?
You are worrying about the exceptional case again.
>Another problem, what if rest of 44 parts are missing and I have only
>the above part? Nothing would be there to compare with. The program must
>make a decision whether the post is ordinary post with text or uuencoded
>post that is missing parts (i.e., to prevent the user from wasting time
>by downloading it).
I would consider a newsreader that "prevented" me from downloading what I
want as a poor tool. That's why almost all newsreaders will mark such a
post as a portion of an incomplete binary and leave it at that.
>[snip]
>The only difference is "Re:". The program has to be clever to figure out
>that this reply contains text and is not multi-part post which is
>missing parts. (i.e. it shouldn't prevent the user from downloading it).
It's not really a problem. The subject changed (it has an extra 3
characters in it), so don't consider it part of the same multi-part binary.
> Another problem, what if the reply does indeed is uuencoded, posted as
>a fill to the series? The program must figure that out!
It can't, so why worry about it? In fact, the only way to figure out if a
post contains uuencoded stuff is to download it and take a look at the
body.
>I think it is probably impossible to be 100% certain. But I want to
>know how other newsreaders handle these problems. I can do what others
>do (that would be easy). Can anyone explain in little detail how his
>program handles the above cases?
It is impossible to be 100% correct, since the only knowledge you have
about a post is from its headers. It's a guarantee that whatever program
algorithm you use, it is going to make mistakes, since subject lines don't
always tell the "truth", but they are the only information you have.
That's why a good newsreader has facilities for allowing the user to edit
subject lines, place them in a group, and tell the reader to download them
as a multi-part.
If you grok Perl, and you want an example of multi-part collation, feel
free to look at my binary newsreader (it's on my homepage). Look for the
code that starts with:
# Check for multi-part pictures
($subj,$part,$allparts) = $subject =~ /^(.*)(\d+)\/(\d+).*$/ ;
In fact, this regexp probably tells you almost everything you need to know.
--
Murray Peterson
Email: murray_peterson@home.com (remove underscore)
URL: http://www.members.home.net/murraypeterson
Technical Details
Message-ID:
<Xns9086679AB8848farkle@24.64.2.57>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!hammer.uoregon.edu!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.ab.home.com.POSTED!not-for-mailReferences:
<ilrmdtkh8cmm2jpd1o6abgpvh29gq30vra@4ax.com> <20010416193817.627$0L@newsreader.com> <cdlndtgon044rr98it2fimcg1vspk6kj9e@4ax.com>Show Full Headers
Complete Article Headers
Message-ID: <Xns9086679AB8848farkle@24.64.2.57> Subject: Re: Muliti-Part Posts Date: Tue, 17 Apr 2001 16:10:55 GMT From: mwp@home.com.invalid (Murray Peterson) References: <ilrmdtkh8cmm2jpd1o6abgpvh29gq30vra@4ax.com> <20010416193817.627$0L@newsreader.com> <cdlndtgon044rr98it2fimcg1vspk6kj9e@4ax.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!hammer.uoregon.edu!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.ab.home.com.POSTED!not-for-mail Newsgroups: news.software.readers Organization: None User-Agent: Xnews/er Lines: 82 NNTP-Posting-Host: 24.64.55.170 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.ab.home.com 987523855 24.64.55.170 (Tue, 17 Apr 2001 09:10:55 PDT) NNTP-Posting-Date: Tue, 17 Apr 2001 09:10:55 PDT