gpt4 book ai didi

file - 读取雷鸟地址mab文件内容

转载 作者:行者123 更新时间:2023-12-04 06:39:47 26 4
gpt4 key购买 nike

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

每当我需要编辑包含在多个列表中的地址时,就很难找到哪个列表包含要修改的地址。

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

有了产生的列表,用户可以简单地仅编辑正确的地址列表。

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

提前致谢

an

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

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

最佳答案

恐怕没有答案可以为您解决这个问题。
MORK是一个文本数据库,其中包含地址簿数据(.mab文件)和邮件文件夹摘要(.msf文件)文件。

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

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

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



This page声明以下内容:

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

  • 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."


挫败感在这里闪耀着,这显然不是一件容易的事。

因此,在Mozilla产品之外显然没有任何解析器可以实际解析此格式。

过去,我已经对复杂的文件格式进行了反向工程,并且知道可以通过耐心和适当的精力来完成。

可悲的是,这似乎也是您唯一的选择。一个不错的起点是看 Thunderbird's source code

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

当然,您总是可以查看 extension API来查看是否允许您以比直接处理文件格式更结构化的方式访问所需的数据。

关于file - 读取雷鸟地址mab文件内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17841815/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com