On Wed, 8 Aug 2007 17:01:32 -0400, Charles Lasitter wrote:
> On Wed, 8 Aug 2007 13:59:40 -0400, Oliver Cromm wrote:
>
>> I didn't express myself clearly? I don't see the bribe going up.
>
> Ah, I misunderstood. OK.
>
> Your choice, $35 to you directly or as a contribution to
> Doctors Without Borders/Médecins Sans Frontières(MSF)
> in your honor.
It was basically a joke ... I felt no closure because in my first answer
I didn't do anything about the word "bribe". But if you are willing ...
I wouldn't take any money for a quick hack as the one I published in the
German group before, but it may be an incentive to do it the right way,
within my emerging framework of Ruby mail/news processing:
class Dialog_dat
[...]
def to_mbox(FLAGS)
mbout = ( , FLAGS)
do |msg|
(msg)
end
end
end
end
Well, here's a quick hack that worked for my SeaMonkey AFAICS in a few
tests. Tell me if it does the job for you. There are differences between
what various applications expect and accept as "mbox".
-------------- schnipp ---------------
#!/usr/bin/env ruby
#
# Author: Oliver Cromm, 2007
# creates a mbx file from each msg*.dat in Dialog's data direectory
# Usage: place into data dir and run - that's it!
# Backup your files first, no guarantees.
FROMLINE = "From abc@ Mon Jan 01 00:00:00 1970\r\n"
EMPTYLINE = "\r\n"
Dir['msg*.dat'].each do |inp|
fname = (inp)+".mbx"
out = (fname, "wb")
firstline = true
FROMLINE
(inp).each do |line|
!
!(/^..../,'') if firstline
firstline = false
if !(/^\x7f/,'')
EMPTYLINE
FROMLINE
end
!(/^From /, ">From ")
line, "\r\n"
end
EMPTYLINE
end
-------------- schnapp ---------------
--
Oliver C.