data_doc

<img src=“https://secure.travis-ci.org/alilee/data_doc.png” alt=“Build Status” />

DESCRIPTION:

Complex documents can be challenging to author, and time-consuming to achieve high levels of internal consistency. This gem offers a Domain Specific Language to embed structured data in a markdown document and then render it into configurable tables.

FEATURES/PROBLEMS:

  • Main document is Markdown for convenient content authoring.

  • Builds up data in relational database, facilitating review and analysis.

  • Generates HTML from Markdown.

  • Provides fine-grained control over the HTML headers, including CSS, for the output.

  • Simple DSL for capturing structured data

  • Simple DSL for querying data stores and laying out in tables.

SYNOPSIS:

data_doc your_file.md.erb > result.html

The data definition language looks like this:

store 'requirement' do
  string 'name'
  text 'description'
  string 'priority'
  alternate_key 'name'    
end

requirement name: "It MUST "

The

REQUIREMENTS:

  • Tested on Ruby 1.9.3 only (so far)

  • ActiveRecord-compatible data store

  • RDiscount for Markdown

INSTALL:

gem install data_doc

LICENSE:

(The MIT License)

Copyright © 2012 Alister Lee

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.