We have an internal wiki and I want to use pywikibot to get some data
from it. Installed it from pip but when I import it I get:
>>> import pywikibot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/pywikibot/__init__.py",
line 25, in <module>
from pywikibot.bot import (
File "/usr/local/lib/python3.7/site-packages/pywikibot/bot.py", line
105, in <module>
from pywikibot import config2 as config
File "/usr/local/lib/python3.7/site-packages/pywikibot/config2.py",
line 373, in <module>
base_dir = get_base_dir()
File "/usr/local/lib/python3.7/site-packages/pywikibot/config2.py",
line 367, in get_base_dir
raise RuntimeError(exc_text)
RuntimeError: No user-config.py found in directory '/vagrant'.
Looking here https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation#Configure_Pywi…
I see a reference to pwb.py, but that does not exist in
/usr/local/lib/python3.7/site-packages/pywikibot.
What am I missing here?
Thanks!
I'd like to get all the redirect pages out of a wiki, but
pwb.py listpages -start:UK -grep:'#REDIRECT' -format:"{page.title}" -get
produces nothing, but
pwb.py listpages -start:UK -grep:'United Kingdom' -format:"{page.title}" -get
produces, as expected
UK
#REDIRECT [[United Kingdom]]
pwb.py listpages -start:UK -grep:'#' -format:"{page.title}" -get
picks up pages with a # in them, but not any of the #REDIRECTs
why isn't -grep just parsing the page fully?
John
Hii Everyone!
Hope you all are doing well.
I'm Aditya Vats, and I'm new to wikimedia codebase. Previously I've
contributed on Github <https://www.github.com/avats-dev> to some open
source projects, but gerrit is new to me. I'm excited to work and
contribute here. I'm proficient in python, html, css and know somewhat c,
c++, javascript.
In the pywikibot project, as a starting contributor, I'm thinking of
working on porting to py3.5+ and to improve the project's test suite,
although I might need a lot of help on the way.
Open to suggestions and help. Hoping for supportive responses.
Thanks and regards
---------------------------------------------------------------------------------------------
ADITYA VATS
Engineering Undergrad at IIITDMJ <https://www.iiitdmj.ac.in/>
Open Source Contributor and developer