Introduction
Introduction Statistics Contact Development Disclaimer Help
Add themoviedb support for bay.parazy.de - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 07add18a679ee42ddfb270c6d98e37647a186225
parent 02a180aeae1e6ef0a928d4182012d7ee708bf7e6
Author: Annna Robert-Houdin <[email protected]>
Date: Thu, 19 Aug 2021 20:29:46 +0200
Add themoviedb support for bay.parazy.de
Diffstat:
M annna-message-common | 7 +++++++
A themoviedb2gopherbay | 18 ++++++++++++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/annna-message-common b/annna-message-common
@@ -95,6 +95,13 @@ case "${text}" in
nuris="gopher://bay.parazy.de:666/1/q.dcgi?${m…
fi
;;
+ *themoviedb.org/movie/*)
+ movietitle="$(themoviedb2gopherbay "${uri}" | sed 's, …
+ if [ -n "${movietitle}" ];
+ then
+ nuris="gopher://bay.parazy.de:666/1/q.dcgi?${m…
+ fi
+ ;;
*lichess.org/????????|*lichess.org/????????/|*lichess.org/????…
nuris="$(printf "%s\n" "${uri}" \
| sed 's,https://lichess.org\(/[^ ]*\)$,\1,; s…
diff --git a/themoviedb2gopherbay b/themoviedb2gopherbay
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+if [ $# -lt 1 ];
+then
+ printf "usage: %s themoviedburi\n" "$(basename "$0")" >&2
+ exit 1
+fi
+
+imdburi="$1"
+title="$(curl -s "${imdburi}" \
+ | xml2tsv 2>/dev/null \
+ | grep property=og:title \
+ | sed 's,.*content=\([^\t]*\).*,\1,')"
+
+[ -z "${title}" ] && exit 1
+
+printf "%s\n" "${title}"
+
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.