读取雷鸟地址mab文件内容 [英] read thunderbird address mab files content

查看:104
本文介绍了读取雷鸟地址mab文件内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的TBIRD地址簿中有几个地址列表.

I have several address list's on my TBIRD address book.

每次我需要编辑包含在多个列表中的地址时,都会很麻烦地查找哪个列表包含要修改的地址.

every time I need to edit an address that is contained in several lists, is a pain on the neck to find which list contains the address to be modified.

作为帮助工具,我想读取几个文件,并仅向用户提供其中的一个列表 xxx.MAB文件仅包含一次搜索就包含搜索到的地址.

As a help tool I want to read the several files and just gave the user a list of which xxx.MAB files includes the searched address on just one search.

有了产生的列表,用户只需简单地编辑正确的地址列表即可.

having the produced list, the user can simply go to edit just the right address list's.

我想最少了解所提到的MAB文件的格式,因此我可以对文件中的字符串进行OPEN + SEARCH查找.

Will like to know a minimum about the format of mentioned MAB files, so I can OPEN + SEARCH for strings into the files.

预先感谢

胡安

PD已经问过mozilla论坛,但是mozilla没有计划将地址合并到一个主文件中,而另一个列表仅包含指向该主文件的链接.有一个个人的想法可以做到这一点,但由于资源不足,他不知道何时出现,

PD have asked mozilla forum, but there are no plans from mozilla to consolidate the address on one master file and have the different list's just containing links to the master. There is one individual thinking to do that, but he has no idea when due to lack of resources,

在这个论坛上,有一个类似的问题提到了MORK文件,但我的实际TBIRD似乎希望MAB文件中包含所有地址

on this forum there is a similar question mentioning MORK files, but my actual TBIRD looks like to have all addresses contained on MAB files

推荐答案

恐怕没有答案可以为您解决这个问题.

I am afraid there is no answer that will give you a proper solution for this question.

MORK是一个文本数据库,其中包含地址簿数据文件(.mab文件)和邮件文件夹摘要(.msf文件).

MORK is a textual database containing the files Address Book Data (.mab files) and Mail Folder Summaries (.msf files).

由David McCusker编写的格式是各种数字名称空间的混合,并且没有文档记录,似乎不再得到开发/维护/支持.掌握它的唯一方法是对它进行反向工程,同时使用这种格式查看源代码.

The format, written by David McCusker, is a mix of various numerical namespaces and is undocumented and seem to no longer be developed/maintained/supported. The only way you would be able to get the grips of it is to reverse engineer it parallel with looking at source code using this format.

但是,有经验的人试图为这种文件格式编写解析器,但没有成功.根据Wikipedia的说法,前Netscape工程师Jamie Zawinski关于格式的说法是这样的:

However, there have been experienced people trying to write parsers for this file format without any success. According to Wikipedia former Netscape engineer Jamie Zawinski had this to say about the format:

...我见过的最容易损坏大脑的文件格式 我十九岁的职业

...the single most brain-damaged file format that I have ever seen in my nineteen year career

此页面指出以下内容:

简而言之,让我们计算一下它(莫克)的罪过:

In brief, let's count its (Mork's) sins:

  • 重叠的两个不同的数字名称空间.
  • 无法确定要使用哪种字符引号语法:反斜杠?用美元符号进行十六进制编码?
  • 有时允许使用C ++行注释,但有时//只是URL中的一对字符.
  • 进行所有这些认真的压缩工作(两个不同的字符串插入哈希表),然后写出Unicode字符串 不使用UTF-8:写出解压缩的wchar_t字符!
  • 更糟糕的是,它使用3字节编码对每个wchar_t进行十六进制编码,这意味着文件大小将为3x或6x(取决于whchar_t是否为2) 个字节或4个字节.)
  • 它伪装成文本"文件格式,而实际上它只是另一个二进制斑点文件,只是它代表了所有魔力 ASCII格式的数字.它不是人类可读的,也不是可手动编辑的,因此 唯一的好处是它使用短线和 不使用二进制字符是因为它使文件更大.哦 等等,我的错,那根本就没有好处."
  • Two different numerical namespaces that overlap.
  • It can't decide what kind of character-quoting syntax to use: Backslash? Hex encoding with dollar-sign?
  • C++ line comments are allowed sometimes, but sometimes // is just a pair of characters in a URL.
  • It goes to all this serious compression effort (two different string-interning hash tables) and then writes out Unicode strings without using UTF-8: writes out the unpacked wchar_t characters!
  • Worse, it hex-encodes each wchar_t with a 3-byte encoding, meaning the file size will be 3x or 6x (depending on whether whchar_t is 2 bytes or 4 bytes.)
  • It masquerades as a "textual" file format when in fact it's just another binary-blob file, except that it represents all its magic numbers in ASCII. It's not human-readable, it's not hand-editable, so the only benefit there is to the fact that it uses short lines and doesn't use binary characters is that it makes the file bigger. Oh wait, my mistake, that isn't actually a benefit at all."

无奈在这里闪耀着,这显然不是一个简单的任务.

The frustration shines through here and it is obviously not a simple task.

因此,在Mozilla产品之外显然没有解析器能够真正解析这种格式.

Consequently there apparently exist no parsers outside Mozilla products that is actually able to parse this format.

过去,我对复杂的文件格式进行了逆向工程,并且知道只要有足够的耐心和精力就可以完成.

I have reversed engineered complex file formats in the past and know it can be done with the patience and right amount of energy.

遗憾的是,这似乎也是您唯一的选择.一个不错的起点是看看 Thunderbird的源代码.

Sadly, this seem to be your only option as well. A good place to start would be to take a look at Thunderbird's source code.

我知道这不能为您提供直接的解决方案,但考虑到使用这种格式的情况,我认为这是对此问题的唯一答案.

I know this doesn't give you a straight-up solution but I think it is the only answer to the question considering the circumstances for this format.

当然,您始终可以查看扩展API ,以查看是否与直接处理文件格式相比,它可以使您以更加结构化的方式访问所需的数据.

And of course, you can always look into the extension API to see if that allows you to access the data you need in a more structured way than handling the file format directly.

这篇关于读取雷鸟地址mab文件内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