Add wikipedia replacement trick for one line. - annna - Annna the nice friendly… | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit b86a96228a9b8296adc074af8d8e0401f9499ac0 | |
parent 27fceecf711fb8a4138be9cecf55de0d886c7e1d | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Fri, 8 May 2020 20:33:43 +0200 | |
Add wikipedia replacement trick for one line. | |
This part of annna has to be reworked completely. | |
Diffstat: | |
M annna-start-services | 20 ++++++++++++++------ | |
1 file changed, 14 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/annna-start-services b/annna-start-services | |
@@ -108,6 +108,7 @@ then | |
tmpf=$(mktemp) | |
fetch-url "${uri}" > "${tmpf}" | |
urititle="$(grabtitle < "${tmpf}" | sed 's/^ *… | |
+ # TODO: Replace all of this with a better logi… | |
if [ -n "$urititle" ]; | |
then | |
case "${urititle}" in | |
@@ -128,6 +129,7 @@ then | |
annna-say -c "… | |
fi | |
else | |
+ wikipedia=0 | |
case "${uri}" in | |
*twitter.com*) | |
nurl="$(printf… | |
@@ -138,7 +140,10 @@ then | |
*en.wikipedia.org/wiki… | |
if ! regeximat… | |
nurl="… | |
- annna-… | |
+ purl="… | |
+ annna-… | |
+ # Hack… | |
+ wikipe… | |
fi | |
;; | |
*) | |
@@ -146,12 +151,15 @@ then | |
;; | |
esac | |
- purl="$(9 htmlfmt < "$… | |
- if [ -n "${spurl}" ]; | |
+ if [ $wikipedia -eq 0 … | |
then | |
- annna-say -c "… | |
- else | |
- annna-say -c "… | |
+ purl="$(9 html… | |
+ if [ -n "${spu… | |
+ then | |
+ annna-… | |
+ else | |
+ annna-… | |
+ fi | |
fi | |
fi | |
;; |