473,398 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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

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.
Jul 18 '05 #1
3 2871
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
Jul 18 '05 #2
John Reese <jt*@ofb.net> 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, ti**@probo.com
Providenza & Boekelheide, Inc.
Jul 18 '05 #3
On Thu, 20 Jan 2005 23:48:34 -0800, Tim Roberts <ti**@probo.com> wrote:
John Reese <jt*@ofb.net> 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?

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Paul Boddie | last post by:
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 > in a newsgroup, headers and...
1
by: Mork | last post by:
Expanding the audience (initially posted to microsoft.public.dotnet.framework.webservices): Are there any System.Xml.Serialization attributes or is there a way in the ASMX plumbing to publish...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.