Socket
Book a DemoInstallSign in
Socket

mork-parser

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mork-parser

0.2.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

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.

FAQs

Package last updated on 30 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.