🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
34 messages
34 total messages Started by Oliver Cromm Sat, 07 Jun 2008 05:56
[dialog] Exporting from Sent folder
#221832
Author: Oliver Cromm
Date: Sat, 07 Jun 2008 05:56
35 lines
2473 bytes
Hi Dialog users,

As this is asked for again and again, I have written a script for the
purpose. No, not a Dialog script, a script, or program, in Ruby.

It's  beta stage, but I believe it will work perfectly for some and
pretty well for most users. If you have lots of binaries in your
database, though, it will likely go haywire. I am thankful for everyone
who tries it and complains (or applauds!).

Messages from "Sent" can be extracted as separate files (*.msg, default)
or as mbox (*.mbx):
  
  ruby extr_sent.rb
  ruby extr_sent.rb -m

The mbox format is useful to reimport the articles into Dialog in a
folder of one's choice; whether it is compatible with other applications
I haven't tested.

There is also a -r (raw) switch with is mostly for debugging.

Find it at:

<gopher://vector.crommatograph.info/1/scripts/dialog>

or if that doesn't work for you (you should really install better
software, but meanwhile):

<http://vector.crommatograph.info:70/scripts/dialog>

Both extr_sent.rb and msgfile.rb are needed.

-- 
Oliver C.
Re: [dialog] Exporting from Sent folder
#221835
Author: Ron Ford
Date: Sat, 07 Jun 2008 07:56
44 lines
2466 bytes
On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm wrote:

> Hi Dialog users,
> 
> As this is asked for again and again, I have written a script for the
> purpose. No, not a Dialog script, a script, or program, in Ruby.

Nice.  If it works let's not look back.

> 
> It's  beta stage, but I believe it will work perfectly for some and
> pretty well for most users. If you have lots of binaries in your
> database, though, it will likely go haywire. I am thankful for everyone
> who tries it and complains (or applauds!).
> 
> Messages from "Sent" can be extracted as separate files (*.msg, default)
> or as mbox (*.mbx):
>   
>   ruby extr_sent.rb
>   ruby extr_sent.rb -m
> 
> The mbox format is useful to reimport the articles into Dialog in a
> folder of one's choice; whether it is compatible with other applications
> I haven't tested.
> 
> There is also a -r (raw) switch with is mostly for debugging.
> 
> Find it at:
> 
> <gopher://vector.crommatograph.info/1/scripts/dialog>
> 
> or if that doesn't work for you (you should really install better
> software, but meanwhile):
> 
> <http://vector.crommatograph.info:70/scripts/dialog>
> 
> Both extr_sent.rb and msgfile.rb are needed.

These links won't fire up for me.  Opera is able to fire up any other link
I feed it.  Post the script here; it can't be long.
-- 
I believe that all government is evil, and that trying to improve it is
largely a waste of time.
H. L. Mencken
Re: [dialog] Exporting from Sent folder
#221839
Author: Bernd Rose
Date: Sat, 07 Jun 2008 10:12
24 lines
2218 bytes
On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm wrote:

> Messages from "Sent" can be extracted as separate files (*.msg, default)
> or as mbox (*.mbx):
>   
>   ruby extr_sent.rb
>   ruby extr_sent.rb -m

Hm. You may consider extracting the messages based on a msg2.drt 
lookup. (Group 2 is the Sent folder on all Dialog installations.)

Ignore the first 4 Bytes of the file. Afterwards you see records of
15 Bytes each. The first 4 are record numbers. You can use these to
look up additional information from the 2.idx file, like deletion
status. But to keep things simple, you can easily ignore them and 
tell people to run a Compact database before extracting the messages.

The next two bytes are the number of the msg*.dat which contains the
message referenced by the current record. The following 4 bytes are
the starting byte position of the message (inside the msg*.dat 
referenced above). And the next 4 bytes contain the number of bytes 
of the message.

Bernd
Re: [dialog] Exporting from Sent folder
#221849
Author: Oliver Cromm
Date: Sat, 07 Jun 2008 17:53
22 lines
2162 bytes
* Ron Ford wrote:

>> <gopher://vector.crommatograph.info/1/scripts/dialog>
>> 
>> or if that doesn't work for you (you should really install better
>> software, but meanwhile):
>> 
>> <http://vector.crommatograph.info:70/scripts/dialog>
>> 
>> Both extr_sent.rb and msgfile.rb are needed.
> 
> These links won't fire up for me.  Opera is able to fire up any other link
> I feed it.  Post the script here; it can't be long.

Opera doesn't support gopher by itself, but that's what the http one is
for. Does it work for anybody?

The reason I don't want to post it here is to avoid having old versions
float around forever. 

-- 
Oliver C.
Re: [dialog] Exporting from Sent folder
#221848
Author: Oliver Cromm
Date: Sat, 07 Jun 2008 17:56
24 lines
2255 bytes
* Bernd Rose wrote:

> On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm wrote:
> 
>> Messages from "Sent" can be extracted as separate files (*.msg, default)
>> or as mbox (*.mbx):
>>   
>>   ruby extr_sent.rb
>>   ruby extr_sent.rb -m
> 
> Hm. You may consider extracting the messages based on a msg2.drt 
> lookup. (Group 2 is the Sent folder on all Dialog installations.)
> 
> Ignore the first 4 Bytes of the file. Afterwards you see records of
> 15 Bytes each. The first 4 are record numbers. [...]

