0.0
No commit activity in last 3 years
No release in over 3 years
DoctorNinja is built by the Responde Aí Team (www.respondeai.com.br/time) in an attempt to fill our needs to convert docx files into html that also converts Word Forumlas into MathML.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 5.4
~> 1.1
~> 0.10
~> 10.0

Runtime

~> 1.4
~> 2.13
~> 1.1
 Project Readme

Here be dragons! This is a WIP.

DoctorNinja Build Status Gem Version License

DoctorNinja is a library to convert word documents into html files like a ninja.

Why DoctorNinja?

Well, the name is simple, Doctor comes from Doc (.docx) and Ninja comes from our first MVP (Ninja das Dúvidas).

Features

  • Convert images and applies the following transformations
    • Crop
  • Convert Microsoft's Math to MathML
  • Accepts bold, italic and underline
  • Sets text-align to center when there are only non-text children on paragrpahs ( This is for our own usecase, we should probably give an interface to configure it, maybe passing a lambda )

TODO

  • Pass styleMap as an option(to choose what tag in paragraph rendering)
  • Add general configurations:
    1. style map
    2. image inline(src=data)/as file
    3. MathML/ansimath/latex

Installation

Add this line to your application's Gemfile:

gem 'doctor_ninja'

And then execute:

$ bundle

Or install it yourself as:

$ gem install doctor_ninja

Usage

To use it, you first load the .docx file and then use the to_html to get the html.

doc = DoctorNinja::Document.new('path_to_file.docx')
doc.to_html

Alternativly, you can use our binary, that wraps inside a html boilerplate and adds MathJax to correcly render the MathML

$> doctor_ninja document.docx document.html

Contributing

  1. Fork it ( https://github.com/bamorim/doctor_ninja/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request