paperboy icon indicating copy to clipboard operation
paperboy copied to clipboard

Configure name and email fields content

Open gbonnefille opened this issue 1 year ago • 1 comments

With CVS as recipient list (#1 ) it is possible to have a lesser control over the column's names or the columns contents.

For example, when extracting a list of contact from an other tool, perhaps will I have one column for name and one column for surname. Thus, I wish to be able to configure paperboy in order it create the Name field form two other fields.

An other example: perhaps I do not have the email directly, but only the username of each contact. So I wish to configure paperboy in order to create the email from the username + "@example.com".

Proposition

I suggest to add two options:

  • --name-template
  • --email-template

Both accept a string. These strings are used as text/template and the template is executed against the already read user's data.

For example:

paperboy ... --name-template "{{FirstName}} {{LastName}}" --email-template "{{UserName}}@xample.com"

gbonnefille avatar Nov 05 '24 12:11 gbonnefille

@gbonnefille I like this idea, but rather than configuring this as CLI flags, what do you think about putting this configuration in the "frontmatter" (configuration prefix) inside of the recipient file?

rykov avatar Jun 20 '25 23:06 rykov

Implemented in v0.4.0 as "To" template in frontmatter

rykov avatar Sep 22 '25 03:09 rykov