Wow, how do you know this things? And if you know them, why don't *you*
post an extraction script?

Anyway, your description of the drt file seems to fit more or less, but
I'll ask you about some details.

-- 
Oliver C.
Re: [dialog] Exporting from Sent folder
#221850
Author: Rom
Date: Sat, 07 Jun 2008 18:38
20 lines
1689 bytes
On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm wrote:

> Messages from "Sent" can be extracted as separate files (*.msg, default)
> or as mbox (*.mbx):
>   
>   ruby extr_sent.rb
>   ruby extr_sent.rb -m

I extracted to an mbox file and imported into a folder in Dialog.

The last letter of my sig "m" was not present in sent.mbx, therefore
missing from all sigs in messages when imported.

There were a few messages at the very beginning of sent.mbx that were
not my sent messages. Otherwise importing was no better or worse than
previous large import jobs, with a few messages 'split', which can be
fixed in a text editor before importing.

-- 
Rom
Re: [dialog] Exporting from Sent folder
#221853
Author: Mike Yetto
Date: Sat, 07 Jun 2008 18:51
30 lines
2669 bytes
Bada bing Oliver Cromm <lispamateur@yahoo.de> bada bang:
> * Ron Ford wrote:
>
>>> <gopher://vector.crommatograph.info/1/scripts/dialog>
>>> 
>>> or if that doesn't work for you (you should really install better
>>> software, but meanwhile):
>>> 
>>> <http://vector.crommatograph.info:70/scripts/dialog>
>>> 
>>> Both extr_sent.rb and msgfile.rb are needed.
>> 
>> These links won't fire up for me.  Opera is able to fire up any other link
>> I feed it.  Post the script here; it can't be long.
>
> Opera doesn't support gopher by itself, but that's what the http one is
> for. Does it work for anybody?
>

The gopher space link worked with Firefox V3 running on Kubuntu
when called from slrn.  That was a pleasant surprise.

> The reason I don't want to post it here is to avoid having old versions
> float around forever. 
>

Mike "now let's try Veronica" Yetto
-- 
Pluralitas non est ponenda sine necessitas.
 - William of Ockham
Re: [dialog] Exporting from Sent folder
#221854
Author: Whiskers
Date: Sat, 07 Jun 2008 19:14
51 lines
2913 bytes
On 2008-06-07, Oliver Cromm <lispamateur@yahoo.de> wrote:
> * Ron Ford wrote:
>
>>> <gopher://vector.crommatograph.info/1/scripts/dialog>
>>> 
>>> or if that doesn't work for you (you should really install better
>>> software, but meanwhile):
>>> 
>>> <http://vector.crommatograph.info:70/scripts/dialog>
>>> 
>>> Both extr_sent.rb and msgfile.rb are needed.
>> 
>> These links won't fire up for me.  Opera is able to fire up any other link
>> I feed it.  Post the script here; it can't be long.
>
> Opera doesn't support gopher by itself, 

I use Lynx as a 'helper' for Opera to get to gopher URLs - or Lynx or
Gopher, as stand-alone clients.

> but that's what the http one is
> for. Does it work for anybody?

Using Opera on Linux here:

    <http://vector.crommatograph.info:70/scripts/dialog>

    Error!
    Access to this port is disabled for security reasons

But using the Floodgap web proxy 
<http://gopher.floodgap.com/gopher/gw.lite?gopher://vector.crommatograph.info:70/1/scripts/dialog>
should work - or go to <http://gopher.floodgap.com/gopher/gw.lite> and 
navigate through 

    - All the gopher servers (that we know of) 
      - Top-Level .com, .net, .info 
        - vector.crommatograph.info:70 (16 selectors) 
          - scripts 
            - dialog


> The reason I don't want to post it here is to avoid having old versions
> float around forever. 

Tricky, that.

-- 
-- ^^^^^^^^^^
--  Whiskers 
-- ~~~~~~~~~~
Re: [dialog] Exporting from Sent folder
#221855
Author: Bernd Rose
Date: Sat, 07 Jun 2008 19:21
35 lines
2778 bytes
On Sat, 7 Jun 2008 13:56:20 -0400, Oliver Cromm wrote:

>> Hm. You may consider extracting the messages based on a msg2.drt 
>> lookup. 
[...] 
> Wow, how do you know this things? 

After Marcus ceased updating of Dialog, I checked, whether I could 
get my data extracted/converted if need ever occurred. It took about 
a cold and misty weekend. Since that time I have a fairly complete 
reference of the file formats.

I post some information on specific topics, but won't post the whole
reference file. That's a question of Marcus' copyright, IMHO. Since 
most of the 40tude Dialog "database" is unencrypted (passwords are
the exception), everybody can get the information needed by looking,
what changes to the files occur after specific actions, quite easily.
;-)

> And if you know them, why don't *you* post an extraction script?

Because I dread what extensions people would like to see to the
script after its publication.  ;-)

> Anyway, your description of the drt file seems to fit more or less, but
> I'll ask you about some details.

