From 2e54355170923a0479ca86bae87b5e698ca61931 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Thu, 21 Oct 2021 23:51:16 -0400 Subject: [PATCH 1/1] txt2pre: '' in '' is required in atom feeds so use publication date for update date for atom feeds --- txt2pre | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/txt2pre b/txt2pre index 49bd164..1f04eb4 100644 --- a/txt2pre +++ b/txt2pre @@ -200,6 +200,7 @@ $title .= " — $author" if $title !~ /$author/; my ($upd, $pub, $url) = $txt =~ /(.*)\r?\n(.*)\r?\n(.*)\r?\n?\z/; ($upd) = $upd =~ /(?:updated|ویرایش): (.*)/ if $upd; ($pub) = $pub =~ /(?:published|انتشار): (.*)/ if $pub; +$upd = $pub if (!$upd); ($url) = $url =~ /(?:plain text|متن ساده): (.*)/ if $url; $url = 'https://bndl.org/bandali-cv.txt' if (!$url and $title =~ /curriculum vitae/); @@ -272,7 +273,7 @@ qq( $url_html $note_id $pub_rfc5322\n) -. ($updated ? $updated : '') . +. (($updated and $pub ne $upd) ? $updated : '') . qq() : ''; } -- 2.20.1