[ANN] DejaGrabber 0.1 -- search Dejanews with Python

Neel Krishnaswami neelk at brick.cswv.com
Tue Jun 29 05:09:10 CEST 1999


In article <al89094u0e3.fsf at myntti.helsinki.fi>,
Markus Stenberg  <mstenber at cc.Helsinki.FI> wrote:
>duncan at rcp.co.uk (Duncan Booth) writes:
>> Nice bit of work. Two comments though:
>> Why does get_messages(4) return 5 messages? The doc string implies it 
>> should return only as many as its argument.
>
>It's neat, admittedly (I thought of writing one myself the other day, and
>then found that one ;->). The first time I need to do some serious Deja
>action, I'll be using it :>.
>
>There's some oops in slicing's internal logic at get_messages; following
>patch fixed behavior (for me, anyhow). 

[Code snipped]

Thanks -- I've applied the change and put the new version up. 

>> It would be useful if a test example was included in a "if 
>> __name__=='__main__'" block at the end of the file. At the very least the 
>> example you give above, but perhaps more usefully a full command line 
>> driven grabber.

This is a good idea, but I'm not sure what the right interface would
look like. I suspect that producing a command-line interface useful 
enough to play well with other tools would be a bigger job than the class
itself -- a decent UI must be flexible, and flexibility is always
trickier than it seems.

That said, I'm all for it, and will probably take a shot at it RSN. A
query can return multiple messages, and I think that we can want as
output either:

a) A list of headers,
b) A big file of headers+messages,
c) A lot of little files each with a message in it,
d) A single HTML file with a list of headers with links 
   to the message bodies (using HTML in-page links). 

Any I missed, or any of these fundamentally the wrong thing to do for
a reason I'm not seeing?


Neel




More information about the Python-list mailing list