Add gopherpedia URI and rename try to guess. - annna - Annna the nice friendly … | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 4575501855686f55c66c514abc0992270dbd003f | |
parent ee44db405a309195b9e615156612592d2d669fe1 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Mon, 10 Apr 2023 13:12:03 +0200 | |
Add gopherpedia URI and rename try to guess. | |
Diffstat: | |
M wikipediagame | 7 +++++-- | |
1 file changed, 5 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/wikipediagame b/wikipediagame | |
@@ -94,12 +94,15 @@ def main(args): | |
json.dump(hintsize, hintfd) | |
hintfd.close() | |
- if cmd == "try": | |
+ if cmd == "guess": | |
if len(largs) < 2: | |
usage(args[0]) | |
trytext = largs[1] | |
if title.strip().lower() == trytext.strip().lower(): | |
- print("Congrats! You have found the right title! :: %s" % (title)) | |
+ wpage = w.page(title) | |
+ wuri = wpage.url | |
+ uri = wuri.replace("https://en.wikipedia.org/wiki", "gopher://goph… | |
+ print("Congrats! You have found the right title! :: %s" % (uri)) | |
if os.path.exists(hintpath): | |
os.remove(hintpath) | |
if os.path.exists(titlepath): |