#author #name #list #format

bin+lib authors

Print and format authors from ["name <email>"] lists

1 stable release

Uses new Rust 2024

1.0.0 Jan 12, 2026

#286 in Email

MIT/Apache

16KB
338 lines

authors

Print and format authors from ["name "] lists

Motivation

This utility is meant to be used in a pipeline with toml-path, for extracting only the names of authors without the emails

$ toml-path --raw-output .package.authors Cargo.toml | authors --names
Adam Gaia

Usage

  • Without any flags, this utility is redundant
$ authors "foo <foo@bar.com>, foo2 <foo2@bar.com>"
foo <foo@bar.com>, foo2 <foo2@bar.com>

  • Print names only
$ authors --names "foo <foo@bar.com>, foo2 <foo2@bar.com>"
foo, foo2

  • Print emails only
$ authors --emails "foo <foo@bar.com>, foo2 <foo2@bar.com>"
foo@bar.com, foo2@bar.com

  • Piping to stdin instead of proving an input argument works too
$ echo "foo <foo@bar.com>, foo2 <foo2@bar.com>" | authors --names
foo, foo2

Dependencies

~4–5.5MB
~103K SLoC