~nytpu/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Trim newlines and CRs in get_post_title

Details
Message ID
<20220212214749.29532-1-figbert@figbert.com>
DKIM signature
missing
Download raw message
Patch: +2 -2
---
 gemlog.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gemlog.sh b/gemlog.sh
index 1c83b0e..c3a497c 100755
--- a/gemlog.sh
+++ b/gemlog.sh
@@ -47,7 +47,7 @@ make_globals() {
}

get_post_title() {
	cat "$1" | perl -lne 's/#{1,3}\s*(.*)/\1/ or next; print; exit'
	cat "$1" | perl -lne 's/#{1,3}\s*(.*)/\1/ or next; print; exit' | tr -d '\r\n'
}

make_atom() {
@@ -81,7 +81,7 @@ EOF
		| while IFS='' read -r i; do
			expr "$n" '>=' "$number_of_feed_articles" > /dev/null && break
			printf "\n  <entry>\n    <title>"
			get_post_title "$i" | tr -d '\n'
			get_post_title "$i"
			printf "</title>\n    <id>$global_url${i#'./'}</id>\n"
			printf "    <link rel='alternate' href='$global_url${i#'./'}'/>\n    <updated>"
			echo "$i" | perl -ne '/^(\d{4}-\d{2}-\d{2}).*/; print "$1T12:00:00"' | tr -d '\n' | sed "s/\$/$tz/"
-- 
2.35.1
Details
Message ID
<20220213152556.ncypojauhvwwkvoc@GLaDOS.local>
In-Reply-To
<20220212214749.29532-1-figbert@figbert.com> (view parent)
DKIM signature
missing
Download raw message
Thanks!

~nytpu

-- 
Alex // nytpu
alex@nytpu.com
gpg --locate-external-key alex@nytpu.com
Reply to thread Export thread (mbox)