首页
社区
课程
招聘
[求助]测试下新版本编辑器,同时支持 HTML 和 MarkDown
发表于: 2017-9-2 12:14 2593

[求助]测试下新版本编辑器,同时支持 HTML 和 MarkDown

2017-9-2 12:14
2593

word2markdown

At 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 afewsolutions, 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:

  1. Exporting to HTML using Microsoft Word 2012. We automated this on OS X using Automator. Solutions for other platforms are welcome!
  2. Extracting image types that we want to use. Keeps the original quality, unless that's a proprietary .emz file. In this step we also fix some math.
  3. Converting HTML to XML usingtagsoup.
  4. Covert OOML (proprietary Word format) into MathML equations, using Microsoft's own conversion XSLT, and a custom version ofthis XSLT. UsesSaxon 8.
  5. Some intermediate fixes for whitespace and math.
  6. Conversion back into HTML usingTidy. Also strips a lot of stuff.
  7. More intermediate fixes to deal with shortcomings of Tidy and Pandoc.
  8. Conversion into Markdown usingPandoc.
  9. Lots of cleanup and final fixes to the Markdown.

We've released this pipeline as an open

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!



[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 0
支持
分享
最新回复 (8)
雪    币: 1080
活跃值: (165)
能力值: (RANK:30 )
在线值:
发帖
回帖
粉丝
2

test

ok

2017-9-2 12:15
0
雪    币: 1080
活跃值: (165)
能力值: (RANK:30 )
在线值:
发帖
回帖
粉丝
3

test

test

2017-9-2 12:15
0
雪    币: 1080
活跃值: (165)
能力值: (RANK:30 )
在线值:
发帖
回帖
粉丝
4

HELLO

world

2017-9-2 12:18
0
雪    币: 47147
活跃值: (20415)
能力值: (RANK:350 )
在线值:
发帖
回帖
粉丝
5
美女好养眼~
2017-9-2 22:30
0
雪    币: 608
活跃值: (648)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
6
```
TEST
```
2017-9-2 23:15
0
雪    币: 2
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7
2017-9-3 12:50
0
雪    币: 6642
活跃值: (3484)
能力值: (RANK:10 )
在线值:
发帖
回帖
粉丝
8

hello

test
2017-9-3 20:27
0
雪    币: 12848
活跃值: (9142)
能力值: ( LV9,RANK:280 )
在线值:
发帖
回帖
粉丝
9
真的支持html? <span>123</span>
<table><tbody></tbody></ table>
2017-9-3 21:38
0
游客
登录 | 注册 方可回帖
返回
//