Like, where to look for a list of subscribed groups and their numbers?
You need to link groups_sub.idx, groups.idg and groups.stg. Maybe it is 
easier to just create a loop on all msg*.drt files, if you want to export 
more than the Sent folder...  ;-)

Ah. Btw., your Gopher link works fine with K-Meleon.

Bernd
Re: [dialog] Exporting from Sent folder
#221857
Author: Steve Ackman
Date: Sat, 07 Jun 2008 19:38
15 lines
1886 bytes
In <mkk1wqeu1y03$.dlg@mid.crommatograph.info>, on Sat, 7 Jun 2008 
13:53:05 -0400, Oliver Cromm, lispamateur@yahoo.de wrote:
>
>>> <gopher://vector.crommatograph.info/1/scripts/dialog>
>>> 
>>> <http://vector.crommatograph.info:70/scripts/dialog>
>
> Opera doesn't support gopher by itself, but that's what the http one is
> for. Does it work for anybody?

  Both links work on Iceweasel (Firefox) 2.0.0.14 and
in lynx 2.8.6rel.5.

  The http://:70 link works in links 2.1pre36 but the 
gopher:// link doesn't.
Re: [dialog] Exporting from Sent folder
#221859
Author: Ron Ford
Date: Sat, 07 Jun 2008 22:43
28 lines
2037 bytes
On Sat, 7 Jun 2008 13:53:05 -0400, Oliver Cromm wrote:

> * Ron Ford wrote:
> 
>>> <gopher://vector.crommatograph.info/1/scripts/dialog>
>>> 
>>> or if that doesn't work for you (you should really install better
>>> software, but meanwhile):
>>> 
>>> <http://vector.crommatograph.info:70/scripts/dialog>
>>> 
>>> Both extr_sent.rb and msgfile.rb are needed.
>> 
>> These links won't fire up for me.  Opera is able to fire up any other link
>> I feed it.  Post the script here; it can't be long.
> 
> Opera doesn't support gopher by itself, but that's what the http one is
> for. Does it work for anybody?
> 
> The reason I don't want to post it here is to avoid having old versions
> float around forever.

I fired up IE and got it.  Out of curiosity, is there something I can tweak
in Opera to get the second link?
-- 
Women always excel men in that sort of wisdom which comes from experience.
To be a woman is in itself a terrible experience.
H. L. Mencken
Re: [dialog] Exporting from Sent folder
#221864
Author: Thierry B.
Date: Sun, 08 Jun 2008 06:09
12 lines
1646 bytes
--{ Mike Yetto a plopé ceci: }--

>
> Mike "now let's try Veronica" Yetto

   Good idea.

-- 
Lorsque j'essaie d'accéder à un de mes vieux disques dur IDE (après l'avoir
connecté), j'ai le message : "le processus ne peut accéder au fichier car ce
fichier est utilisé par un autre processus" C'est grave ?
                                            --{ le vieux est verrouillé }--
Re: [dialog] Exporting from Sent folder
#221885
Author: Ron Ford
Date: Mon, 09 Jun 2008 03:27
36 lines
2348 bytes
On Sat, 7 Jun 2008 13:56:20 -0400, Oliver Cromm wrote:

> * Bernd Rose wrote:
> 
>> On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm wrote:
>> 
>>> Messages from "Sent" can be extracted as separate files (*.msg, default)
>>> or as mbox (*.mbx):
>>>   
>>>   ruby extr_sent.rb
>>>   ruby extr_sent.rb -m
>> 
>> Hm. You may consider extracting the messages based on a msg2.drt 
>> lookup. (Group 2 is the Sent folder on all Dialog installations.)
>> 
>> Ignore the first 4 Bytes of the file. Afterwards you see records of
>> 15 Bytes each. The first 4 are record numbers. [...]
> 
> Wow, how do you know this things? And if you know them, why don't *you*
> post an extraction script?
> 
> Anyway, your description of the drt file seems to fit more or less, but
> I'll ask you about some details.

I ran the script but don't see any evidence of output or error.  There is
no new file in the directory in which the script ran.  I was expecting to
get an error due to the first of the require statements:
require 'iconv'
require 'msgfile'

Does the script need to be run in the data folder?
-- 
It is now quite lawful for a Catholic woman to avoid pregnancy by a resort
to mathematics, though she is still forbidden to resort to physics or
chemistry.
H. L. Mencken
Re: [dialog] Exporting from Sent folder
#221894
Author: Ron Ford
Date: Mon, 09 Jun 2008 06:46
25 lines
1926 bytes
On Sun, 8 Jun 2008 04:38:45 +1000, Rom wrote:

> On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm wrote:
> 
>> Messages from "Sent" can be extracted as separate files (*.msg, default)
>> or as mbox (*.mbx):
>>   
>>   ruby extr_sent.rb
>>   ruby extr_sent.rb -m
> 
> I extracted to an mbox file and imported into a folder in Dialog.
> 
> The last letter of my sig "m" was not present in sent.mbx, therefore
> missing from all sigs in messages when imported.
> 
> There were a few messages at the very beginning of sent.mbx that were
> not my sent messages. Otherwise importing was no better or worse than
> previous large import jobs, with a few messages 'split', which can be
> fixed in a text editor before importing.

