aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/template/text.tpl
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2021-02-16 19:24:33 +0100
committerRené 'Necoro' Neumann <necoro@necoro.eu>2021-02-16 19:24:33 +0100
commitb41368462c89dbfc5230350c46629266f03ad9d5 (patch)
treea3f2e0b0918c2b68ae29f9c5b235878b4494c644 /internal/feed/template/text.tpl
parent3a854c3bc47e75491b836c7fc12b617da5d68288 (diff)
downloadfeed2imap-go-b41368462c89dbfc5230350c46629266f03ad9d5.tar.gz
feed2imap-go-b41368462c89dbfc5230350c46629266f03ad9d5.tar.bz2
feed2imap-go-b41368462c89dbfc5230350c46629266f03ad9d5.zip
Use go-embed for templates instead of inline strings.
They should also use CRLF (cf issue #46).
Diffstat (limited to 'internal/feed/template/text.tpl')
-rw-r--r--internal/feed/template/text.tpl37
1 files changed, 37 insertions, 0 deletions
diff --git a/internal/feed/template/text.tpl b/internal/feed/template/text.tpl
new file mode 100644
index 0000000..57eef18
--- /dev/null
+++ b/internal/feed/template/text.tpl
@@ -0,0 +1,37 @@
+{{- /*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 -}} \ No newline at end of file
/internal/feed/cache_v1.go?h=v1.4.0&id=12e4af7b3b73cbcbbd2f0adfea456db540743cf2&follow=1'>Print item hashes in debug modeRené 'Necoro' Neumann1-1/+7 2020-05-07Improve html renderingRené 'Necoro' Neumann2-53/+32 2020-05-07Do not assume items to be new when their published date is newer than the las...René 'Necoro' Neumann2-7/+1 2020-05-07Updating some depsRené 'Necoro' Neumann2-2/+7 2020-05-07Better detection if a text starts with html or notRené 'Necoro' Neumann2-4/+13 2020-05-07go fmtRené 'Necoro' Neumann1-3/+2 2020-05-07Add header X-Feed2Imap-GUIDRené 'Necoro' Neumann3-1/+7 2020-05-07update changelogRené 'Necoro' Neumann1-0/+1 2020-05-07FixRené 'Necoro' Neumann1-1/+1 2020-05-07Unified publishedDate and updatedDate into one (just as the old feed2imap...)René 'Necoro' Neumann5-21/+32 2020-05-06Print version during startupRené 'Necoro' Neumann1-1/+1 2020-05-06Improve templateRené 'Necoro' Neumann3-20/+28 2020-05-05Fix pipelineRené 'Necoro' Neumann1-2/+5 2020-05-05Make changelog a part of the release pipeline (untested)René 'Necoro' Neumann2-0/+12