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

emacs-org-link-parser

Library for parsing Emacs Org-mode hyperlinks from a string

1 unstable release

0.1.0 Mar 25, 2022

#14 in #org-mode

Download history 20/week @ 2024-11-13 20/week @ 2024-11-20 16/week @ 2024-11-27 17/week @ 2024-12-04 21/week @ 2024-12-11 12/week @ 2024-12-18 5/week @ 2024-12-25 8/week @ 2025-01-01 1/week @ 2025-01-08 7/week @ 2025-01-15 7/week @ 2025-01-22 13/week @ 2025-01-29 13/week @ 2025-02-05 36/week @ 2025-02-12 24/week @ 2025-02-19 17/week @ 2025-02-26

92 downloads per month

GPL-3.0-or-later

15KB

Emacs Org Link Parser

This is a Rust library to parse links, formatted as Emacs Org-mode hyperlinks, from a string.

Example usage:

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);
}

Expected output:

[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

This is a Rust library to parse links, formatted as Emacs Org-mode hyperlinks, from a string.

Example usage:

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);
}

Expected output:

[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 }]

No runtime deps