【文件属性】:
文件名称:plain:D库将HTML转换为纯文本
文件大小:6KB
文件格式:ZIP
更新时间:2021-05-18 20:04:04
D
清楚的
500个库,可将HTML转换为纯文本。
这对于从HTML电子邮件生成纯文本替代很有用。 它不处理复杂的布局,但对于电子邮件来说却相当不错。
使用 。
选项:
struct Options {
uint wrap = 78 ; // wrap column
uint indent; // global indent
dchar listMarker = ' * ' ; // list item decorator
string baseHRef; // base URL for local hrefs
string [] skipElements; // CSS selector of elements to skip
}
用法示例:
import plain;
auto text = toplain( `
<html>
<body>
【文件预览】:
plain-master
----.gitignore(38B)
----dub.json(273B)
----src()
--------plain()
----LICENSE(1KB)
----README.md(5KB)
----.editorconfig(164B)