summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuetow.org.sh23
-rw-r--r--content/gemtext/gemfeed/atom.xml12
-rw-r--r--content/html/gemfeed/atom.xml12
-rw-r--r--content/meta/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.meta8
-rw-r--r--content/meta/gemfeed/2021-04-24-welcome-to-the-geminispace.meta8
5 files changed, 31 insertions, 32 deletions
diff --git a/buetow.org.sh b/buetow.org.sh
index 5bc2cea..dc4ade4 100755
--- a/buetow.org.sh
+++ b/buetow.org.sh
@@ -35,23 +35,21 @@ atom::meta () {
if [ ! -f $meta_file ]; then
# Extract first heading as post title.
- local title=$(sed -n '/^# / { s/# //; p; q; }' $gmi_file_path)
+ local title=$(sed -n '/^# / { s/# //; p; q; }' $gmi_file_path | tr '"' "'")
# Extract first paragraph from Gemtext
- local summary=$(sed -n '/^[A-Z]/ { p; q; }' $gmi_file_path)
+ local summary=$(sed -n '/^[A-Z]/ { p; q; }' $gmi_file_path | tr '"' "'")
- echo 'local meta_post_is_new=1'
cat <<META | tee $meta_file
local meta_date=$now
-local meta_author='$AUTHOR'
+local meta_author="$AUTHOR"
local meta_email=$EMAIL
-local meta_title='$title'
-local meta_summary='$summary...'
+local meta_title="$title"
+local meta_summary="$summary"
META
git add $meta_file
return
fi
- echo 'local meta_post_is_new=0'
cat $meta_file
}
@@ -59,23 +57,21 @@ atom::generate () {
local -r gemfeed_dir=$CONTENT_DIR/gemtext/gemfeed
local -r atom_file=$gemfeed_dir/atom.xml
local -r now=$(date --iso-8601=seconds)
- local -i changed=0
cat <<ATOMHEADER > $atom_file.tmp
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
+ <updated>$now</updated>
<title>$DOMAIN feed</title>
<subtitle>$SUBTITLE</subtitle>
- <link href="gemini://$DOMAIN/gemfeed/" rel="self" />
+ <link href="gemini://$DOMAIN/gemfeed/atom.xml" rel="self" />
<link href="gemini://$DOMAIN/" />
<id>gemini://$DOMAIN/</id>
- <updated>$now</updated>
ATOMHEADER
while read gmi_file; do
# Load cached meta information about the post.
source <(atom::meta $now $gemfeed_dir/$gmi_file)
- test $meta_post_is_new -eq 1 && changed=1
cat <<ATOMENTRY >> $atom_file.tmp
<entry>
@@ -96,7 +92,10 @@ ATOMENTRY
</feed>
ATOMFOOTER
- if [ $changed -eq 1 ]; then
+ # Delete the 3rd line of the atom feeds (global feed update timestamp)
+ diff -u <(sed 3d $atom_file.tmp) <(sed 3d $atom_file)
+
+ if [ $? -ne 0 ]; then
echo "Feed got something new!"
mv $atom_file.tmp $atom_file
git add $atom_file
diff --git a/content/gemtext/gemfeed/atom.xml b/content/gemtext/gemfeed/atom.xml
index a0f529c..5b22caa 100644
--- a/content/gemtext/gemfeed/atom.xml
+++ b/content/gemtext/gemfeed/atom.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
+ <updated>2021-04-30T19:36:42+01:00</updated>
<title>buetow.org feed</title>
<subtitle>Having fun with computers!</subtitle>
- <link href="gemini://buetow.org/gemfeed/" rel="self" />
+ <link href="gemini://buetow.org/gemfeed/atom.xml" rel="self" />
<link href="gemini://buetow.org/" />
<id>gemini://buetow.org/</id>
- <updated>2021-04-30T10:04:15+01:00</updated>
<entry>
<title>Welcome to the Geminispace</title>
<link href="gemini://buetow.org/gemfeed/2021-04-24-welcome-to-the-geminispace.gmi" />
<id>gemini://buetow.org/gemfeed/2021-04-24-welcome-to-the-geminispace.gmi</id>
- <updated>2021-04-30T10:04:15+01:00</updated>
- <summary></summary>
+ <updated>2021-04-24T19:28:41+01:00</updated>
+ <summary>Have you reached this article already via Gemini? You need a special client for that, web browsers such as Firefox, Chrome, Safari etc. don't support the Gemini protocol. The Gemini address of this site (or the address of this capsule as people say in Geminispace) is:</summary>
<author>
<name>Paul Buetow</name>
<email>comments@mx.buetow.org</email>
@@ -21,8 +21,8 @@
<title>DTail - The distributed log tail program</title>
<link href="gemini://buetow.org/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.gmi" />
<id>gemini://buetow.org/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.gmi</id>
- <updated>2021-04-30T10:04:15+01:00</updated>
- <summary>This article first appeared at the Mimecast Engineering Blog but I made it available here in my personal Gemini capsule too....</summary>
+ <updated>2021-04-22T19:28:41+01:00</updated>
+ <summary>This article first appeared at the Mimecast Engineering Blog but I made it available here in my personal Gemini capsule too.</summary>
<author>
<name>Paul Buetow</name>
<email>comments@mx.buetow.org</email>
diff --git a/content/html/gemfeed/atom.xml b/content/html/gemfeed/atom.xml
index 41a0313..eabb600 100644
--- a/content/html/gemfeed/atom.xml
+++ b/content/html/gemfeed/atom.xml
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
+ <updated>2021-04-30T19:36:42+01:00</updated>
<title>buetow.org feed</title>
<subtitle>Having fun with computers!</subtitle>
- <link href="http://buetow.org/gemfeed/" rel="self" />
+ <link href="http://buetow.org/gemfeed/atom.xml" rel="self" />
<link href="http://buetow.org/" />
<id>http://buetow.org/</id>
- <updated>2021-04-30T10:04:15+01:00</updated>
<entry>
<title>Welcome to the Geminispace</title>
<link href="http://buetow.org/gemfeed/2021-04-24-welcome-to-the-geminispace.html" />
<id>http://buetow.org/gemfeed/2021-04-24-welcome-to-the-geminispace.html</id>
- <updated>2021-04-30T10:04:15+01:00</updated>
- <summary></summary>
+ <updated>2021-04-24T19:28:41+01:00</updated>
+ <summary>Have you reached this article already via Gemini? You need a special client for that, web browsers such as Firefox, Chrome, Safari etc. don't support the Gemini protocol. The Gemini address of this site (or the address of this capsule as people say in Geminispace) is:</summary>
<author>
<name>Paul Buetow</name>
<email>comments@mx.buetow.org</email>
@@ -21,8 +21,8 @@
<title>DTail - The distributed log tail program</title>
<link href="http://buetow.org/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.html" />
<id>http://buetow.org/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.html</id>
- <updated>2021-04-30T10:04:15+01:00</updated>
- <summary>This article first appeared at the Mimecast Engineering Blog but I made it available here in my personal Gemini capsule too....</summary>
+ <updated>2021-04-22T19:28:41+01:00</updated>
+ <summary>This article first appeared at the Mimecast Engineering Blog but I made it available here in my personal Gemini capsule too.</summary>
<author>
<name>Paul Buetow</name>
<email>comments@mx.buetow.org</email>
diff --git a/content/meta/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.meta b/content/meta/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.meta
index dd957e3..585998d 100644
--- a/content/meta/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.meta
+++ b/content/meta/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.meta
@@ -1,5 +1,5 @@
-local meta_date=2021-04-30T10:04:15+01:00
-local meta_author='Paul Buetow'
+local meta_date=2021-04-22T19:28:41+01:00
+local meta_author="Paul Buetow"
local meta_email=comments@mx.buetow.org
-local meta_title='DTail - The distributed log tail program'
-local meta_summary='This article first appeared at the Mimecast Engineering Blog but I made it available here in my personal Gemini capsule too....'
+local meta_title="DTail - The distributed log tail program"
+local meta_summary="This article first appeared at the Mimecast Engineering Blog but I made it available here in my personal Gemini capsule too."
diff --git a/content/meta/gemfeed/2021-04-24-welcome-to-the-geminispace.meta b/content/meta/gemfeed/2021-04-24-welcome-to-the-geminispace.meta
index fd1f344..81555bf 100644
--- a/content/meta/gemfeed/2021-04-24-welcome-to-the-geminispace.meta
+++ b/content/meta/gemfeed/2021-04-24-welcome-to-the-geminispace.meta
@@ -1,5 +1,5 @@
-local meta_date=2021-04-30T10:04:15+01:00
-local meta_author='Paul Buetow'
+local meta_date=2021-04-24T19:28:41+01:00
+local meta_author="Paul Buetow"
local meta_email=comments@mx.buetow.org
-local meta_title='Welcome to the Geminispace'
-local meta_summary='Have you reached this article already via Gemini? You need a special client for that, web browsers such as Firefox, Chrome, Safari etc. don't support the Gemini protocol. The Gemini address of this site (or the address of this capsule as people say in Geminispace) is:...'
+local meta_title="Welcome to the Geminispace"
+local meta_summary="Have you reached this article already via Gemini? You need a special client for that, web browsers such as Firefox, Chrome, Safari etc. don't support the Gemini protocol. The Gemini address of this site (or the address of this capsule as people say in Geminispace) is:"