Reputation: 1752
I have a lot of RST (reStructuredText) files converted to HTML using docutils. Using a small developed JS app (a basic iframe with HTML5 contenteditable attribute), non-tech people can easily edit the generated HTML page. The goal would be apply the modification done in HTML back into the original RST file.
I'm wondering if there is a way to train an algorithm with the ground-truth of original_RST -> outputed_HTML conversion so we can later reverse outputed_HTML+minor modification back to RST ? What kind of algorithm will it be ? Which way should I start digging ?
To simplify the problem, instead of RST, I can also use the internal XML AST representation of docutils as document input (RST to XML-AST: http://docutils.sourceforge.net/tools/quicktest.py) and later, fix the xml2rst+xslt project (http://www.merten-home.de/FreeSoftware/xml2rst/)
Any suggestion is welcome
Upvotes: 7
Views: 5123
Reputation: 638
Try Pandoc
If you need to convert files from one markup format into another, pandoc is your swiss-army knife.
Upvotes: 5