HTML转换工具 html2markdown
- 授权协议: GPL
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://git.oschina.net/iThinker/html2markdown
- 软件文档: https://git.oschina.net/iThinker/html2markdown/blob/master/README.md?dir=0&filepath=README.md&oid=eedb5a91aa96022a7be16b57766a9f1effd81c7c&sha=23b5ea5fb4bcac4888d821959b9e598807df94fa
软件介绍
将HTML转化成Markdown的工具,增加了table的解析,以及更正了pre标签,此项目源于当时采集gitbook等类似平台的文章时使用!
安装
npm install h2m 注意:将项目的converters文件夹覆盖node_modules/h2m 的converters文件夹
如何使用
h2m(html[, options])
例子
var h2m = require('h2m')
var md = h2m('<h1>Hello World</h1>') // md = '# Hello World'选项
converter: the converter you can choose. now support CommonMark(default) and MarkdownExtra
overides: custom converter behavior:
h2m('<a href="http://www.baidu.com">h2m</a>', { overides: { a: function(node) { /**
node is an object as the a tag:
{
name: "a",
attrs: {
href: 'http://www.baidu.com'
},
md: 'h2m'
}
*/ return `[This is an link element](${node.attrs.href})` } } } // output [This is an link element](http://www.baidu.com)Support
h2m supports standard Markdown sytax: CommonMark now and Markdown Extra.
CommonMark
br
em
strong
code
a
img
hr
ul, ol
pre
div
p
blockquote
h1 ~ h6
Markdown Extra
Special Attributes for headers link and image
Fenced Code Blocks
dl, dt, dd Definition Lists
abbr Abbreviations
table
SEM修炼手册:百度竞价、信息流广告、数据分析与专题页策划实战详解
陈丰洲 / 电子工业出版社 / 2018-10 / 59.80元
SEM人员在职场打拼的过程中,会遇到一个又一个坑,《SEM修炼手册:百度竞价、信息流广告、数据分析与专题页策划实战详解》尝试站在一定的高度,将从业者从专员走向管理岗位过程中可能碰到的问题进行整理,不仅谈竞价推广,也谈基于SEM的营销体系。 《SEM修炼手册:百度竞价、信息流广告、数据分析与专题页策划实战详解》包括11章内容,由浅入深地分享SEM的进阶过程。第1章是SEM概述,让读者对SEM有......一起来看看 《SEM修炼手册:百度竞价、信息流广告、数据分析与专题页策划实战详解》 这本书的介绍吧!
