Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Is there a library to parse Mozilla "mork" documents?

Reply
Thread Tools

Is there a library to parse Mozilla "mork" documents?

 
 
John Reese
Guest
Posts: n/a
 
      01-21-2005
Mozilla, Firefox, Thunderbird, and so forth use this awful format
called MORK to store all kinds of things: which messages you've read
in a newsgroup, headers and indexes into the mbox file of messages in
a mail folder, and address books. It's documented to some extent
here:
http://www.mozilla.org/mailnews/arch/mork/primer.txt

Does anyone know of a Python library for parsing these files? A
single file basically just stores the equivalent of a nested
dictionary with text that can be declared separately and interpolated.
jwz has an over-specific perl version at
http://www.jwz.org/hacks/marginal.html, which I might have to try to
translate if there's nothing already available in Python.
 
Reply With Quote
 
 
 
 
Peter Rowell
Guest
Posts: n/a
 
      01-21-2005
John Reese wrote:
> Mozilla, Firefox, Thunderbird, and so forth use this awful format
> called MORK to store all kinds of things: which messages you've read

[ snip ]

I was searching on a similar question (about accessing the history)
when I came across a nifty little bookmarklet. It dumps FF history in
RDF format to the file of your choice. This temporarily solved
my problem, although in the long run I want to have direct read
access to the info.

Perhaps you can get a few ideas and go from there. The bookmarlet
was attached to Bugzilla item 241438.
https://bugzilla.mozilla.org/show_bug.cgi?id=241438

HTH,
Peter
 
Reply With Quote
 
 
 
 
Tim Roberts
Guest
Posts: n/a
 
      01-21-2005
John Reese <(E-Mail Removed)> wrote:
>
>Mozilla, Firefox, Thunderbird, and so forth use this awful format
>called MORK to store all kinds of things: which messages you've read
>in a newsgroup, headers and indexes into the mbox file of messages in
>a mail folder, and address books.


Yes. What a crock that is. The MORK format is a great way to compress
tabular information, IF the information consists of the same pieces of data
over and over. E-mail boxes do not fit into that class, so I have no doubt
that the typical Thunderbird MORK file is singificantly LARGER than the
same file would be in, say, INI format.

I wrote a Python script to parse it, but it isn't terribly robust. I was
able to produce a dictionary, but I didn't do anything with the results.
You're welcome to take a look:
http://www.probo.com/timr/parsemsf.py
--
- Tim Roberts, http://www.velocityreviews.com/forums/(E-Mail Removed)
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
John Reese
Guest
Posts: n/a
 
      01-21-2005
On Thu, 20 Jan 2005 23:48:34 -0800, Tim Roberts <(E-Mail Removed)> wrote:
> John Reese <(E-Mail Removed)> wrote:
>>
>>Mozilla, Firefox, Thunderbird, and so forth use this awful format
>>called MORK to store all kinds of things: which messages you've read
>>in a newsgroup, headers and indexes into the mbox file of messages in
>>a mail folder, and address books.

>
> Yes. What a crock that is. The MORK format is a great way to compress
> tabular information, IF the information consists of the same pieces of data
> over and over. E-mail boxes do not fit into that class, so I have no doubt
> that the typical Thunderbird MORK file is singificantly LARGER than the
> same file would be in, say, INI format.
>
> I wrote a Python script to parse it, but it isn't terribly robust. I was
> able to produce a dictionary, but I didn't do anything with the results.
> You're welcome to take a look:
> http://www.probo.com/timr/parsemsf.py


Thanks, I'll work with this. I have to say that this has all been
worth it just to read about Jamie Zawinski railing against this file
format. I think your comment at the top sums it up well:

# Why am I doing this?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any library that parse c++ source code statically kuangye C++ 5 03-29-2011 07:25 AM
Is there any python library that parse c++ source code statically kuangye Python 3 03-13-2011 03:54 PM
Is there any python library that parse c++ source code statically kuangye Python 0 03-13-2011 09:20 AM
Is there a python library to parse C++ code file? Allerdyce.John@gmail.com Python 2 03-17-2006 06:19 PM
Is there a library to parse Mozilla "mork" documents? Paul Boddie Python 0 01-21-2005 11:48 AM



Advertisments