Add annna-meme-atom-feed script. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 3ff8f990a45f0b76937012ada464b28c1a59623f | |
parent ebba2beff2b924d17de903e356a160f385a0e123 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sat, 26 Mar 2022 20:54:21 +0100 | |
Add annna-meme-atom-feed script. | |
Thanks Evil_Bob, for the idea! | |
Diffstat: | |
A annna-meme-atom-feed | 26 ++++++++++++++++++++++++++ | |
1 file changed, 26 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/annna-meme-atom-feed b/annna-meme-atom-feed | |
@@ -0,0 +1,26 @@ | |
+#!/bin/sh | |
+ | |
+list() { | |
+git blame --since 3.weeks -p modules/hashtags/hashtags.txt | \ | |
+LC_ALL=C awk -F '[ ]' ' | |
+$1 == "committer-time" { | |
+ ts = $2; | |
+} | |
+/^ / { | |
+ memeline = substr($0, 2); | |
+ idx = index(memeline, " "); | |
+ if (idx) { | |
+ hashtag = substr(memeline, 1, idx); | |
+ url = substr(memeline, idx + 1); | |
+ print ts "\t" hashtag "\t" url; | |
+ } | |
+} | |
+' | \ | |
+sort -t ' ' -k1,1rn | |
+} | |
+ | |
+view() { | |
+ list | sfeed_atom | |
+} | |
+ | |
+"${1:-view}" |