Example: RSS feed
This commit is contained in:
+33
-11
@@ -1,6 +1,5 @@
|
||||
%rec: example
|
||||
%key: name
|
||||
%type: note line
|
||||
|
||||
name: Default systemd service file
|
||||
filename: default.service
|
||||
@@ -148,9 +147,7 @@ content: ### Variables
|
||||
+
|
||||
+ .PHONY: help
|
||||
+ help:
|
||||
+ @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
|
||||
+ sort | \
|
||||
+ column -s ':' -t
|
||||
+ @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | + sort | + column -s ':' -t
|
||||
+
|
||||
+ .PHONY: check
|
||||
+ 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[0m %s " "Close $$(basename -s .md $(last_modified) | tr '_' ' ')"
|
||||
+ @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) | \
|
||||
+ column -s ':' -t
|
||||
+ @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | + column -s ':' -t
|
||||
+
|
||||
+ $(closed_issues): closed/%.md: open/%.md
|
||||
+ @git add $<
|
||||
@@ -249,8 +245,34 @@ content: hdr = @printf "\n\033[37;1;4m%s\033[0m\n"
|
||||
+ .PHONY: rundown
|
||||
+ rundown: ## Summarize events
|
||||
+ @printf "\033[33;5m# %s\033[0m\n" "Outstanding Calamities"
|
||||
+ @$(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)" ;\
|
||||
+ )
|
||||
+ @$(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)" ;+ )
|
||||
|
||||
name: RSS feed
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user