about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-07-20 11:50:38 -0500
committerCase Duckworth2022-07-20 11:51:23 -0500
commit3873860a0fd662ab1033998b61e4a83984de02cc (patch)
treed732da3daefa0807318d29d10bf34743d4dc4d6e
parentAdd feed suggester (diff)
downloadsfeed-3873860a0fd662ab1033998b61e4a83984de02cc.tar.gz
sfeed-3873860a0fd662ab1033998b61e4a83984de02cc.zip
Add twtxt
-rwxr-xr-xrunsfeed10
-rwxr-xr-xsfeed_html.sh3
2 files changed, 12 insertions, 1 deletions
diff --git a/runsfeed b/runsfeed index 4c1aef0..481acc0 100755 --- a/runsfeed +++ b/runsfeed
@@ -47,8 +47,12 @@ main() {
47 }' 47 }'
48 logok "Generating OPML" '{ 48 logok "Generating OPML" '{
49 opml "$sfeedrc" >/tmp/feeds.opml && 49 opml "$sfeedrc" >/tmp/feeds.opml &&
50 mv /tmp/feeds.opml "$SFEED_OUTPUT/feeds.opml"; 50 mv /tmp/feeds.opml "$SFEED_OUTPUT/feeds.opml";
51 }' 51 }'
52 logok "Generating twtxt" '{
53 twtxt "$sfeedrc" >/tmp/feeds.txt &&
54 mv /tmp/feeds.txt "$SFEED_OUTPUT/feeds.txt";
55 }'
52 # logok "Archiving old feeds" \ 56 # logok "Archiving old feeds" \
53 # archive "$sfeedpath"/* 57 # archive "$sfeedpath"/*
54 if [ -f /tmp/runsfeed.ok ]; then 58 if [ -f /tmp/runsfeed.ok ]; then
@@ -102,6 +106,10 @@ update() {
102 runcmd sfeed_update_xargs "$@" 106 runcmd sfeed_update_xargs "$@"
103} 107}
104 108
109twtxt() {
110 sfeed_twtxt "$@"
111}
112
105opml() { 113opml() {
106 sfeed_opml_export "$@" 114 sfeed_opml_export "$@"
107} 115}
diff --git a/sfeed_html.sh b/sfeed_html.sh index 5b114d8..3d96584 100755 --- a/sfeed_html.sh +++ b/sfeed_html.sh
@@ -24,6 +24,8 @@ Planet ACDW</h1>
24// 24//
25<a href="feeds-short.xml">rss (short)</a> 25<a href="feeds-short.xml">rss (short)</a>
26// 26//
27<a href="feeds.txt">twtxt</a>
28//
27<a href="feeds.opml">opml</a> 29<a href="feeds.opml">opml</a>
28</nav> 30</nav>
29<main> 31<main>
@@ -56,6 +58,7 @@ html_head() {
56<link rel="alternate" type="application/atom+xml" title="rss (full)" href="feeds.xml"> 58<link rel="alternate" type="application/atom+xml" title="rss (full)" href="feeds.xml">
57<link rel="alternate" type="application/atom+xml" title="rss (short)" href="feeds-short.xml"> 59<link rel="alternate" type="application/atom+xml" title="rss (short)" href="feeds-short.xml">
58<link rel="alternate" type="application/xml" title="opml" href="feeds.opml"> 60<link rel="alternate" type="application/xml" title="opml" href="feeds.opml">
61<link rel="alternate" type="text/plain" title="twtxt" href="feeds.txt">
59</head> 62</head>
60EOF 63EOF
61} 64}