From b8c43baedc8e30d03aa356f03af9eb3b68b90675 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 20 Apr 2022 15:10:35 +0300 Subject: feat: grab openring urls from file --- Makefile | 4 ++-- compile_openring_args.sh | 5 +++++ openring-template.html | 24 +++++++++++------------- urls | 4 ++++ 4 files changed, 22 insertions(+), 15 deletions(-) create mode 100755 compile_openring_args.sh create mode 100644 urls diff --git a/Makefile b/Makefile index 210c5aa..3d48ace 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ EMOJI_SEDSTRING=$(shell ./compile_emoji_sedstring.sh) LOCALIZE_SEDSTRING=s|\"/|\"$(PWD)/|; UNLOCALIZE_SEDSTRING=s|$(PWD)||; -OPENRING_FEED="https://drewdevault.com/feed.xml" +OPENRING_ARGS=$(shell ./compile_openring_args.sh) SOURCES=$(wildcard *.md blog/*.md articles/*.md) @@ -37,7 +37,7 @@ index.html: index.md blog/preview.md | pandoc $(PANDOC_ARGS) -M pagetitle="$(TITLE)" -M description="$$DESCRIPTION"> $@ $(OPENRING_FOOTER): openring-template.html - openring -s $(OPENRING_FEED) < $< > $@ + openring $(OPENRING_ARGS) < $< > $@ blog/preview.md: blog/index.md @echo $@ diff --git a/compile_openring_args.sh b/compile_openring_args.sh new file mode 100755 index 0000000..52d6660 --- /dev/null +++ b/compile_openring_args.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# Compile args string for openring from URLS file +URLS=urls + +sed '/^$/d; s/^/-s /;' $URLS diff --git a/openring-template.html b/openring-template.html index a9f63e6..675c623 100644 --- a/openring-template.html +++ b/openring-template.html @@ -1,23 +1,25 @@ -
-

Articles from blogs I follow around the net

+
+

Articles from blogs I read

{{range .Articles}}
-

+

{{.Title}} -

+

{{.Summary}}

- +
via {{.SourceTitle}} - - {{.Date | datef "January 2, 2006"}} +
+
{{.Date | datef "January 2, 2006"}}
{{end}}
-

+

+ Generated by openring -

+
+
diff --git a/urls b/urls new file mode 100644 index 0000000..e7d6fb2 --- /dev/null +++ b/urls @@ -0,0 +1,4 @@ +https://lukesmith.xyz/rss.xml +https://drewdevault.com/blog/index.xml +https://blog.codinghorror.com/rss/ +https://100r.co/links/rss.xml -- cgit v1.2.3