Add Black+ support. - annna - Annna the nice friendly bot.
(HTM) git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
---
(DIR) commit a75902b09d586d49f89e2daf2d9a98068448f1ad
(DIR) parent 074eadf9be1c8bc8f79868c0e84bef39b01b7a40
(HTM) Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sat, 22 May 2021 20:06:20 +0200
Add Black+ support.
Diffstat:
M annna-message-common | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/annna-message-common b/annna-message-common
@@ -133,7 +133,8 @@ case "${text}" in
fi
;;
*lichess.org/*)
- nuris="https://lichess1.org/game/export/gif/${uri#https*://*/}.gif"
+ nuris="$(printf "%s\n" "${uri}" \
+ | sed 's,https://lichess.org\(/[^ ]*\)$,\1,; s,^/\([^/]*\)/black$,/black/\1,; s,\(.*\),https://lichess1.org/game/export/gif\1.gif,;')"
;;
*)
mimetype="$(file -b --mime-type "${tmpf}")"