Make guessing on long names a bit more funny. - annna - Annna the nice friendly bot.
HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
---
DIR commit ee44db405a309195b9e615156612592d2d669fe1
DIR parent 56bd88325d9acf1fce9aa8cbe0e03245c48e8ec1
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Mon, 10 Apr 2023 12:47:51 +0200
Make guessing on long names a bit more funny.
Diffstat:
M wikipediagame | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
DIR diff --git a/wikipediagame b/wikipediagame
@@ -66,8 +66,11 @@ def main(args):
printsummary = 1
if printsummary == 1:
- summary = w.summary(title).replace("\n", " ")
- for titlepart in title.split(" "):
+ summary = w.summary(title).\
+ replace("\n", " ")
+ splittitle = title.replace(",", " ").\
+ replace("-", " ")
+ for titlepart in splittitle.split():
summary = summary.replace(titlepart, "*" * len(titlepart))
print(summary)