Example: RSS feed

This commit is contained in:
2026-06-11 14:01:57 +02:00
parent 668d605dcb
commit fe1c524dc3
+33 -11
View File
@@ -1,6 +1,5 @@
%rec: example %rec: example
%key: name %key: name
%type: note line
name: Default systemd service file name: Default systemd service file
filename: default.service filename: default.service
@@ -148,9 +147,7 @@ content: ### Variables
+ +
+ .PHONY: help + .PHONY: help
+ help: + help:
+ @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \ + @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | + sort | + column -s ':' -t
+ sort | \
+ column -s ':' -t
+ +
+ .PHONY: check + .PHONY: check
+ check: ## Check you have the required dependencies + check: ## Check you have the required dependencies
@@ -209,8 +206,7 @@ content: hdr = @printf "\n\033[37;1;4m%s\033[0m\n"
+ @printf "\033[36m%s\t" "done" + @printf "\033[36m%s\t" "done"
+ @printf "\033[0m %s " "Close $$(basename -s .md $(last_modified) | tr '_' ' ')" + @printf "\033[0m %s " "Close $$(basename -s .md $(last_modified) | tr '_' ' ')"
+ @printf "\033[0m %s\n" "[$$(grep -Pom1 'title: \K.*' $(last_modified))]" + @printf "\033[0m %s\n" "[$$(grep -Pom1 'title: \K.*' $(last_modified))]"
+ @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \ + @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | + column -s ':' -t
+ column -s ':' -t
+ +
+ $(closed_issues): closed/%.md: open/%.md + $(closed_issues): closed/%.md: open/%.md
+ @git add $< + @git add $<
@@ -249,8 +245,34 @@ content: hdr = @printf "\n\033[37;1;4m%s\033[0m\n"
+ .PHONY: rundown + .PHONY: rundown
+ rundown: ## Summarize events + rundown: ## Summarize events
+ @printf "\033[33;5m# %s\033[0m\n" "Outstanding Calamities" + @printf "\033[33;5m# %s\033[0m\n" "Outstanding Calamities"
+ @$(foreach bug, $(wildcard open/*.md), \ + @$(foreach bug, $(wildcard open/*.md), + a="$$(lowdown -X responsible $(bug))" && + n="$$(echo $(bug) | cut -d_ -f2 | cut -d. -f1)" && + t="$$(lowdown -X title $(bug))" && echo "$$n: $$t ($$a)" ;+ )
+ a="$$(lowdown -X responsible $(bug))" && \
+ n="$$(echo $(bug) | cut -d_ -f2 | cut -d. -f1)" && \ name: RSS feed
+ t="$$(lowdown -X title $(bug))" && echo "$$n: $$t ($$a)" ;\ filename: rss.xml
+ ) note: Only 'description', 'link', and 'title' are required.
+
+ Extra fields include 'textInput' (for a paragraph about the feed), 'skipHours' (for the hours to wait before refreshing), and 'language'.
content: <?xml version="1.0" encoding="UTF-8" ?>
+ <rss version="2.0">
+
+ <channel>
+ <title>{{title}}</title>
+ <link>{{url}}</link>
+ <generator>Recutils</generator>
+ <docs>https://www.w3schools.com/XML/xml_rss.asp</docs>
+ <skipDays>{{frequency}}</skipDays>
+ <description>{{description}}</description>
note: Output the next content field separately to produce multiple post items.
content: <item>
+ <guid>{{post_id}}</guid>
+ <category>{{post_category}}</category>
+ <pubDate>{{post_date}}</pubDate>
+ <title>{{post_title}}</title>
+ <link>{{url}}/{{post_link}}</link>
+ <description>{{post_description}}</description>
+ <source>{{post_source}}</source>
+ </item>
note: The last content field closes the XML tags opened in the first content field.
content: </channel>
+
+ </rss>