Adding #chinese-calculator tag. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 2f29e106b5eb592aa2ac17990793f3099f1d7c27 | |
parent a93962af13ae89c74b0d3c6f746132766ce4454c | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Wed, 8 Apr 2020 13:28:35 +0200 | |
Adding #chinese-calculator tag. | |
Diffstat: | |
M annna-add-hashtag-mass | 23 +++++++++++++++-------- | |
M modules/hashtags/hashtags.txt | 1 + | |
2 files changed, 16 insertions(+), 8 deletions(-) | |
--- | |
diff --git a/annna-add-hashtag-mass b/annna-add-hashtag-mass | |
@@ -12,16 +12,23 @@ do | |
key="$(printf "%s\n" "${line}" | cut -d' ' -f 1)" | |
value="$(printf "%s\n" "${line}" | cut -d' ' -f 2-)" | |
- printf "Adding %s = %s\n" "${key}" "${value}" | |
- | |
- annna-add-hashtag "${key}" "${value}" >&2 >/dev/null | |
- git commit -a -m "Adding ${key} tag." >&2 >/dev/null | |
- git push >&2 >/dev/null | |
- | |
taguri="$(annna-get-hashtag-url "${key}")" | |
- if [ -n "${taguri}" ]; | |
+ | |
+ if [ -z "${taguri}" ]; | |
then | |
- annna-say -c '#bitreich-en' "Enjoy this new meme tag! ${key}: … | |
+ printf "Adding %s = %s\n" "${key}" "${value}" | |
+ | |
+ annna-add-hashtag "${key}" "${value}" >&2 >/dev/null | |
+ git commit -a -m "Adding ${key} tag." >&2 >/dev/null | |
+ git push >&2 >/dev/null | |
+ | |
+ taguri="$(annna-get-hashtag-url "${key}")" | |
+ if [ -n "${taguri}" ]; | |
+ then | |
+ annna-say -c '#bitreich-en' "Enjoy this new meme tag! … | |
+ fi | |
+ else | |
+ printf "%s already in db.\n" "${key}" | |
fi | |
sleep 5 | |
diff --git a/modules/hashtags/hashtags.txt b/modules/hashtags/hashtags.txt | |
@@ -240,6 +240,7 @@ | |
#chilicheese gopher://bitreich.org/I/memecache/chilicheese.jpg | |
#china gopher://bitreich.org/9/memecache/china.mp4 | |
#chinese-adam-eve gopher://bitreich.org/I/memecache/chinese-adam-eve.jpg | |
+#chinese-calculator gopher://bitreich.org/I/memecache/chinese-calculator.jpg | |
#chocolate gopher://bitreich.org/I/memecache/chocolate.jpg | |
#choice gopher://bitreich.org/9/memecache/choice.mkv | |
#christmastree gopher://bitreich.org/I/memecache/christmastree.jpg |