#parser #author #metadata

cargo_author

Parse author fields (name <email> (url)) used by Cargo and npm

6 stable releases

1.0.7 Dec 8, 2023
1.0.6 Sep 3, 2022
1.0.4 Feb 1, 2021
1.0.2 Apr 18, 2019
1.0.0 Jun 15, 2018

#884 in Parser implementations

Download history 75/week @ 2024-12-11 89/week @ 2024-12-18 13/week @ 2025-01-01 8/week @ 2025-01-22 6/week @ 2025-01-29 24/week @ 2025-02-05 76/week @ 2025-02-12 133/week @ 2025-02-19 47/week @ 2025-02-26 100/week @ 2025-03-05 170/week @ 2025-03-12 155/week @ 2025-03-19 16/week @ 2025-03-26

461 downloads per month
Used in 10 crates (5 directly)

Apache-2.0 OR MIT

7KB
109 lines

Parse authors in Cargo.toml and similar

This parses names in the format Name <email> (url) used in Cargo.toml metadata (also in npm).

This crate tries to parse any field in any order and to fix common errors to salvage as much data as possible.

To read the authors key from Cargo.toml you'll need cargo_toml crate. Once you have the author names, parse them by calling Author::new(string).

Dependencies

~3.5–5MB
~100K SLoC