aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/template/text.tpl.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-10 22:07:17 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-10 22:07:17 +0200
commit5e5d848b1324cc5ea3991276f2a0750883e5aab0 (patch)
tree50135bb4613d5486225b7cf90e409e4209bf9a76 /internal/feed/template/text.tpl.go
parent26c4cd410eee27c6e5764d991d3f495635c87faf (diff)
downloadfeed2imap-go-5e5d848b1324cc5ea3991276f2a0750883e5aab0.tar.gz
feed2imap-go-5e5d848b1324cc5ea3991276f2a0750883e5aab0.tar.bz2
feed2imap-go-5e5d848b1324cc5ea3991276f2a0750883e5aab0.zip
Text part in emails
Diffstat (limited to 'internal/feed/template/text.tpl.go')
-rw-r--r--internal/feed/template/text.tpl.go42
1 files changed, 42 insertions, 0 deletions
diff --git a/internal/feed/template/text.tpl.go b/internal/feed/template/text.tpl.go
new file mode 100644
index 0000000..0c10334
--- /dev/null
+++ b/internal/feed/template/text.tpl.go
@@ -0,0 +1,42 @@
+package template
+
+var Text = fromString("Feed", textTpl, false)
+
+//noinspection HtmlDeprecatedAttribute,HtmlUnknownTarget
+const textTpl = `{{- /*gotype:github.com/Necoro/feed2imap-go/internal/feed.feeditem*/ -}}
+{{- with .Item.Link -}}
+<{{.}}>
+
+{{ end -}}
+{{- with .TextBody -}}
+{{.}}
+{{ end -}}
+{{- with .Item.Enclosures -}}
+Files:
+ {{- range . -}}
+ {{- .URL}} ({{with .Length}}{{. | byteCount}}, {{end}}{{.Type}})
+ {{- end -}}
+{{- end}}
+--
+Feed: {{ with .Feed.Title -}}{{.}}{{- end }}
+{{ with .Feed.Link -}}
+ <{{.}}>
+{{end -}}
+Item: {{ with .Item.Title -}}
+ {{.}}
+{{- end }}
+{{ with .Item.Link -}}
+ <{{.}}>
+{{end -}}
+{{ with .Date -}}
+ Date: {{.}}
+{{ end -}}
+{{ with .Creator -}}
+ Author: {{.}}
+{{ end -}}
+{{ with (join ", " .Categories) -}}
+ Filed under: {{.}}
+{{ end -}}
+{{ with .FeedLink -}}
+ Feed-Link: {{.}}
+{{ end -}}`