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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Boddie

    #1

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

    John Reese wrote:[color=blue]
    >
    > 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[/color]

    Hmmm. Wasn't David McCusker working for the OSA Foundation on Chandler
    at some point? Anyway, given the references to LDIF (and the fact that
    I have in the past exported address books from Netscape Communicator
    in LDIF format), the following specification might help:

    http://www.faqs.org/rfcs/rfc2849.html
    [color=blue]
    > 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.[/color]

    I'd look at the python-ldap project:

    Download python-ldap for free. Provide an LDAP client API for Python, C wrapper module around OpenLDAP 2.x with an object-oriented API, several additional modules for processing LDIF, LDAP URLs and LDAP schema information


    The ldif module might be of relevance, but there isn't an example in
    the documentation which would confirm my suspicions.

    Paul
Working...