From 3ba69edab5f0c787424dac9649e43a7743da13ca Mon Sep 17 00:00:00 2001 From: Srivathsan Murali Date: Sun, 3 Nov 2019 13:51:14 +0100 Subject: 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. --- templates/forward_as_body | 2 ++ templates/quoted_reply | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 templates/forward_as_body create mode 100644 templates/quoted_reply (limited to 'templates') diff --git a/templates/forward_as_body b/templates/forward_as_body new file mode 100644 index 0000000..a487224 --- /dev/null +++ b/templates/forward_as_body @@ -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}} diff --git a/templates/quoted_reply b/templates/quoted_reply new file mode 100644 index 0000000..ee4e1f7 --- /dev/null +++ b/templates/quoted_reply @@ -0,0 +1,2 @@ +on {{dateFormat .OriginalDate "Mon Jan 2, 2006 at 3:04 PM"}}, {{(index .OriginalFrom 0).Name}} wrote: +{{quote .OriginalText}} -- cgit v1.2.3