I just ran it in the data folder and ended up with sent_00001.msg to
sent_00377.msg in my data folder.
-- 
We must be willing to pay a price for freedom.
H. L. Mencken
Re: [dialog] Exporting from Sent folder
#221909
Author: Oliver Cromm
Date: Mon, 09 Jun 2008 23:01
31 lines
2761 bytes
* Mike Yetto <myetto1@nycap.invalid> wrote:

> Bada bing Oliver Cromm <lispamateur@yahoo.de> bada bang:
>> * Ron Ford wrote:
>>
>>>> <gopher://vector.crommatograph.info/1/scripts/dialog>
>>>> 
>>>> or if that doesn't work for you (you should really install better
>>>> software, but meanwhile):
>>>> 
>>>> <http://vector.crommatograph.info:70/scripts/dialog>
>>>> 
>>>> Both extr_sent.rb and msgfile.rb are needed.
>>> 
>>> These links won't fire up for me.  Opera is able to fire up any other link
>>> I feed it.  Post the script here; it can't be long.
>>
>> Opera doesn't support gopher by itself, but that's what the http one is
>> for. Does it work for anybody?
> 
> The gopher space link worked with Firefox V3 running on Kubuntu
> when called from slrn.  That was a pleasant surprise.

On top of that, there will be a plugin to make the gopher experience
better than in basic FF 3. It's in late beta stage.

-- 
The nice thing about standards is that you have so many to choose
from; furthermore, if you do not like any of them, you can just
wait for next year's model.
  Andrew Tanenbaum, _Computer Networks_ (1981), p. 168.
Re: [dialog] Exporting from Sent folder
#221908
Author: Oliver Cromm
Date: Mon, 09 Jun 2008 23:01
18 lines
2316 bytes
* Ron Ford <ron@nowhere.net> wrote:

> I ran the script but don't see any evidence of output or error.  There is
> no new file in the directory in which the script ran.  I was expecting to
> get an error due to the first of the require statements:
> require 'iconv'
> require 'msgfile'
> 
> Does the script need to be run in the data folder?

Yes, it expects the msg.dat, msg1.dat etc. files in the current
directory. What I do is copying all of them to the folder where the
script is while Dialog is closed, so they can't be messed up or locked
by a running Dialog.

-- 
Strategy:  A long-range plan whose merit cannot be evaluated until
           sometime after those creating it have left the organization.
Re: [dialog] Exporting from Sent folder
#221911
Author: Oliver Cromm
Date: Mon, 09 Jun 2008 23:01
34 lines
2857 bytes
* Rom <-@-.invalid> wrote:

> On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm wrote:
> 
>> Messages from "Sent" can be extracted as separate files (*.msg, default)
>> or as mbox (*.mbx):
>>   
>>   ruby extr_sent.rb
>>   ruby extr_sent.rb -m
> 
> I extracted to an mbox file and imported into a folder in Dialog.
> 
> The last letter of my sig "m" was not present in sent.mbx, therefore
> missing from all sigs in messages when imported.

Hm, I saw that effect before but thought I had corrected it. I will have
a look.
 
> There were a few messages at the very beginning of sent.mbx that were
> not my sent messages. Otherwise importing was no better or worse than
> previous large import jobs, with a few messages 'split', which can be
> fixed in a text editor before importing.

The script relies on the record separator in the files, and although
it's unusual in text messages, there is no guarantee that that character
is not in a posting as well. That's why I warned about binary files,
which are much more likely to contain it.

The only wrong extractions left in my installation were ones where when
results from my previous extractor had been quoted in a post :-)

-- 
Strategy:  A long-range plan whose merit cannot be evaluated until
           sometime after those creating it have left the organization.
Re: [dialog] Exporting from Sent folder
#221912
Author: Oliver Cromm
Date: Mon, 09 Jun 2008 23:01
39 lines
3111 bytes
* Bernd Rose <b.rose.tmpbox@expires-2008-06-30.arcornews.de> wrote:

> On Sat, 7 Jun 2008 13:56:20 -0400, Oliver Cromm wrote:
> 
>>> Hm. You may consider extracting the messages based on a msg2.drt 
>>> lookup. 
> [...] 
>> Wow, how do you know this things? 
> 
> After Marcus ceased updating of Dialog, I checked, whether I could 
> get my data extracted/converted if need ever occurred. It took about 
> a cold and misty weekend. Since that time I have a fairly complete 
> reference of the file formats.
> 
> I post some information on specific topics, but won't post the whole
> reference file. That's a question of Marcus' copyright, IMHO. 

I agree.

>> And if you know them, why don't *you* post an extraction script?
> 
> Because I dread what extensions people would like to see to the
> script after its publication.  ;-)

I understand. Those two reasons influenced me in writing an extractor
only for Sent messages, instead of a general extractor, which wouldn't
be that much more effort, but is not needed, IMO. When I moved mail from
Dialog to Thunderbird before, the Dialog export function did all I
needed. But for the Sent folder, the omission of this functionality is a
defect in my book.

> Ah. Btw., your Gopher link works fine with K-Meleon.

K-Meleon, I sometimes put it on older machines. Used to use it before
Phoenix came out, which later became Firebird and then Firefox.

