有人知道读取 mork 文件(Thunderbird 地址簿)的现有代码吗?
我需要即时阅读 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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.)