9个版本 (4个重大更新)
0.5.1 | 2024年5月31日 |
---|---|
0.5.0 | 2024年5月14日 |
0.4.0 | 2024年4月24日 |
0.3.4 | 2024年4月23日 |
0.1.0 | 2024年3月28日 |
176 在 编程语言 中
每月59次下载
在 5 个crate中 使用
59KB
2K SLoC
🤓 Asciidork
用Rust编写的Asciidoc解析器/后端
安装
# requires rust/cargo toolchain
cargo install asciidork-cli
或从源安装
git clone https://github.com/jaredh159/asciidork
cd asciidork
cargo build --release --bins
# vvvv -- OPTIONAL: or use rel path to `./target/release/asciidork` instead
sudo cp ./target/release/asciidork /usr/local/bin
用法
# read the friendly manual
asciidork --help
# parse/convert/print from a file
asciidork --input test.adoc
# without a --input arg, it reads from stdin
echo "foo _bar_ *baz*" | asciidork
asciidork < test.adoc
# don't include enclosing document structure by passing `--embedded`
asciidork --input test.adoc --embedded
# send output to a file (alternatively just redirect stdout)
asciidork --input test.adoc --embedded --output test.html
# print information about perf (did i mention it's written in Rust btw?)
asciidork --input test.adoc --print-timings
# print pretty html (requires `pretter` -- install w/ `npm i -g prettier`)
asciidork --input test.adoc --embedded --format dr-html-prettier
WASM
Asciidork解析器和dr-html后端编译为WASM以在浏览器中运行!(我提到它是用Rust写的吗?) NPM软件包即将推出,但目前您可以在以下链接中看到它: https://asciidork-playground.vercel.app
https://asciidork-playground.vercel.app
请确保打开开发者工具以查看计时信息。
注意事项
[!WARNING] Asciidork尚未完成。它实现了Asciidoc的大部分文档化行为,但有一些未完成区域、缺少错误处理、很多边缘情况!目前仅将其视为技术预览。
已知的 未完成或未实现 区域包括
- CSV表格
- STEM
- 源代码高亮显示
- 包含指令
- 所有实体引用
欢迎PR! 👍
依赖关系
~255–350KB