-- 
Q: What do computer engineers use for birth control?
A: Their personalities.
Re: [dialog] Exporting from Sent folder
#221945
Author: Rom
Date: Tue, 10 Jun 2008 10:23
42 lines
2961 bytes
On Mon, 9 Jun 2008 19:01:24 -0400, Oliver Cromm wrote:

> * Rom <-@-.invalid> wrote:
[...]
>> There were a few messages at the very beginning of sent.mbx that were
>> not my sent messages. Otherwise importing was no better or worse than
>> previous large import jobs, with a few messages 'split', which can be
>> fixed in a text editor before importing.
> 
> The script relies on the record separator in the files, and although
> it's unusual in text messages, there is no guarantee that that character
> is not in a posting as well. That's why I warned about binary files,
> which are much more likely to contain it.

It's text messages, but I'd seen the splitting of text messages before
when trying to import from another client, and don't think it's that
unusual in (my or other) text messages, so wasn't unexpected.
In this case, the imported (copies of sent) text messages split when:

1) a text message body had a line within a paragraph starting with
>From and no blank line before it (like here), so From is the start of
the line and a sentence.

2) text message bodies had a blank line as in a start of paragraph: 

>From <MID/URL> when quoting text, and the first occurrence is okay but
not subsequent occurrences in the same message.

I usually import into an empty folder first JIC or forget to check,
and if split messages found after importing, I edit/fix the start of
lines in the mbox file so they won't split, delete the previous
imported messages and reimport.

> The only wrong extractions left in my installation were ones where when
> results from my previous extractor had been quoted in a post :-)

Ah, that explains the few messages that were not my sent messages, as
on looking closer I see they originate from post(s) in a thread about
converting .DAT to .mbox with quoted stuff in this group last year.

-- 
Rom
Re: [dialog] Exporting from Sent folder
#221981
Author: vince
Date: Wed, 11 Jun 2008 13:02
14 lines
1493 bytes
On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm <lispamateur@yahoo.de>
wrote:

>As this is asked for again and again, I have written a script for the
>purpose. No, not a Dialog script, a script, or program, in Ruby.

Still don't know why this wasn't built in to Dialog.

Had a bit of a hurdle figuring out lynx and how to save the two files
(Opera is my browser of choice).  But after that, it worked well.

Will you let us know when the "last" version is available?

Thanks.
Re: [dialog] Exporting from Sent folder
#221987
Author: Oliver Cromm
Date: Wed, 11 Jun 2008 17:07
31 lines
2674 bytes
* vince <nobody@home.invalid> wrote:

> On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm <lispamateur@yahoo.de>
> wrote:
> 
>>As this is asked for again and again, I have written a script for the
>>purpose. No, not a Dialog script, a script, or program, in Ruby.
> 
> Still don't know why this wasn't built in to Dialog.

Indeed, even if the author didn't see the need, this should have been a
common request while he was still developing.
 
> Had a bit of a hurdle figuring out lynx and how to save the two files
> (Opera is my browser of choice).  But after that, it worked well.

And your port 70 is blocked as well? I'm still surprised that this
should happen, except where the policy is to block everything except 80.
Bad for us stubborn gopherers.

On the contrary, I am reluctant to open port 80 on my home server, as
this invites more trouble.

> Will you let us know when the "last" version is available?

I will announce significant changes. Your quotes are well placed.

-- 
Microsoft designed a user-friendly car:
instead of the oil, alternator, gas and engine
warning lights it has just one: "General Car Fault"
Re: [dialog] Exporting from Sent folder
#221993
Author: Ron Ford
Date: Wed, 11 Jun 2008 23:18
34 lines
2533 bytes
On Mon, 9 Jun 2008 19:01:23 -0400, Oliver Cromm posted:

> * Ron Ford <ron@nowhere.net> wrote:
> 
>> I ran the script but don't see any evidence of output or error.  There is
>> no new file in the directory in which the script ran.  I was expecting to
>> get an error due to the first of the require statements:
>> require 'iconv'
>> require 'msgfile'
>> 
>> Does the script need to be run in the data folder?
> 
> Yes, it expects the msg.dat, msg1.dat etc. files in the current
> directory. What I do is copying all of them to the folder where the
> script is while Dialog is closed, so they can't be messed up or locked
> by a running Dialog.

Then you herd them together and import them.  I see that the other way to
do it is to create a .mbx file, which is what Dialog expects to import.
This option is triggered with the -m flag: MBX = ARGV.delete("-m")

I've been looking at Dialog's .dat files with a hex editor to see if this
method can be extended.  With msgfile.rb, is that a commmon utility for
picking apart .dat files? 

I'm unfamiliar with ruby's control chars.  What characters separate records
in @@separator = "\x7F" ?

I don't see any differences between the original items in the sent folders
and those that are exported and re-imported.
-- 
The common argument that crime is caused by poverty is a kind of slander on
the poor.
H. L. Mencken
Re: [dialog] Exporting from Sent folder
#222037
Author: Oliver Cromm
Date: Thu, 12 Jun 2008 16:35
29 lines
2706 bytes
* Ron Ford <ron@nowhere.net> wrote:

> With msgfile.rb, is that a commmon utility for
> picking apart .dat files? 

Yes, but it's nowhere near perfect. It just worked for the Sent folder
in my tests. 
 
