diff options
author | Leszek CimaĆa <ernierasta@zori.cz> | 2020-01-08 21:44:18 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-01-09 14:31:19 -0500 |
commit | bf0f72a533d5c1868b9819f769836ea22d5fa583 (patch) | |
tree | d120574b57481fd5700c1ce3c12ad4a08bbeef4d /doc | |
parent | fe9ec67eca201c75c09f1ef7ff51ac189de3a4d4 (diff) |
template: add exec and wrap
Diffstat (limited to 'doc')
-rw-r--r-- | doc/aerc-templates.7.scd | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/doc/aerc-templates.7.scd b/doc/aerc-templates.7.scd index 9382f2e..adcc85c 100644 --- a/doc/aerc-templates.7.scd +++ b/doc/aerc-templates.7.scd @@ -72,20 +72,33 @@ available always. Example: - _wrapText_ function can be used to wrap the original text to a number + _wrap_ function can be used to wrap the original text to a number of characters per line. ``` - {{wrapText .OriginalText 72}} + {{wrap 72 .OriginalText}} ``` _quote_ function prepends each line with "> ". ``` {{quote .OriginalText}} ``` + _exec_ function execute external command to process message. + ``` + {{exec `/usr/local/share/aerc/filters/html`}} + ``` + + All of the above can be chained together if needed, for example. + ``` + {{exec `/usr/local/share/aerc/filters/html` .OriginalText | wrap 72 | quote}} + ``` - All of the above can be chained together if needed, for example + Automatic HTML parsing can be achieved. ``` - {{wrapText .OriginalText 72 | quote}} + {{if eq .OriginalMIMEType "text/html"}} + {{exec `/usr/local/share/aerc/filters/html` .OriginalText | wrap 72 | quote}} + {{else}} + {{wrap 72 .OriginalText | quote}} + {{end}} ``` # SEE ALSO |