🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
5 messages
5 total messages Started by Philippe Tue, 31 Jan 2006 14:49
Identify text messages and binaries
#73156
Author: Philippe
Date: Tue, 31 Jan 2006 14:49
21 lines
1778 bytes
Good afternoon,

I have read RFC 977, 1036 and 2980 in order to understand the NNTP 
protocol but i have a problem for identifying the kind of the message : 
for example, when i select a group like alt.binaries.yyyyy, the 
messages attached to this newsgroup can be text message or binaries. 
Unfortunately, the header "content-type" is not mandatory and it's 
difficult for me to understand how i can identify the message (text or 
binary) ?

Is there a way to perform this operation (Xover only returns the fields 
described in overview.fmt) ? For example, get the n first bytes of the 
body in order to analyze it ? Do you know where i can find 
documentations ?

Thank you,

Regards,

Philippe.
Re: Identify text messages and binaries
#73159
Author: Bert Hyman
Date: Tue, 31 Jan 2006 23:50
28 lines
2302 bytes
In news:43df7917$0$21284$8fcfb975@news.wanadoo.fr Philippe wrote:

> Is there a way to perform this operation (Xover only returns the
> fields described in overview.fmt) ? For example, get the n first bytes
> of the body in order to analyze it ? Do you know where i can find 
> documentations ?

Since nobody has responded, I'll throw in what little I know about this.

Yes, you'll have to read the text of the message and try to figure out
what it is. This is how the CleanFeed filter detects binaries for
filtering them out of non-binary newsgroups. 

The two formats I know of are UUENCODE, which doesn't appear to be used
much any more, and YENCODE, which is the new "standard". 

Both have more or less recognizable lead in character strings which many
newsreaders (like Xnews, which I'm using now) can recognize and
automatically decode. You might post your question in
news.software.readers where you might find somebody who actually knows
how to do this. 

If you look at the text of any file(s) in any of the binary newsgroups,
you can see what they look like; you'll most likely only find YENCODEed
files these days, but you never know. 

-- 
Bert Hyman	St. Paul, MN	bert@iphouse.com
Re: Identify text messages and binaries
#73170
Author: skimpy
Date: Wed, 01 Feb 2006 08:27
1 lines
884 bytes
isbinary
Re: Identify text messages and binaries
#73169
Author: DanS
Date: Sat, 04 Feb 2006 15:43
51 lines
3259 bytes
Philippe wrote in news:43df7917$0$21284$8fcfb975@news.wanadoo.fr:

> Good afternoon,
> 
> I have read RFC 977, 1036 and 2980 in order to understand the NNTP 
> protocol but i have a problem for identifying the kind of the message : 
> for example, when i select a group like alt.binaries.yyyyy, the 
> messages attached to this newsgroup can be text message or binaries. 
> Unfortunately, the header "content-type" is not mandatory and it's 
> difficult for me to understand how i can identify the message (text or 
> binary) ?
> 
> Is there a way to perform this operation (Xover only returns the fields 
> described in overview.fmt) ? For example, get the n first bytes of the 
> body in order to analyze it ? Do you know where i can find 
> documentations ?
> 
> Thank you,
> 
> Regards,
> 
> Philippe.
> 

If an X-header is not present, there is really no way to tell other than 
by parsing the subject line.

The question I have, is how do you get the first X amount of bytes of the 
body? The server's I've dealt with don't accept further commands until 
sending the body to you is done, as in there's no effective way of 
cancelling it other than disconnecting, which is a bad thing.

This was/is an on-going issue with the ever-increasing binary feed, from 
way back as Usenet was never intended to send binary data, it is all text 
based.

For multipart binaries, TYPICALLY, the subject line will end with (1/20), 
(2/20),(3/20), etc, indicating each part for the attached file. Some 
posting programs allow you to change this though, so that is not 100% 
true all of the time. Throw in typos and other small deviation's from the 
norm, and you've got quite a bit to handle.

I spent 2 solid months of work, 2 - 3 hours a day, on this part of my 
binary d/l'r which was subsequently cancelled after the release of 
NewsLeecher. I was writing a (better) clone of ZeoNews.

Regards,

DanS

Re: Identify text messages and binaries
#73171
Author: Jeffrey M. Vinocur
Date: Sat, 04 Feb 2006 17:33
17 lines
1623 bytes
In article <Xns97606D3AEE0B6idispcom@216.196.97.142>,
DanS  <t.h.i.s.n.t.h.a.t@a.d.e.l.p.h.i.a..n.e.t> wrote:
>
>The question I have, is how do you get the first X amount of bytes of the 
>body? The server's I've dealt with don't accept further commands until 
>sending the body to you is done, as in there's no effective way of 
>cancelling it other than disconnecting, which is a bad thing.

Yup, there's no way to do this.

At least for now...it would be pretty reasonable to write an
extension to supply this feature, though.


-- 
Jeffrey M. Vinocur
jeff@litech.org
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