> I'm unfamiliar with ruby's control chars.  What characters separate records
> in @@separator = "\x7F" ?

@@ just signifies a class variable. The "\x7F" (hex 7F = dec 127) is the
record separator. But it has other functions as well. My msgfile.rb
adjusts for one of these, but there may be more. The character can also
just happen to appear in messages.

> I don't see any differences between the original items in the sent folders
> and those that are exported and re-imported.

That's good news. 

Internally, they will be different, though, as you know if you have
looked at the raw format of Sent messages.

-- 
Skyler: Uncle Cosmo ... why do they call this a word processor?
Cosmo:  It's simple, Skyler ... you've seen what food processors do
        to food, right?
     Cartoon by Jeff MacNelley
Re: [dialog] Exporting from Sent folder
#222163
Author: Charles Lasitter
Date: Sat, 14 Jun 2008 22:51
27 lines
2241 bytes
On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm wrote:

> Messages from "Sent" can be extracted as separate files (*.msg, default)
> or as mbox (*.mbx):

I hadn't been paying attention lately, but these ruby scripts have
worked near brilliantly for me!

Only one oddity:  Upon reimporting them back into another folder to
take advantage of the incoming / outgoing message threading, all the
messages coming back in from "sent" have my own name in the "name"
field, so it looks like a long string of messages to and from "Charles
Lasitter".  More recent message from when I stopped putting a copy in
the "sent" folder show what I would expect, which is the names
alternating back and forth between me and my partner in
correspondence.

-- 

CL -> http://tinyurl.com/2zqgly
For email correspondence.

+----------------------------------------------+
| Charles Lasitter   | Address, Mail / Ship:   |
| 401/728-1987       | 14 Cooke St             |
| see^tinyurl>4email | Pawtucket RI 02860-6114 |
+----------------------------------------------+
Re: [dialog] Exporting from Sent folder
#222176
Author: Blinky the Shark
Date: Sun, 15 Jun 2008 06:21
20 lines
2147 bytes
Charles Lasitter wrote:

> On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm wrote:
> 
>> Messages from "Sent" can be extracted as separate files (*.msg, default)
>> or as mbox (*.mbx):
> 
> I hadn't been paying attention lately, but these ruby scripts have
> worked near brilliantly for me!

Yeah, but don't you feel silly clicking your heels together three times
every time you want one to run?
 

-- 
Blinky
        Is your ISP dropping Usenet?
        Need a new feed?
        http://blinkynet.net/comp/newfeed.html
Re: [dialog] Exporting from Sent folder
#222217
Author: Oliver Cromm
Date: Mon, 16 Jun 2008 02:05
35 lines
2935 bytes
* Charles Lasitter wrote:

> On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm wrote:
> 
>> Messages from "Sent" can be extracted as separate files (*.msg, default)
>> or as mbox (*.mbx):
> 
> I hadn't been paying attention lately, but these ruby scripts have
> worked near brilliantly for me!

Good! Soon, I will publish a version based on an index file, which
should be even more robust.

> Only one oddity:  Upon reimporting them back into another folder to
> take advantage of the incoming / outgoing message threading, all the
> messages coming back in from "sent" have my own name in the "name"
> field, so it looks like a long string of messages to and from "Charles
> Lasitter".  

The overview does only give the From name, as far as I know.

> More recent message from when I stopped putting a copy in
> the "sent" folder show what I would expect, which is the names
> alternating back and forth between me and my partner in
> correspondence.

The script only exports the actual sent messages, so it's normal that
they should all come from you. Even the format that Dialog uses for
these messages is different from incoming ones - probably a technical
reason that Export from Sent folder was not implemented. It is not just
a matter of allowing the Export functionality on the folder, but a
conversion to the usual raw message format has to be implemented. 

-- 
Oliver C.
Re: [dialog] Exporting from Sent folder
#222224
Author: Oliver Cromm
Date: Mon, 16 Jun 2008 06:26
47 lines
2974 bytes
* Oliver Cromm wrote:

> * Bernd Rose wrote:
> 
>> On Sat, 7 Jun 2008 01:56:07 -0400, Oliver Cromm wrote:
>> 
>>> Messages from "Sent" can be extracted as separate files (*.msg, default)
>>> or as mbox (*.mbx):
>>>   
>>>   ruby extr_sent.rb
>>>   ruby extr_sent.rb -m
>> 
>> Hm. You may consider extracting the messages based on a msg2.drt 
>> lookup. (Group 2 is the Sent folder on all Dialog installations.)
>> 
>> Ignore the first 4 Bytes of the file. Afterwards you see records of
>> 15 Bytes each. The first 4 are record numbers. [...]
> 
> Wow, how do you know this things? And if you know them, why don't *you*
> post an extraction script?
> 
> Anyway, your description of the drt file seems to fit more or less, but
> I'll ask you about some details.

The new version is now based on the information in msg2.drt

<gopher://vector.crommatograph.info/0/scripts/dialog/extr_sent.rb>

No second file is needed.

This script should be more robust, and it's fast as hell (on my newish
machine, 625 messages extract in about 2 seconds).

The old version is still there for the moment, as extr_sent_v4.tar.gz.

____

For people having problems with gopher:

