🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #68764

Re: Python nntplib and xml

#68764
From: iMeowbot
Date: Tue, 23 Mar 2004 06:00
24 lines
2166 bytes
In article <c3n3dn$65i$1@usenet01.srv.cis.pitt.edu>,
 "Michael A. Smith" <ntesla5@hotmail.com> wrote:

> I'm looking for an nntp-to-xml parser/converter, preferably written 
> *portably* in Python. If I don't recieve any (good) responses, I'll 
> probably write it myself, but if you happen to have already written one, 
> or even begun one, and you feel like being magnanimous, send me a note 
> and I'll be happy to give you credit.
> 
> I'm also interested if you've written just a DTD for nntp-xml, or 
> anything else you think might apply.
> 
> PS - There's no money involved for either of us. This is for a 
> low-budget research project.

You might want to start with this article.
http://www.informit.com/articles/article.asp?p=32074&seqNum=1

The stuff about reading a mailbox won't apply, but getting an rfc822 
object from nntplib is just a matter of stuffing the lines returned by 
article() into a cStringIO object, and using that to create an 
rfc822.Message instance.  The ProcessMessage() function in the sample 
should work as-is though.
Technical Details
Message-ID: <iMeowbot-FC1CA0.01003923032004@news.supernews.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!sn-xit-02!sn-xit-01!sn-post-01!supernews.com!news.supernews.com!iMeowbot
References: <c3n3dn$65i$1@usenet01.srv.cis.pitt.edu>

Show Full Headers
Complete Article Headers
Message-ID: <iMeowbot-FC1CA0.01003923032004@news.supernews.com>
Subject: Re: Python nntplib and xml
Date: Tue, 23 Mar 2004 01:00:39 -0500
From: iMeowbot@mac.com
References: <c3n3dn$65i$1@usenet01.srv.cis.pitt.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!sn-xit-02!sn-xit-01!sn-post-01!supernews.com!news.supernews.com!iMeowbot
Newsgroups: news.software.nntp
Organization: uJane
Mail-Copies-To: nobody
User-Agent: MT-NewsWatcher/3.3b1 (PPC Mac OS X)
X-Meow: Wouf
X-No-Repost: yes
Injector-Info: http://www.halfbakery.com/idea/Tarantula_20injector
X-Face: GoP_M4IkjWG/y%ym?jo5gyL.y/nBJmU+$gW+nH>P1jU\r6ZePn|suM%F2'kMu
  *hx4-uRHbyV'nd1sm'W+U/N@bvLY%O+kw6u%R9[vee-p.xk}X*8C{E-Dx$|<)_WSTBHl
  }w8$pvbD=<)p|i*imBJ*.eEYlX[]_+YN
X-Complaints-To: abuse@supernews.com
Lines: 23