commit faff2b35e0ab46674e846262710ef250226812b9
parent f6681eb313dec93677c7aa8e93b0bf21ba6f4032
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sun, 23 Mar 2025 11:19:17 +0100
feat: add OPML files for each feed
Diffstat:
5 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/01_pulse.yaml b/01_pulse.yaml
@@ -2,12 +2,12 @@ title: Pulse
description: Current news with high frequency.
url: https://news.jayvii.de/pulse.html
entries: 500
-entries_per_feed: 10
+entries_per_feed: 15
entries_sort_order: "issued"
author:
name: JayVii
email: jayvii+newsplanet[AT]posteo[DOT]de
-opml: pulse.opml
+opml_file: pulse.opml.xml
page:
file: pulse.html
template: template.tt
diff --git a/02_tide.yaml b/02_tide.yaml
@@ -7,7 +7,7 @@ entries_sort_order: "issued"
author:
name: JayVii
email: jayvii+newsplanet[AT]posteo[DOT]de
-opml: tide.opml
+opml_file: tide.opml.xml
page:
file: tide.html
template: template.tt
diff --git a/99_net.yaml b/99_net.yaml
@@ -7,7 +7,7 @@ entries_sort_order: "issued"
author:
name: JayVii
email: jayvii+newsplanet[AT]posteo[DOT]de
-opml: net.opml
+opml_file: net.opml.xml
page:
file: net.html
template: template.tt
diff --git a/run.sh b/run.sh
@@ -11,6 +11,7 @@ fi
printf "Gather information from ${CONFIG}...\n"
HTML=`grep -E '^\s+file:.*?\.html\s*$' "$CONFIG" | awk '{ print $NF }'`
XML=`grep -E '^\s+file:.*?\.xml\s*$' "$CONFIG" | awk '{ print $NF }'`
+OPML=`grep -E '^opml_file:.*?\.xml\s*$' "$CONFIG" | awk '{ print $NF }'`
TITLES=`grep -E "^\s*-*\ title:" "$CONFIG" | sed -e 's/^.*title:\ //g'`
# URLS=`grep -E "^\s*-*\ url:" "$CONFIG" | sed -e 's/^.*url:\ //g'`
WEBS=`grep -E "^\s*-*\ web:" "$CONFIG" | sed -e 's/^.*web:\ //g'`
@@ -37,6 +38,10 @@ sed -E \
printf "Inserting RSS feed file...\n"
sed -E -e "s/<\!--XML-->/\"$XML\"/" -i "$HTML"
+# insert link to opml/xml file
+printf "Inserting OPML feed file...\n"
+sed -E -e "s/<\!--OPML-->/\"$OPML\"/" -i "$HTML"
+
# insert link to manifest JSON file
printf "Inserting manifest file...\n"
MANIFEST=`echo "$HTML" | sed -e 's/html/json/'`
diff --git a/template.tt b/template.tt
@@ -57,6 +57,12 @@
<!-- This is updated by find-and-replace-->
<details>
<summary style="width:100%;">Feeds</summary>
+ <a
+ href="<!--OPML-->"
+ class="button"
+ title="Import all these feeds into your own RSS reader">
+ Download OPML
+ </a>
<div style="margin-left:1em;">
<!--FEEDS-->
</div>