Page MenuHomePhabricator

pwb.py catall script adds an extra ':'
Closed, ResolvedPublic

Description

Steps to reproduce:

python pwb.py login
python pwb.py catall
make a category or add an existing category to page

Result:

[[Category::Recipes]] instead of [[Category:Recipes]]. The former does not create a valid category link, just adds the text at the bottom of the page. The latter does.

Suggested solution:

Change the following in catall.py on line 78

cattitle = "%s:%s" % (site.namespaces.CATEGORY, p)

to

cattitle = "%s%s" % (site.namespaces.CATEGORY, p)

Revisions and Commits

Event Timeline

Framawiki renamed this task from pwb.py catall script adds an extra ':', so categories aren't actually made. to pwb.py catall script adds an extra ':'.Aug 15 2018, 4:41 PM
Xqt triaged this task as High priority.Aug 15 2018, 8:36 PM

Change 453338 had a related patch set uploaded (by Dalba; owner: dalba):
[pywikibot/core@master] Fix usages of site.namespaces.NAMESPACE_NAME

https://gerrit.wikimedia.org/r/453338

Change 453338 merged by jenkins-bot:
[pywikibot/core@master] Fix usages of site.namespaces.NAMESPACE_NAME

https://gerrit.wikimedia.org/r/453338