<html://vector.crommatograph.info:70/0/scripts/dialog/extr_sent.rb>

Or if it still doesn't work:

<http://gopher.floodgap.com/gopher/gw?gopher://vector.crommatograph.info:70/0/scripts/dialog/extr_sent.rb>

-- 
Oliver C.
Re: [dialog] Exporting from Sent folder
#222238
Author: Rom
Date: Mon, 16 Jun 2008 13:14
19 lines
1849 bytes
On Mon, 16 Jun 2008 02:26:34 -0400, Oliver Cromm wrote:

> The new version is now based on the information in msg2.drt
> 
> <gopher://vector.crommatograph.info/0/scripts/dialog/extr_sent.rb>
> 
> No second file is needed.
> 
> This script should be more robust, and it's fast as hell (on my newish
> machine, 625 messages extract in about 2 seconds).

Extracted as mbox with  ruby extr_sent.rb -m  and then imported into a
new folder in Dialog. It didn't extract all copies of sent messages
from the Sent folder, but only partially and less than 200 at that.
First time was a copy of my Dialog in a WinXP x64 VM and reproduced.
Then back on Vista x64, after compacting, tried again and same result.

-- 
Rom
Re: [dialog] Exporting from Sent folder
#222239
Author: Oliver Cromm
Date: Mon, 16 Jun 2008 17:43
28 lines
2634 bytes
* Rom wrote:

> On Mon, 16 Jun 2008 02:26:34 -0400, Oliver Cromm wrote:
> 
>> The new version is now based on the information in msg2.drt
>> 
>> <gopher://vector.crommatograph.info/0/scripts/dialog/extr_sent.rb>
>> 
>> No second file is needed.
>> 
>> This script should be more robust, and it's fast as hell (on my newish
>> machine, 625 messages extract in about 2 seconds).
> 
> Extracted as mbox with  ruby extr_sent.rb -m  and then imported into a
> new folder in Dialog. It didn't extract all copies of sent messages
> from the Sent folder, but only partially and less than 200 at that.
> First time was a copy of my Dialog in a WinXP x64 VM and reproduced.
> Then back on Vista x64, after compacting, tried again and same result.

So did this work better with the old version for you?

If you open the mbox file in an editor and scroll to the last message,
what does the count say? It's a line like this:

  From msg00615@export.from.40tude.invalid

-- 
Oliver C.
Re: [dialog] Exporting from Sent folder
#222249
Author: Rom
Date: Tue, 17 Jun 2008 01:52
44 lines
3122 bytes
On Mon, 16 Jun 2008 13:43:45 -0400, Oliver Cromm wrote:

> * Rom wrote:
> 
>> Extracted as mbox with  ruby extr_sent.rb -m  and then imported into a
>> new folder in Dialog. It didn't extract all copies of sent messages
>> from the Sent folder, but only partially and less than 200 at that.
>> First time was a copy of my Dialog in a WinXP x64 VM and reproduced.
>> Then back on Vista x64, after compacting, tried again and same result.
> 
> So did this work better with the old version for you?

Apart from the majority (>1000) of sent messages not exported, those
that were exported (and imported into a folder) all had the last
letter "m" of the signature this time, and a message that split last
time didn't. That's good and better than the old version.

> If you open the mbox file in an editor and scroll to the last message,
> what does the count say? It's a line like this:
> 
>   From msg00615@export.from.40tude.invalid

The last message is 189 "From msg00189@export.from.40tude.invalid",
then after is "From msg00190@export.from.40tude.invalid" by itself.

