有人知道读取 mork 文件(Thunderbird 地址簿)的现有代码吗?

发布于 2024-07-04 10:47:39 字数 649 浏览 9 评论 0原文

我需要即时阅读 Thunderbird 地址簿。 它以称为 Mork 的文件格式存储。 不是一种读起来令人愉快的文件格式。 我找到了一篇 1999 年的文章,解释了文件格式。 我很想知道是否有人已经完成了这个过程并且可以提供代码。 我发现 mork.pl 由 Jamie Zawinski (他在 Netscape Navigator 工作),但我希望.NET 解决方案。

我希望 StackOverflow 能够拯救我,因为这似乎是浪费我的时间来编写一些东西来读取这种文件格式,而它本来应该如此简单。

我喜欢 Jamie 在他的 perl 脚本 中发表的评论。 这是我最喜欢的部分:

#   Let me make it clear that McCusker is a complete barking lunatic.
#   This is just about the stupidest file format I've ever seen.

I have the need to read the Thunderbird address book on the fly. It is stored in a file format called Mork. Not a pleasant file format to read. I found a 1999 article explaining the file format. I would love to know if someone already has gone through this process and could make the code available. I found mork.pl by Jamie Zawinski (he worked on Netscape Navigator), but I was hoping for a .NET solution.

I'm hoping StackOverflow will come to the rescue, because this just seems like a waste of my time to write something to read this file format when it should be so simple.

I love the comments that Jamie put in his perl script. Here is my favorite part:

#   Let me make it clear that McCusker is a complete barking lunatic.
#   This is just about the stupidest file format I've ever seen.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

街角卖回忆 2024-07-11 10:47:39

Beagle 搜索引擎 具有解析 Mork 文件的代码。 它不是最高效的内存解决方案,但它有效并且可能是一个有用的起点。 以下是该文件的链接:

http:// /svn.gnome.org/viewvc/beagle/tags/BEAGLE_0_2_18/Util/Mork.cs?view=markup

(这些天 Beagle 不再使用此解析器;我们采用了更简单(且受支持)的路径编写一个 Thunderbird 扩展,将数据发送给 Beagle 本身,其缺点是当 Thunderbird 关闭时无法工作,但优点是不会让你产生用最近的钝器敲击你的头的欲望。)

The Beagle search engine had code to parse Mork files. It's not the most memory efficient solution, but it worked and could be a useful starting point. Here's a link to the file:

http://svn.gnome.org/viewvc/beagle/tags/BEAGLE_0_2_18/Util/Mork.cs?view=markup

(These days Beagle doesn't use this parser anymore; we took the easier (and supported) path of writing a Thunderbird extension which just sent the data to Beagle itself. Has the disadvantage of not working while Thunderbird is closed, but has the advantage of not instilling the desire to bash your head in with the nearest blunt instrument.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文