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编程语言

Download history 142/week @ 2024-05-12 46/week @ 2024-05-19 210/week @ 2024-05-26 47/week @ 2024-06-02 26/week @ 2024-06-09 16/week @ 2024-06-16 3/week @ 2024-06-23 8/week @ 2024-06-30 12/week @ 2024-07-07 9/week @ 2024-07-14 18/week @ 2024-07-21 39/week @ 2024-07-28 5/week @ 2024-08-04 8/week @ 2024-08-11 5/week @ 2024-08-18

每月59次下载
5 个crate中 使用

MIT 许可证

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