The output from running  ruby extr_sent.rb -m:
>| ................................................................................
>| ................................................................................
>| ..............................extr_sent.rb:36:in `conv': "\355\257\233 [ ]Observ
>| er "... (Iconv::IllegalSequence)
>|         from extr_sent.rb:36:in `reformat'
>|         from extr_sent.rb:36:in `collect!'
>|         from extr_sent.rb:36:in `reformat'
>|         from extr_sent.rb:52:in `output'
>|         from extr_sent.rb:50:in `open'
>|         from extr_sent.rb:50:in `output'
>|         from extr_sent.rb:72
>|         from extr_sent.rb:66:in `open'
>|         from extr_sent.rb:66
>|         from extr_sent.rb:61:in `open'
>|         from extr_sent.rb:61

-- 
Rom
Re: [dialog] Exporting from Sent folder
#222253
Author: Oliver Cromm
Date: Tue, 17 Jun 2008 02:54
23 lines
2722 bytes
* Rom wrote:

> The output from running  ruby extr_sent.rb -m:
>>| ................................................................................
>>| ................................................................................
>>| ..............................extr_sent.rb:36:in `conv': "\355\257\233 [ ]Observ
>>| er "... (Iconv::IllegalSequence)
>>|         from extr_sent.rb:36:in `reformat'

I see, something wrong with the encoding. This is a robustness issue.
But it occurs in a part that isn't changed from the last version, so I
wonder why it didn't run into this error before. 

If it is not private, I would be happy to see message 190, where it
stops, as extracted by extr_sent -r. 

For the time being, I added an error "ignoring" statement so that it
should not stop on Iconv error any more. Btw, I tried to provoke the
error and could do so only for messages with attachments. Does your
message 190 have one?

-- 
Oliver C.
Re: [dialog] Exporting from Sent folder
#222254
Author: Rom
Date: Tue, 17 Jun 2008 04:52
50 lines
3300 bytes
On Mon, 16 Jun 2008 22:54:53 -0400, Oliver Cromm wrote:

> * Rom wrote:
> 
>> The output from running  ruby extr_sent.rb -m:
>>>| ................................................................................
>>>| ................................................................................
>>>| ..............................extr_sent.rb:36:in `conv': "\355\257\233 [ ]Observ
>>>| er "... (Iconv::IllegalSequence)
>>>|         from extr_sent.rb:36:in `reformat'
> 
> I see, something wrong with the encoding. This is a robustness issue.
> But it occurs in a part that isn't changed from the last version, so I
> wonder why it didn't run into this error before. 
>
> If it is not private, I would be happy to see message 190, where it
> stops, as extracted by extr_sent -r. 

This sent news message was not posted to a public news server/group.

> For the time being, I added an error "ignoring" statement so that it
> should not stop on Iconv error any more. Btw, I tried to provoke the
> error and could do so only for messages with attachments. Does your
> message 190 have one?

I wondered what that error was about, but now twigged and had a look.
No, no attachment. It's a plain text news message.
Headers copied from the previous version extraction in sent.mbx:

>| User-Agent: 40tude_Dialog/2.0.15.1
>| MIME-Version: 1.0
>| Content-Type: text/plain; charset="us-ascii"
>| Content-Transfer-Encoding: 7bit

Looking at that sent message in sent.mbx in an editor as exported with
the old version, it's the wrap override at the start of a line used in
Dialog's composition window and then a space before "[ ]Observer ".

An image of the wrap override I see in my editor, which is the same as
I see in Dialog's composition window when using it:

<http://i29.tinypic.com/2z3sakx.jpg>

ED AF 9B 20

But the wrap override did not import okay into a folder in Dialog from
the old version extraction: <http://i28.tinypic.com/2mgsj10.png>

-- 
Rom
Re: [dialog] Exporting from Sent folder
#222262
Author: Rom
Date: Tue, 17 Jun 2008 08:12
17 lines
2029 bytes
On Mon, 16 Jun 2008 22:54:53 -0400, Oliver Cromm wrote:

> For the time being, I added an error "ignoring" statement so that it
> should not stop on Iconv error any more.

I've now tried the third version that ignores the error, by extracting
as mbox with  ruby extr_sent.rb -m. Worked fine, with the correct
number of copies of sent messages after importing into a folder in
Dialog, no split messages, and sigs okay. Great. :-)

The only minor issue I see is messages with the wrap override (that
wasn't the only one here, btw), as after importing into Dialog the
message looks okay in raw mode, but in normal mode where it's usually
hidden from view in the Sent folder, it's not in a 'normal' folder.

-- 
Rom
Re: [dialog] Exporting from Sent folder
#222284
Author: Oliver Cromm
Date: Tue, 17 Jun 2008 17:29
56 lines
4117 bytes
* Rom <-@-.invalid> wrote:

> On Mon, 16 Jun 2008 22:54:53 -0400, Oliver Cromm wrote:
> 
>> * Rom wrote:
>> 
>>> The output from running  ruby extr_sent.rb -m:
>>>>| ................................................................................
>>>>| ................................................................................
>>>>| ..............................extr_sent.rb:36:in `conv': "\355\257\233 [ ]Observ
>>>>| er "... (Iconv::IllegalSequence)
>>>>|         from extr_sent.rb:36:in `reformat'
>> 
>> I see, something wrong with the encoding. This is a robustness issue.
>> But it occurs in a part that isn't changed from the last version, so I
>> wonder why it didn't run into this error before. 
>>
>> If it is not private, I would be happy to see message 190, where it
>> stops, as extracted by extr_sent -r. 
> 
> This sent news message was not posted to a public news server/group.
> 
>> For the time being, I added an error "ignoring" statement so that it
>> should not stop on Iconv error any more. Btw, I tried to provoke the
>> error and could do so only for messages with attachments. Does your
>> message 190 have one?
> 
> I wondered what that error was about, but now twigged and had a look.
> No, no attachment. It's a plain text news message.
> Headers copied from the previous version extraction in sent.mbx:
> 
>>| User-Agent: 40tude_Dialog/2.0.15.1
>>| MIME-Version: 1.0
>>| Content-Type: text/plain; charset="us-ascii"
>>| Content-Transfer-Encoding: 7bit
> 
> Looking at that sent message in sent.mbx in an editor as exported with
> the old version, it's the wrap override at the start of a line used in
> Dialog's composition window and then a space before "[ ]Observer ".
> 
> An image of the wrap override I see in my editor, which is the same as
> I see in Dialog's composition window when using it:
> 
> <http://i29.tinypic.com/2z3sakx.jpg>
> 
> ED AF 9B 20
> 
> But the wrap override did not import okay into a folder in Dialog from
> the old version extraction: <http://i28.tinypic.com/2mgsj10.png>

Thank you, that should be enough information to tackle this specific
problem.

-- 
A chrysanthemum by any other name would be easier to spell.
  Peter Moylan in alt.usage.english
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