开源软件名称(OpenSource Name):Versal/word2markdown开源软件地址(OpenSource Url):https://github.com/Versal/word2markdown开源编程语言(OpenSource Language):XSLT 90.9%开源软件介绍(OpenSource Introduction):word2markdownAt Versal, we have created quite a few lessons for internal use, many of which were originally created as Word documents. Now that we've released the first version of our educational platform, we want to convert those lessons for online publication. We have an internal API that allows uploading of Markdown documents, which are then converted to courses with lessons and gadgets. So we only needed to convert our Word documents to Markdown. Sounds easy right? Not so much. There are a few solutions, but they only work for very basic text formatting. Our documents were a bit more complex, containing tables, images, and math -- which proved especially tricky! So using a number of existing tools we hacked together our own conversion script. It consists of 9 consecutive steps:
We've released this pipeline as an open source project (MIT License), although it should be noted that you will need to purchase Microsoft Word for this to work. Hopefully this can be a starting point for a more reliable conversion of Word documents! Requirements
UsageFor Word-to-Markdown scripts, first navigate to this directory, using Calling doc-to-md.sh fixtures/public.docx | less TestsRun './accept.sh' to generate new markdown, which you can compare to the original markdown using git. HTML previewRun 'fixtures/html.sh' to generate HTML. The HTML uses Mathjax on an external server to display equations in broswers that don't support it (pretty much everything but Firefox). DisclaimerAvailable under the MIT license (see LICENSE file). Built by @janpaul123 for @versal. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论