#link #emacs #org-mode #string #parser #hyperlink

emacs-org-link-parser

用于解析字符串中 Emacs Org-mode 超链接的库

1 个不稳定版本

0.1.0 2022年3月25日

#9#hyperlink

Download history 19/week @ 2024-03-11 3/week @ 2024-03-18 5/week @ 2024-03-25 32/week @ 2024-04-01 9/week @ 2024-04-22 1/week @ 2024-05-06 1/week @ 2024-05-20 13/week @ 2024-05-27 22/week @ 2024-06-03 21/week @ 2024-06-10 15/week @ 2024-06-17 19/week @ 2024-06-24

79 每月下载量

GPL-3.0-or-later

15KB

Emacs Org Link Parser

这是一个 Rust 库,用于解析格式为 Emacs Org-mode 超链接 的链接。

示例用法

use emacs_org_link_parser as org;

fn main() {
    let line_to_parse = "*** [[#mycookbook][page 3]] dumplings, [[www.best-sauce.com][sauce here: number 4]] [[#pictures][how it looks]] [[forum.com]]";

    let parsed: Vec<org::Link> = org::parse_line(line_to_parse);

    println!("{:?}", parsed);
}

预期输出

[Link { link: Some("#mycookbook"), description: Some("page 3") }, Link { link: Some("www.best-sauce.com"), description: Some("sauce here: number 4") }, Link { link: Some("#pictures"), description: Some("how it looks") }, Link { link: Some("forum.com"), description: None }]

lib.rs:

Emacs Org Link Parser

这是一个 Rust 库,用于解析格式为 Emacs Org-mode 超链接 的链接。

示例用法

use emacs_org_link_parser as org;

fn main() {
    let line_to_parse = "*** [[#mycookbook][page 3]] dumplings, [[www.best-sauce.com][sauce here: number 4]] [[#pictures][how it looks]] [[forum.com]]";

    let parsed: Vec<org::Link> = org::parse_line(line_to_parse);

    println!("{:?}", parsed);
}

预期输出

[Link { link: Some("#mycookbook"), description: Some("page 3") }, Link { link: Some("www.best-sauce.com"), description: Some("sauce here: number 4") }, Link { link: Some("#pictures"), description: Some("how it looks") }, Link { link: Some("forum.com"), description: None }]

无运行时依赖