Add Templates with Parsing

+ Changes NewComposer to return error.
+ Add lib to handle templates using "text/template".
+ Add -T option to following commands
    - compose.
    - reply
    - forward
+ Quoted replies using templates.
+ Forwards as body using templates
+ Default templates are installed similar to filters.
+ Templates Config in aerc.conf.
    - Required templates are parsed while loading config.
+ Add aerc-templates.7 manual for using template data.
This commit is contained in:
Srivathsan Murali 2019-11-03 13:51:14 +01:00 committed by Drew DeVault
parent ad68a9e4e4
commit 3ba69edab5
14 changed files with 510 additions and 143 deletions

View file

@ -0,0 +1,2 @@
Forwarded message from {{(index .OriginalFrom 0).Name}} on {{dateFormat .OriginalDate "Mon Jan 2, 2006 at 3:04 PM"}}:
{{wrapText .OriginalText 72}}

2
templates/quoted_reply Normal file
View file

@ -0,0 +1,2 @@
on {{dateFormat .OriginalDate "Mon Jan 2, 2006 at 3:04 PM"}}, {{(index .OriginalFrom 0).Name}} wrote:
{{quote .OriginalText}}