Hello, I have list of names, which exists both in article and category namespace
Foo | Category:Foo Bar | Category:Bar
I want to link them together:
To every category I want to add {{Catmore}}, so I use:
add_text.py -file:skwiki.txt -up -text:"{{Catmore|{{subst:PAGENAME}}}}" -except:"{{[Cc]atmore(.*?)" -lang:sk
And I want add to every article "[[Category:{{subst:PAGENAME}}| ]]", ideally as first category. But I didn't found any suitable script for this. I can add it without checking existence as last category, but this will lead to duplicate categories in article:
add_text.py -file:skwiki1.txt -text:"[[Category:{{subst:PAGENAME}}| ]]" -lang:sk
Have you any idea how to make it?
JAnD
It's better to write a script for it, I wrote it for you and I'm going to send it to you directy (mailing lists usually don't allow rather big attachments)
Best On 6/26/14, Jan Dudík jan.dudik@gmail.com wrote:
Hello, I have list of names, which exists both in article and category namespace
Foo | Category:Foo Bar | Category:Bar
I want to link them together:
To every category I want to add {{Catmore}}, so I use:
add_text.py -file:skwiki.txt -up -text:"{{Catmore|{{subst:PAGENAME}}}}" -except:"{{[Cc]atmore(.*?)" -lang:sk
And I want add to every article "[[Category:{{subst:PAGENAME}}| ]]", ideally as first category. But I didn't found any suitable script for this. I can add it without checking existence as last category, but this will lead to duplicate categories in article:
add_text.py -file:skwiki1.txt -text:"[[Category:{{subst:PAGENAME}}| ]]" -lang:sk
Have you any idea how to make it?
JAnD
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
pywikipedia-l@lists.wikimedia.org