Datastory
DataStory is an extension on Markdown that helps you script documents that tell a data story and show your work. DataStory is inspired by RMarkdown.
DataStory attempts to go the extra mile and create a portable HTML output file that is self-contained, using data uris, so any included images or filesare attached to the html file itself, including the original source file.
Use with Caution
DataStory is in active dev right now, but isn't quite ready for prime time. Feel free to install it and play around, but it's got a ways to go. Do report any problems you run into.
Installation
Add this line to your application's Gemfile:
gem 'datastory'
And then execute:
$ bundle
Or install it yourself as:
$ gem install datastory
Usage
DataStory includes the DataStory command, which takes two arguments, input and output.
datastory analysis.md analysis.html
The input file should be a valid DataStory Markdown file. The output file should be a valid path where a new html file can be created.
Syntax
At its core, DataStory converts Markdown to HTML. See the core Markdown reference to get familiar with Markdown.
DataStory allows the use of code fences, using 3 backticks (```) to represent blocks of code. Adding a language definition of ruby-datastory causes the code in the code fenced area to be both displayed and executed, with its output displayed below the original code.
Using a language definition of ruby-datastory-silent will display the code and execute it, but not display any output.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request