Introduction
Introduction Statistics Contact Development Disclaimer Help
Add HTML title support. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit c6558cda8f3ef0c966a924dd8c98cd24a68f69f2
parent 8ef63faa063c71c42142e1bf2892e8ccafacbb6c
Author: Annna Robert-Houdin <[email protected]>
Date: Mon, 2 Apr 2018 11:05:58 +0200
Add HTML title support.
Diffstat:
M annna-start-services | 12 ++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/annna-start-services b/annna-start-services
@@ -86,6 +86,18 @@ then
[ $ismember -lt 1 ] && continue
[ "$user" = "${botname}" ] && continue
+ uri="$(printf "%s\n" "${text}" \
+ | sed 's,.*\(http[s]\?://[^ ]*\).*,\1,' \
+ | grep -e 'http\(s\|\)://')"
+ if [ -n "$uri" ];
+ then
+ urititle="$(curl-grabtitle "${uri}")"
+ if [ -n "$urititle" ];
+ then
+ annna-say -c "#bitreich-en" "HTML title: ${uri…
+ fi
+ continue
+ fi
if [ "${text}" = "${botname}, be cool." ];
then
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.