Hi Merlijn,
these updates are normaly made by /maintenance/update_namespaces.py bot script which calls the namespace via api. I've modified that script to be able dealing with all namespace aliases too. Anyway the order of ja: namespace and namespace alias has been changed and there is a difference between ja-wiki (1) and other projects like ja-wikinews (2). This caused me to change the family.py in r8236 as default (3) which has valid namespace aliases for all related mediawiki families in the right order (<namespace> first, <namespacealiases> behind in that list) and to override it in wikipedia_family (4). I do recommend not to change the family.py but the related wikia family file. Otherwise all mediawiki family files must have these override assignments you can find in wikipedia_family.py now.
(1) look at http://ja.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=namespa…
(2) look at http://ja.wikinews.org/w/api.php?action=query&meta=siteinfo&siprop=namespac…
(3) http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/family.py?r1=…
(4) http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/families/wiki…
I hope this explanation was understandable.
Greetings
xqt
----- Original Nachricht ----
Von: Merlijn van Deen <valhallasw(a)arctus.nl>
An: info(a)gno.de
Datum: 16.04.2011 21:19
Betreff: Re: [Pywikipedia-svn] SVN: [8236] trunk/pywikipedia
> Hi xqt,
>
> On IRC, someone complained about a bad namespace for "User page:" when
> creating a page on ja.wow.wikia. It was changed in this revision:
>
> 2010/6/2 <xqt(a)svn.wikimedia.org>
>
> > Revision: 8236
> > Author: xqt
> > Date: 2010-06-02 12:47:02 +0000 (Wed, 02 Jun 2010)
> >
> > Log Message:
> > -----------
> > update namespaces for wikipedia:ja
> >
> >
> > @@ -831,7 +831,7 @@
> > 'io': u'Uzanto Debato',
> > 'is': u'Notandaspjall',
> > 'it': u'Discussioni utente',
> > - 'ja': [u'??????', u'???????'],
> > + 'ja': [u'???????', u'??????'],
> > 'jv': u'Dhiskusi Panganggo',
> > 'ka': [u'???????????? ????????', u'????????????
> ????????'],
> > 'kaa': u"Paydalan?wsh? sa'wbeti",
> >
> >
> While jawiki seems to redirect the ''???????' variant to the '??????'
> variant.
>
> Is there a reason not to change this back? And what are these updates based
> on? Wikimedia source code?
>
> Best regards,
> Merlijn
>
Hi xqt,
On IRC, someone complained about a bad namespace for "User page:" when
creating a page on ja.wow.wikia. It was changed in this revision:
2010/6/2 <xqt(a)svn.wikimedia.org>
> Revision: 8236
> Author: xqt
> Date: 2010-06-02 12:47:02 +0000 (Wed, 02 Jun 2010)
>
> Log Message:
> -----------
> update namespaces for wikipedia:ja
>
>
> @@ -831,7 +831,7 @@
> 'io': u'Uzanto Debato',
> 'is': u'Notandaspjall',
> 'it': u'Discussioni utente',
> - 'ja': [u'利用者‐会話', u'利用者・トーク'],
> + 'ja': [u'利用者・トーク', u'利用者‐会話'],
> 'jv': u'Dhiskusi Panganggo',
> 'ka': [u'მომხმარებლის განხილვა', u'მომხმარებელი განხილვა'],
> 'kaa': u"Paydalanıwshı sa'wbeti",
>
>
While jawiki seems to redirect the ''利用者・トーク' variant to the '利用者‐会話'
variant.
Is there a reason not to change this back? And what are these updates based
on? Wikimedia source code?
Best regards,
Merlijn
I was studying textlib.py for some solution I need, and I found the function
isDisabled(). This has a really ingenious solution, so I would like to offer
the Beauty Award to the author whoever he was. :-)
Btw, is someone living here? Sometimes I ask something, and as if I threw my
letter into the well instead of the mailbox...
--
Bináris
2011/3/3 Andre Engels <andreengels(a)gmail.com>
>
> In the past the pywikibot output was indeed rather slow when there was
> much to transliterate, but the problems on that point have already
> been resolved in my edit #6275, from January 2009, when
> transliteration was changed from a sequence of elifs to a dictionary.
>
So, I found the case when it becomes extremely slow, anyway. Have you ever
tried to pywikibot.output a wikitable with 3000 rows? :-) I have.
I began to write a new bot that creates TOC from the archives of a given
community page or talk page. Its description page will be at
http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:BinBot/TOCbot. Some examples at
the bottom of
http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:BinBot/kocsmatartalomfejl%C3%A….
This is why I started a thread here called "Date questions". Can anyone
help? It would be good to make this bot available to the wider
wikicommunity, not only for huwiki.
--
Bináris
Is there any interest in a script that quickly switches pywikipedia
between wikis? This is something I created quickly to do the job. If
there is interest in this, what would need to be changed? Is there any
interest in incorporating it into the distribution of pywikipedia?
(There is a os.chdir call and some os.system calls that would obviously
need to be changed.)
#!/usr/bin/env python
"""
This script enables pywikipedia to be switched between different wikis
quickly.
Simply create various config files with this format:
user-config.py_<configname>
Then run the script: ./workon.py [optional argument]
"""
import glob
import os
import sys
os.chdir('/Users/sg/pywikipedia')
configs = [x[15:] for x in glob.glob("user-config.py_*")]
def lines_from(filename,splice="[:]"):
""" allows you specify a splice so you can skip part of the file.
"""
file = open(filename, "r")
return file.read().splitlines()
def print_current_wiki():
for line in lines_from('user-config.py'):
try:
exec(line)
except:
pass
print "working on:",family
if __name__ == '__main__':
args = sys.argv[1:]
if args == []:
print_current_wiki()
elif args[0] in configs:
if os.path.exists('user-config.py_' + args[0]):
os.system('rm -f user-config.py')
os.system('cp user-config.py_' + args[0] + ' user-config.py')
print_current_wiki()
else:
print "Not a valid option. Did you create the
'user-config.py_<name>' file?"
print "Valid options: " + ", ".join(configs)
--
Shane Geiger
shane.geiger(a)gmail.com
Phone: 347-237-7108
"Principles for the development of a complete mind:
Study the science of art.
Study the art of science.
Develop your senses--especially learn how to see.
Realize how everything connects to everything else."
-- Leonardo DaVinci