0.0
The project is in a healthy, maintained state
Parse Mork databases (as used by Mozilla Thunderbird)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 1.7
 Project Readme

Mork

Build Status Coverage

Mozilla Thunderbird uses the Mork database format for its folder indexes.

This library reads in a Mork file and produces a Mork::Data instance.

This provides:

  • tables - The top-level tables,
  • rows - The top-level rows (i.e. rows not contained in tables).

Usage

require "mork/parser"

parser = Mork::Parser.new
content = File.read("MyFolder.msf")
raw = parser.parse(content)
data = raw.data

Development

After checking out the repo, run bundle to install dependencies. Then, run rake spec to run the tests.

To release a new version, update the version number in version.rb, and then run rake release, which will create a git tag for the version, push git commits and the created tag, and push the .gem file to rubygems.org.

Lexer/Parser Modifications

The lexer, parser/mork.rex, is written in Rexical grammar.

After changes, regenerate the Ruby lexer code:

$ rex parser/mork.rex --output-file lib/mork/lexer.rb

The parser, which uses the symbols lexed by lib/mork/lexer.rb, is parser/mork.y.

To regenerate the parser:

$ racc parser/mork.y --output-file lib/mork/parser.rb

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/joeyates/mork. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Mork project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.