当前位置: 首页 > 软件库 > 应用工具 > >

word-to-markdown

授权协议 MIT License
开发语言 JavaScript
所属分类 应用工具
软件类型 开源软件
地区 不详
投 递 者 况明贤
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Word to Markdown converter

A Ruby gem to liberate content from the jail that is Word documents

CI Gem Version Inline docs

The problem

Our default content publishing workflow is terribly broken. We've all been trained to make paper, yet today, content authored once is more commonly consumed in multiple formats, and rarely, if ever, does it embody physical form. Put another way, our go-to content authoring workflow remains relatively unchanged since it was conceived in the early 80s.

I'm asked regularly by government employees — knowledge workers who fire up a desktop word processor as the first step to any project — for an automated pipeline to convert Microsoft Word documents to Markdown, the lingua franca of the internet, but as my recent foray into building just such a converter proves, it's not that simple.

Markdown isn't just an alternative format. Markdown forces you to write for the web.

Read more

Just want to convert a Microsoft Word (or Google) document to Markdown?

You can use this hosted service (or check out its source).

Install

You'll need to install LibreOffice. Then:

gem install word-to-markdown

Usage

file = WordToMarkdown.new("/path/to/document.docx")
=> <WordToMarkdown path="/path/to/document.docx">

file.to_s
=> "# Test\n\n This is a test"

file.document.tree
=> <Nokogiri Document>

Command line usage

Once you've installed the gem, it's just:

$ w2m path/to/document.docx

Outputs the resulting markdown to stdout

Supports

  • Paragraphs
  • Numbered lists
  • Unnumbered lists
  • Nested lists
  • Italic
  • Bold
  • Explicit headings (e.g., selected as "Heading 1" or "Heading 2")
  • Implicit headings (e.g., text with a larger font size relative to paragraph text)
  • Images
  • Tables
  • Hyperlinks

Requirements and configuration

Word-to-markdown requires soffice a command line interface to LibreOffice that works on Linux, Mac, and Windows. To install soffice, see the LibreOffice documentation.

Testing

script/cibuild

Docker

First, create the Gemfile.lock by installing the dependencies:

bundle install

Everything you need to run the executable locally:

docker-compose build
docker-compose run --rm app bundle exec w2m --help
docker-compose run --rm app bundle exec w2m test/fixtures/em.docx

Hosted service

Word-to-markdown-server contains a lightweight server for converting Word Documents as a service. A live version runs at word2md.com.

  • https://word-to-markdown.herokuapp.com/ 在线转换,图片转换为base64编码,图片太多加载起来会慢,所以还是手动转换md把 http://www.writage.com/ 这个软件下载下来还没试。 base64编码后比原图要大,而是因为如果把大图片编码到 html / css 中,会造成后者体积明显增加,明显影响网页的打开速度。如果用外链图片的话,图片可以在

  • 1. 问题描述 用过markdown的朋友都知道,markdown语法简洁,写作效率极高,非常适合网络博客、邮件、笔记等非正式文档的写作。但对于格式复杂的正式报告、论文、项目计划书等正式文档是不适合的,无法满足精细排版的要求。 解决这一矛盾的基本思路是,在markdown中写作完成初稿,之后在word中进行精细化排版设置。这就需要markdown转换word。以前一直没有找到合适的工具,今天终于发

  • 00. 目录 01. 什么是MarkDown Markdown的目标是实现易读易写,成为一种适用于网络的书写语言。 我们写作文章时经常会遇到一些困扰。试想一下,您在使用Word写作文档,您经常需要暂停写作,选中某个部分,然后利用排版工具为该部分添加排版格式,然后才能继续您的写作;如果你要写网络文档,情况可能更糟,如果需要呈现一个列表,您需要使用<ul><li>等若干多的标签实现;我们的写作思路经常

  • 其实折腾这个事情的初衷是因为想用markdown写数据库设计文档,而现在的数据库设计文档是word版的。以前也尝试过类似PowerDesigner(曾经的重度使用者,各种大型项目都是用这个,在哪个年代还是比较流行的)啊UML啊各种数据库建模工具,说老实话,严谨是比较严谨,方便也还方便,可是装起来实在太麻烦了,启动成本也挺高的。 毕竟word文档没法搞版本管理这种事嘛(当然,手工管理版本也算版本管理

  • 软件开发 该部分描述在嵌入式开发过程中,遇到的专有名词解释。 项目开发 该部分描述在产品项目开发过程中,遇到的专有名词解释。 check out 与check in: 就是在比较大的项目中,为避免不同的人编辑相同的代码,导致代码覆盖等错误,设计了树形的结点,将一份较大的代码,分成很多(小的部分),每个人改动代码时,将要改动的代码check out,这时别人就不能对代码改动。 改完了,在check

  • 全文阅读:https://www.lianxh.cn/news/6dfbbaefbb2d5.html 目录 方法一:Writage + Pandoc -- 双剑合璧! 方法二:Word to Markdown Converter 在线转换网页 方法三:Typora + Pandoc 图片的下载与存储 方法一:Writage + Pandoc -- 双剑合璧! 下载并安装 Writage,下载地址:

 相关资料