There are strange people who make such links (kindof urlencoded?):
[[Második világháború#Partrasz.C3.A1ll.C3.A1s Szic.C3.ADli.C3.A1ban
.28Huskey hadm.C5.B1velet.29|Huskey hadműveletben]]
So the section title must have been copied from the URL.
Do we have a ready tool to fix these?
>From one of my assignments as a bot operator I have some code which
does template parsing and general text parsing (e.g. Image/File tags).
It is not using regex and thus able to correctly parse nested
templates and other such nasty things. I have written those as library
classes and written tests for them which cover almost all of the code.
I would now really like to contribute that code back to the community.
Would you be interested in adding this code to the pywikibot
framework? If yes, can I send the code to someone for code review or
how do you usually operate?
PS: wiki userpage is http://en.wikipedia.org/wiki/User:Hannes_R%C3%B6st
Since gerrit:131263 <https://gerrit.wikimedia.org/r/131263/> , it seems
to me that the excellent mwpfh is going to be used more and more
extensively within our framework.
Am I right? For example, the DuplicateReferences detection and fix in
reflinks.py could be brightly refactored without regular expressions.
Or are we supposed to do the opposite conversion, where possible?
I propose to create a tracking bug for all features present in
AutoWikiBrowser but not in our 'core' (e.g. gerrit:118795
Even if the user targets of the two projects are different nowadays, as
different are their tasks, I think PWB is going to be the ultimate
replacement to AWB, given its extreme extensibility and X-platformness
(actually, only a real GUI is missing).
My first experience with pywikibot, downloaded core, i wanted to change
a few pages. Immediately ran into an error when trying to set a page's
text to empty. The error message was unhelpful, but I dug through the
source and found the issue. I'd like to suggest that 2 things:
1. Setting a page's text to be empty should be allowed
2. If not, at least the error should be fixed to actually show the
correct error, explained below.
Here is an example script, and the error when running it
site = pywikibot.Site()
page = pywikibot.Page(site, "MediaWiki:Lastmodifiedat")
page.text = ""
Logging in to ianwiki:en as Ian Kelling
Traceback (most recent call last):
File "pwb.py", line 143, in <module>
run_python_file(fn, argv, argvu)
File "pwb.py", line 67, in run_python_file
exec(compile(source, filename, "exec"), main_mod.__dict__)
File "scripts/iansetup.py", line 5, in <module>
File "/a/opt/pywikibot/pywikibot/page.py", line 858, in save
File "/a/opt/pywikibot/pywikibot/page.py", line 884, in _save
raise pywikibot.PageNotSaved("%s: %s" % (link, err))
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
The cause is in site.py, in def editpage, line 2699:
if not text:
raise Error("editpage: no text to be saved")
This error should be shown instead of the one that is actually shown.
Hello, I have problem with script claimit.py, respective with adding
multiple values of one statement.
Typical problem is P31.
In wikidata is often
and I want to add some other. I tested various combination of -exist:ptqs,
but always there is some item to which is not added new value or added
my idea was:
P31=Q811534 <https://www.wikidata.org/w/index.php?title=Q811534> (1x)
P31= ... various trees
But script added (-exists:ptq) in every run one instance of Q811534 and one
instace of certain taxon. After few runs script says that P31 already
exists and does not add new taxons
(this item maybe should be solved in different way, but problem is not only
in this item and this property)
Is it problem in script or only incorrect combination of letters?
On 19 May 2014 22:59, Pyfisch <pyfisch(a)googlemail.com> wrote:
> Sphinx can generate really good docs from the source code and you only
> need to change source code, and then we could generate and host the docs on
> the labs server. If we require to update mediawiki.org, we wont ever
> reach sync between code and documentation. I propose to remove the
> documentation on mediawiki and only use sphinx for docs, but everywhere.
Recently, I've been thinking a lot about this, so this was a good reason to
write those thoughts down; I created a wiki page for that:
Basically, I'm not a big fan of sphinx because of the lack of accessibility
(and I *loathe* restructuredtext), and we lose e.g. translations when we
switch, so I would prefer something centered around mw.org. However, I *do*
agree it's a huge issue that code and docs are never in sync. Anyway, see
the not-yet-a-real-RFC for my thoughts.
Based on several discussions here and there I want to move
[[Manual:Pywikibot]] <https://www.mediawiki.org/wiki/PWB> (and all of the
subpages which are about 200 pages) to [[Pywikibot]] like other products
Another reason that motivates me to move is the page (and subpages) aren't
just about running a bot. they are about everything, including reports,
discussions, description about scripts and anything about pywikibot in
If you disagree or you have any ideas please feel free to share and if
there will be no objection until Tuesday, I'll move them.