authors 1.0.0

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

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