Dr. Trigon | 1 Sep 10:52 2011
Picon

Re: 'wiki' as synonym for 'wikipedia' in family?


Just to finish this topic, I've created a function:

dblink2wikilink(site, dblink) which takes a (any available) site object
and the link text given with dblink syntax and returns the according
interwiki link (still as text). This interwiki link can then be used
with the page object.

Feel free to use or put the code upstream, as you like; it is given in
r165: https://fisheye.toolserver.org/changelog/drtrigon?cs=165

Thanks for the support and Greetings
DrTrigon

Am 31.08.2011 10:28, schrieb Dr. Trigon:
> Hello xqt!
> 
> First thanks - and sorry for re-raising the issue! I'm aware that
> you tried to explain me - in fact you did well, but still I was
> able to confuse myself again... ;) (may be since ID: 3084721 was
> still open)
> 
> Site.dbName() is very simple since it just returns '%swiki_p' %
> code (for historic reasons ;). As you correct statet I need a 
> 'dbname2wikilink()' conversion, which I try to do in a most general
> way. And as you said I am using a (dirty and bad) side effect. Now
> thats the point - is there really no other correct way of doing it
> (beside text modification with 'replace' - which is essantially
> what I am doing now)? What about loading all families to call their
> 'dbName()' member? Somehow brute force... isn't it? :)
(Continue reading)

Dr. Trigon | 3 Sep 17:36 2011
Picon

Re: [Pywikipedia-svn] SVN: [9448] trunk/pywikipedia/pywikibot/i18n.py


First thanks Merlijn and xqt for you answers!! In order to get one step
further I tried to follow Merlijn hints:

> If this is possible, the most reasonable solution to me would be
> this: 1) follow the guide to translating
> (http://lists.wikimedia.org/pipermail/pywikipedia-l/2011-January/006632.html)

Ok.
> 
BUT I did the migration by hands (since it's the first one) as
visible in [1] and when going further to create and upload a script
to i18n folder I got stuck:
I'm using the trunk not the rewrite; the guide uses rewrite and
  I cannot find the files in i18n directory in trunk, just the i18n.py
  in pywikibot but not the mentioned 'i18n.<package>'...
I do not have commit access
I wonder what does happen now with the translations on TW? Do they
  get synced into the i18n folder? ...or what's the idea?

> 2) use keys starting with 'thirdparty-drtrigon'; i.e.
> thirdparty-drtrigon-

As mentioned I created a bunch of keys, this works which is good!

> - you may recycle translations in the i18n folder if it fits

Yes - in fact I though about something like this too. ;) But could
become very tricky... ;)

(Continue reading)

Bináris | 3 Sep 20:09 2011
Picon

SVN access request

Hi,

I would like to get an SVN access and some help to start.

I need it mainly for inserting and maintaining TOCbot that is under preparation (it has worked in huwiki for several months and is now being internationalized).
Information about TOCbot: http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/TOCbot
Description, user guide and bot owners' guide and a collection of examples is ready as well as an auxilary script, while the main script is not yet public. It will soon be published for test and may need much care in the first time.
I would also like to take part in maintenance of replace.py for what I worked a lot already.
At the moment I am interested only in trunk version.

My SF page: http://sourceforge.net/users/binbot/ -- I don't know how to list all my contributions, here appears a part of them since May 22, but there are much more. I have also been active on mailing list in the past years. Please support and give me technical help to use the system.

--
Bináris

_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l <at> lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Dr. Trigon | 3 Sep 22:20 2011
Picon

Re: SVN access request


I hope you are also aware of my bot [1] which is at least somehow
related to yours. My bot provides an extension to the standard
watchlist in order to help users to stay up2date in all discussions
they participate(d). May be you want to have a look... ;)
May be we could also work together at some points...?

But I have to admit that I do not have commit access and this is
why may bot is placed in [2]... It is using the trunk only (also).

Greetings
DrTrigon

[1] http://de.wikipedia.org/wiki/Benutzer:DrTrigonBot
[2] https://fisheye.toolserver.org/changelog/drtrigon

Am 03.09.2011 20:09, schrieb Bináris:
> Hi,
> 
> I would like to get an SVN access and some help to start.
> 
> I need it mainly for inserting and maintaining TOCbot that is
> under preparation (it has worked in huwiki for several months and
> is now being internationalized). Information about TOCbot: 
> http://hu.wikipedia.org/wiki/Szerkeszt%C5%91:Bin%C3%A1ris/TOCbot 
> Description, user guide and bot owners' guide and a collection of 
> examples is ready as well as an auxilary script, while the main
> script is not yet public. It will soon be published for test and
> may need much care in the first time. I would also like to take
> part in maintenance of replace.py for what I worked a lot already. 
> At the moment I am interested only in trunk version.
> 
> My SF page: http://sourceforge.net/users/binbot/ -- I don't know
> how to list all my contributions, here appears a part of them since
> May 22, but there are much more. I have also been active on mailing
> list in the past years. Please support and give me technical help
> to use the system.
> 
> -- Bináris
> 
> 
> _______________________________________________ Pywikipedia-l
> mailing list Pywikipedia-l <at> lists.wikimedia.org 
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Dr. Trigon | 3 Sep 22:25 2011
Picon

Re: [Pywikipedia-svn] SVN: [9494] trunk/pywikipedia/wikipedia.py


If this is also an issue with section detection within pages
you could (if you like) also consider to use the code given
in 'getSections' [1]...

[1]
https://fisheye.toolserver.org/browse/drtrigon/pywikipedia/dtbext/dtbext_wikipedia.py?hb=true

Greetings
DrTrigon

Am 03.09.2011 13:58, schrieb xqt <at> svn.wikimedia.org:
> http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9494
> 
> Revision: 9494 Author:   xqt Date:     2011-09-03 11:58:48 +0000
> (Sat, 03 Sep 2011) Log Message: ----------- reverrevert r3147 due
> to bug #2989218; check for italic code in headings.TODO: use a
> better regex to find it.
> 
> Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
> 
> Modified: trunk/pywikipedia/wikipedia.py 
> ===================================================================
>
> 
--- trunk/pywikipedia/wikipedia.py	2011-09-03 11:17:47 UTC (rev 9493)
> +++ trunk/pywikipedia/wikipedia.py	2011-09-03 11:58:48 UTC (rev
> 9494)  <at>  <at>  -66,7 +66,6  <at>  <at>  within a non-wiki-markup section of text 
> decodeEsperantoX: decode Esperanto text using the x convention. 
> encodeEsperantoX: convert wikitext to the Esperanto x-encoding. -
> sectionencode: encode text for use as a section title in
> wiki-links. findmarker(text, startwith, append): return a string
> which is not part of text expandmarker(text, marker, separator):
> return marker string expanded  <at>  <at>  -654,7 +653,7  <at>  <at>  self._contents =
> contents hn = self.section() if hn: -                    m =
> re.search("=+ *%s *=+" % hn, self._contents) +                    m
> = re.search("=+[ ']*%s[ ']*=+" % hn, self._contents) if verbose and
> not m: output(u"WARNING: Section does not exist: %s" %
> self.aslink(forceInterwiki = True)) # Store any exceptions for
> later reference  <at>  <at>  -779,8 +778,8  <at>  <at>  else: raise
> IsRedirectPage(redirtarget) if self.section(): -            # TODO:
> What the hell is this? Docu please. -            m =
> re.search("\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\.3D"
> % re.escape(self.section()),
> sectionencode(pageInfo['revisions'][0]['*'],self.site().encoding()))
>
> 
+            m = re.search("=+[ ']*%s[ ']*=+" % re.escape(self.section()),
> +                          pageInfo['revisions'][0]['*']) if not
> m: try: self._getexception  <at>  <at>  -920,8 +919,8  <at>  <at>  else: raise
> IsRedirectPage(redirtarget) if self.section(): -            # TODO:
> What the hell is this? Docu please. -            m =
> re.search("\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\.3D"
> % re.escape(self.section()),
> sectionencode(text,self.site().encoding())) +            m =
> re.search("=+[ ']*%s[ ']*=+" % re.escape(self.section()), +
> text) if not m: try: self._getexception  <at>  <at>  -4140,8 +4139,7  <at>  <at>  
> page2._startTime = time.strftime('%Y%m%d%H%M%S', time.gmtime()) if
> section: -                        m =
> re.search("\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\.3D"
>
> 
                                     % re.escape(section),
sectionencode(text,page2.site().encoding()))
> +                        m = re.search("=+[ ']*%s[ ']*=+" %
> re.escape(section), text) if not m: try: page2._getexception  <at>  <at> 
> -4302,7 +4300,7  <at>  <at>  # Use the data loading time. page2._startTime =
> time.strftime('%Y%m%d%H%M%S', time.gmtime()) if section: -
> m =
> re.search("\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\.3D"
> % re.escape(section), sectionencode(text,page2.site().encoding())) 
> +                        m = re.search("=+[ ']*%s[ ']*=+" %
> re.escape(section), text) if not m: try: page2._getexception  <at>  <at> 
> -4531,10 +4529,6  <at>  <at>  break return text
> 
> -def sectionencode(text, encoding): -    """Encode text so that it
> can be used as a section title in wiki-links.""" -    return
> urllib.quote(text.replace("
> ","_").encode(encoding)).replace("%",".") - ######## Unicode
> library functions ########
> 
> def UnicodeToAsciiHtml(s):
> 
> 
> _______________________________________________ Pywikipedia-svn
> mailing list Pywikipedia-svn <at> lists.wikimedia.org 
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn
> 

info | 4 Sep 12:17 2011
Picon

Re: [Pywikipedia-svn] SVN: [9494] trunk/pywikipedia/wikipedia.py

I guess this needs a second api call? The rewrite branch uses it.

btw I found your isRedirect() method. Since this api call is not sure and gives false possitives I prefer
checking the text itself. Sometimes the database contains invalid redirect flags.

Greetings
xqt

----- Original Nachricht ----
Von:     "Dr. Trigon" <dr.trigon <at> surfeu.ch>
An:      pywikipedia-l <at> lists.wikimedia.org
Datum:   03.09.2011 22:25
Betreff: Re: [Pywikipedia-l] [Pywikipedia-svn] SVN: [9494]
	trunk/pywikipedia/wikipedia.py

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> If this is also an issue with section detection within pages
> you could (if you like) also consider to use the code given
> in 'getSections' [1]...
> 
> [1]
> https://fisheye.toolserver.org/browse/drtrigon/pywikipedia/dtbext/dtbext_wik
> ipedia.py?hb=true
> 
> Greetings
> DrTrigon
> 
> Am 03.09.2011 13:58, schrieb xqt <at> svn.wikimedia.org:
> > http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9494
> > 
> > Revision: 9494 Author:   xqt Date:     2011-09-03 11:58:48 +0000
> > (Sat, 03 Sep 2011) Log Message: ----------- reverrevert r3147 due
> > to bug #2989218; check for italic code in headings.TODO: use a
> > better regex to find it.
> > 
> > Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
> > 
> > Modified: trunk/pywikipedia/wikipedia.py 
> > ===================================================================
> >
> > 
> - --- trunk/pywikipedia/wikipedia.py	2011-09-03 11:17:47 UTC (rev 9493)
> > +++ trunk/pywikipedia/wikipedia.py	2011-09-03 11:58:48 UTC (rev
> > 9494)  <at>  <at>  -66,7 +66,6  <at>  <at>  within a non-wiki-markup section of text 
> > decodeEsperantoX: decode Esperanto text using the x convention. 
> > encodeEsperantoX: convert wikitext to the Esperanto x-encoding. -
> > sectionencode: encode text for use as a section title in
> > wiki-links. findmarker(text, startwith, append): return a string
> > which is not part of text expandmarker(text, marker, separator):
> > return marker string expanded  <at>  <at>  -654,7 +653,7  <at>  <at>  self._contents =
> > contents hn = self.section() if hn: -                    m =
> > re.search("=+ *%s *=+" % hn, self._contents) +                    m
> > = re.search("=+[ ']*%s[ ']*=+" % hn, self._contents) if verbose and
> > not m: output(u"WARNING: Section does not exist: %s" %
> > self.aslink(forceInterwiki = True)) # Store any exceptions for
> > later reference  <at>  <at>  -779,8 +778,8  <at>  <at>  else: raise
> > IsRedirectPage(redirtarget) if self.section(): -            # TODO:
> > What the hell is this? Docu please. -            m =
> >
> re.search("\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\
> .3D"
> > % re.escape(self.section()),
> > sectionencode(pageInfo['revisions'][0]['*'],self.site().encoding()))
> >
> > 
> +            m = re.search("=+[ ']*%s[ ']*=+" % re.escape(self.section()),
> > +                          pageInfo['revisions'][0]['*']) if not
> > m: try: self._getexception  <at>  <at>  -920,8 +919,8  <at>  <at>  else: raise
> > IsRedirectPage(redirtarget) if self.section(): -            # TODO:
> > What the hell is this? Docu please. -            m =
> >
> re.search("\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\
> .3D"
> > % re.escape(self.section()),
> > sectionencode(text,self.site().encoding())) +            m =
> > re.search("=+[ ']*%s[ ']*=+" % re.escape(self.section()), +
> > text) if not m: try: self._getexception  <at>  <at>  -4140,8 +4139,7  <at>  <at>  
> > page2._startTime = time.strftime('%Y%m%d%H%M%S', time.gmtime()) if
> > section: -                        m =
> >
> re.search("\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\
> .3D"
> >
> > 
> - -                                      % re.escape(section),
> sectionencode(text,page2.site().encoding()))
> > +                        m = re.search("=+[ ']*%s[ ']*=+" %
> > re.escape(section), text) if not m: try: page2._getexception  <at>  <at> 
> > -4302,7 +4300,7  <at>  <at>  # Use the data loading time. page2._startTime =
> > time.strftime('%Y%m%d%H%M%S', time.gmtime()) if section: -
> > m =
> >
> re.search("\.3D\_*(\.27\.27+)?(\.5B\.5B)?\_*%s\_*(\.5B\.5B)?(\.27\.27+)?\_*\
> .3D"
> > % re.escape(section), sectionencode(text,page2.site().encoding())) 
> > +                        m = re.search("=+[ ']*%s[ ']*=+" %
> > re.escape(section), text) if not m: try: page2._getexception  <at>  <at> 
> > -4531,10 +4529,6  <at>  <at>  break return text
> > 
> > -def sectionencode(text, encoding): -    """Encode text so that it
> > can be used as a section title in wiki-links.""" -    return
> > urllib.quote(text.replace("
> > ","_").encode(encoding)).replace("%",".") - ######## Unicode
> > library functions ########
> > 
> > def UnicodeToAsciiHtml(s):
> > 
> > 
> > _______________________________________________ Pywikipedia-svn
> > mailing list Pywikipedia-svn <at> lists.wikimedia.org 
> > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-svn
> > 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk5ijR8ACgkQAXWvBxzBrDBNNQCgve2/z/SUa3bUNd625ibUKG/G
> sEMAn2/LtRfr9kvdV1UX+aVKL9MQZwl8
> =9anJ
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l <at> lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
> 
info | 4 Sep 12:28 2011
Picon

Re: [Pywikipedia-svn] SVN: [9448] trunk/pywikipedia/pywikibot/i18n.py

I think it was not a good idea to create these entries in tw directly. The normal way is to create a dictionary
as described and make a request at sf (or send a mail to me as well). i18n dicts are placed in the rewrite
branch. In trunk release i18n directory is defined as svn:external which copies its content from rewrite.

There is no automatic mechanism to synchonize these dicts from pywikipedia svn to tw and vice versa. It is
necessary to outcheck pwb svn at tw and to expand the yaml config file at mw svn and perhaps run fuzzy bot to
import the given translations.

From time to time the i18n dictionaries are created and backported to pwb svn.

Greetings
xqt

----- Original Nachricht ----
Von:     "Dr. Trigon" <dr.trigon <at> surfeu.ch>
An:      pywikipedia-l <at> lists.wikimedia.org
Datum:   03.09.2011 17:36
Betreff: Re: [Pywikipedia-l] [Pywikipedia-svn] SVN:
	[9448]	trunk/pywikipedia/pywikibot/i18n.py

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> First thanks Merlijn and xqt for you answers!! In order to get one step
> further I tried to follow Merlijn hints:
> 
> > If this is possible, the most reasonable solution to me would be
> > this: 1) follow the guide to translating
> >
> (http://lists.wikimedia.org/pipermail/pywikipedia-l/2011-January/006632.html
> )
> 
> Ok.
> > 
> BUT I did the migration by hands (since it's the first one) as
> visible in [1] and when going further to create and upload a script
> to i18n folder I got stuck:
> - - I'm using the trunk not the rewrite; the guide uses rewrite and
>   I cannot find the files in i18n directory in trunk, just the i18n.py
>   in pywikibot but not the mentioned 'i18n.<package>'...
> - - I do not have commit access
> - - I wonder what does happen now with the translations on TW? Do they
>   get synced into the i18n folder? ...or what's the idea?
> 
> > 2) use keys starting with 'thirdparty-drtrigon'; i.e.
> > thirdparty-drtrigon-
> 
> As mentioned I created a bunch of keys, this works which is good!
> 
> > - you may recycle translations in the i18n folder if it fits
> 
> Yes - in fact I though about something like this too. ;) But could
> become very tricky... ;)
> 
> > - if your script is able to be distributed we could commit (with
> > i18n extension)
> 
> In my opinion it is (more or less) since I am using it... ;) But I do
> not know what are your demands on quality... I think you have to decide
> whether my code fits or not... I have also to admit that I cannot spend
> the same amount of time in support and developpment as desirable.
> 
> > - I am implementing translated bot owner messages wich (hopefull)
> > coming soon. If so, you may check whether there are messages to
> > re-use - finally we could implement bot-specific messages as part
> > of the pwb framework and port them to translatewiki like other
> > messages. We could handle with drtrigonbot.py, xqbot.py
> > valhallasw-bot.py as well. Maybe they should get a
> > thirdparty-suffix.
> 
> Both sound intressing, can you may be elaborate some further details
> on this?
> 
> [1]
> http://translatewiki.net/w/i.php?title=Special%3APrefixIndex&prefix=Thirdpar
> ty-drtrigonbot&namespace=1238
> 
> Thanks a lot for your detailed explanations and
> Greetings
> Dr. Trigon
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk5iSYAACgkQAXWvBxzBrDAtuACgkCDRc+Bs/Utv+0EdmPvqlV6y
> smcAoJU/PvBZHkrdAQ8Biu6mRhKlA97+
> =MCWB
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l <at> lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
> 
Dr. Trigon | 4 Sep 15:20 2011
Picon

Re: [Pywikipedia-svn] SVN: [9494] trunk/pywikipedia/wikipedia.py


> I guess this needs a second api call? The rewrite branch uses it.

Yes - but not only! It does a lot more since it matches the wiki
text (and the headings there) with the 'anchors' (and others) given
from api call. Additionally it determines the byteoffset within the
wiki text, instead of the byteoffset given by 'parse' with is given
relative to the parsed text (which is quite useless in my opinion ;)
But since the wiki text can also contain wrong syntax or some
notorious examples, it is possible for the function not to resolve.
(In fact this is true for a lot of functions within framework, e.g.
if the network connection is down or else...)

> btw I found your isRedirect() method. Since this api call is not 
> sure and gives false possitives I prefer checking the text itself. 
> Sometimes the database contains invalid redirect flags.

Thanks for this hint - never had problems with this, but - I have to
consider that!

Greetings
Dr. Trigon | 4 Sep 15:20 2011
Picon

Re: [Pywikipedia-svn] SVN: [9448] trunk/pywikipedia/pywikibot/i18n.py


> I think it was not a good idea to create these entries in tw 
> directly.

That's a pitty! Sorry for that... I was confused by "if you can create
the keys on translatewiki: do that."

> The normal way is to create a dictionary as described and make a 
> request at sf (or send a mail to me as well).

OK; so I did as you told me and created such a file with dict according
to the guide (but using trunk), the file 'thirdparty' is attached. But
I have to tell that using the script mentioned in guide did not work
well for me, beacuse of using trunk and slightly other key names...

Testing worked quite well, with:

>>> import wikipedia as pywikibot from pywikibot import i18n 
>>> i18n.twtranslate(pywikibot.getSite(),
'thirdparty-drtrigonbot-sum_disc-parse')
u':* %s: %s - [%s letzte Bearbeitung] ({{PAGESIZE:%s}} Bytes) von %s (%s)'

(I know the '%s' should be explicitely named - that will be next step..)

> i18n dicts are placed in the rewrite branch. In trunk release i18n 
> directory is defined as svn:external which copies its content from 
> rewrite.

OK thanks! (may be that should be quite obvious to me... ;)

> There is no automatic mechanism to synchonize these dicts from 
> pywikipedia svn to tw and vice versa. It is necessary to outcheck 
> pwb svn at tw and to expand the yaml config file at mw svn and 
> perhaps run fuzzy bot to import the given translations.
>> From time to time the i18n dictionaries are created and 
>> backported to pwb svn.

So this is what you are doing for all translations in i18n directory?
Is this done manually? Do I have to do that also?

Greetings and thanks for support!
# coding=utf-8
msg = {
'en': {
'thirdparty-drtrigonbot-sum_disc-summary-head': u'robot ',
'thirdparty-drtrigonbot-sum_disc-summary-add': u'Discussion summary added: %i entries',
'thirdparty-drtrigonbot-sum_disc-summary-mod': u'Discussion summary updated: %i entries in %s',
'thirdparty-drtrigonbot-sum_disc-summary-clean': u'Discussion summary added with clean up: %i entries',
'thirdparty-drtrigonbot-sum_disc-notify-changed': u'Discussion changed',
'thirdparty-drtrigonbot-sum_disc-notify-new': u'New Discussion',
'thirdparty-drtrigonbot-sum_disc-notify-closed': u'Discussion closed',
'thirdparty-drtrigonbot-sum_disc-notify-maintmsg': u'BOT MESSAGE',
'thirdparty-drtrigonbot-sum_disc-notify-notify': u'Notification',
'thirdparty-drtrigonbot-sum_disc-parse': u':* %s: %s - [%s last edit] ({{PAGESIZE:%s}} bytes) by %s (%s)',
'thirdparty-drtrigonbot-sum_disc-parse-closed': u':* %s: %s all discussions have finished
(surveillance stopped) - last edit by %s (%s)',
'thirdparty-drtrigonbot-sum_disc-parse-notify': u':* %s: <span class="plainlinks">[%s
%s]</span> - last edit by [[User:%s]] (%s)',
'thirdparty-drtrigonbot-sum_disc-parse-warning': u':* Bot warning message: %s "\'\'%s\'\'"',
'thirdparty-drtrigonbot-sum_disc-parse-start': u'; %d. %B %Y',
'thirdparty-drtrigonbot-sum_disc-parse-end': u'<noinclude>\n\nSummary generated from and at: ~~~~</noinclude>',
'thirdparty-drtrigonbot-sum_disc-parse-nonhuman': u'(no human editor found)',
},
'de': {
'thirdparty-drtrigonbot-sum_disc-summary-head': u'Bot: ',
'thirdparty-drtrigonbot-sum_disc-summary-add': u'Diskussions-Zusammenfassung hinzugefügt (%i Einträge)',
'thirdparty-drtrigonbot-sum_disc-summary-mod': u'Diskussions-Zusammenfassung aktualisiert (%i
Einträge in %s)',
'thirdparty-drtrigonbot-sum_disc-summary-clean': u'Diskussions-Zusammenfassung hinzugefügt
und bereinigt (%i Einträge)',
'thirdparty-drtrigonbot-sum_disc-notify-changed': u'Diskussion verändert',
'thirdparty-drtrigonbot-sum_disc-notify-new': u'Neue Diskussion',
'thirdparty-drtrigonbot-sum_disc-notify-closed': u'Diskussion abgeschlossen',
'thirdparty-drtrigonbot-sum_disc-notify-maintmsg': u'BOT MESSAGE',
'thirdparty-drtrigonbot-sum_disc-notify-notify': u'Benachrichtigung',
'thirdparty-drtrigonbot-sum_disc-parse': u':* %s: %s - [%s letzte Bearbeitung] ({{PAGESIZE:%s}}
Bytes) von %s (%s)',
'thirdparty-drtrigonbot-sum_disc-parse-closed': u':* %s: %s alle Diskussionen wurden beendet
(Überwachung gestoppt) - letzte Bearbeitung von %s (%s)',
'thirdparty-drtrigonbot-sum_disc-parse-notify': u':* %s: <span class="plainlinks">[%s
%s]</span> - letzte Bearbeitung von [[User:%s]] (%s)',
'thirdparty-drtrigonbot-sum_disc-parse-warning': u':* Bot Warn-Nachricht: %s "\'\'%s\'\'"',
'thirdparty-drtrigonbot-sum_disc-parse-start': u'; %d. %B %Y',
'thirdparty-drtrigonbot-sum_disc-parse-end': u'<noinclude>\n\nZusammenfassung erstellt von und
um: ~~~~</noinclude>',
'thirdparty-drtrigonbot-sum_disc-parse-nonhuman': u'(keinen menschlichen Bearbeiter gefunden)',
},
'fr': {
},
'pl': {
},
'it': {
},
'ja': {
},
'es': {
},
'pt': {
},
'nl': {
},
'ru': {
},
'sv': {
},
'zh': {
},
'ca': {
},
'no': {
},
'fi': {
},
'uk': {
},
'cs': {
},
'hu': {
},
'ro': {
},
'tr': {
},
'ko': {
},
'vi': {
},
'id': {
},
'da': {
},
'ar': {
},
'eo': {
},
'sr': {
},
'lt': {
},
'sk': {
},
'vo': {
},
'fa': {
},
'he': {
},
'bg': {
},
'sl': {
},
'war': {
},
'ms': {
},
'hr': {
},
'et': {
},
'new': {
},
'hi': {
},
'simple': {
},
'gl': {
},
'th': {
},
'eu': {
},
'nn': {
},
'roa-rup': {
},
'el': {
},
'ht': {
},
'az': {
},
'tl': {
},
'la': {
},
'te': {
},
'ka': {
},
'mk': {
},
'ceb': {
},
'sh': {
},
'br': {
},
'pms': {
},
'mr': {
},
'lv': {
},
'lb': {
},
'jv': {
},
'be-x-old': {
},
'cy': {
},
'is': {
},
'bs': {
},
'sq': {
},
'ta': {
},
'be': {
},
'bpy': {
},
'an': {
},
'oc': {
},
'bn': {
},
'sw': {
},
'io': {
},
'fy': {
},
'lmo': {
},
'gu': {
},
'af': {
},
'nds': {
},
'ml': {
},
'qu': {
},
'scn': {
},
'ur': {
},
'ku': {
},
'zh-yue': {
},
'su': {
},
'ast': {
},
'nap': {
},
'bat-smg': {
},
'hy': {
},
'yo': {
},
'ga': {
},
'cv': {
},
'wa': {
},
'ksh': {
},
'ne': {
},
'pnb': {
},
'kn': {
},
'tg': {
},
'roa-tara': {
},
'vec': {
},
'yi': {
},
'gd': {
},
'tt': {
},
'zh-min-nan': {
},
'os': {
},
'uz': {
},
'pam': {
},
'als': {
},
'sah': {
},
'kk': {
},
'arz': {
},
'mi': {
},
'li': {
},
'am': {
},
'nah': {
},
'hsb': {
},
'glk': {
},
'co': {
},
'gan': {
},
'mn': {
},
'sco': {
},
'ia': {
},
'bcl': {
},
'my': {
},
'fo': {
},
'fiu-vro': {
},
'nds-nl': {
},
'si': {
},
'tk': {
},
'vls': {
},
'sa': {
},
'bar': {
},
'mg': {
},
'gv': {
},
'ilo': {
},
'dv': {
},
'nrm': {
},
'pag': {
},
'map-bms': {
},
'rm': {
},
'ckb': {
},
'diq': {
},
'se': {
},
'mzn': {
},
'wuu': {
},
'fur': {
},
'ug': {
},
'lij': {
},
'mt': {
},
'bh': {
},
'nov': {
},
'bo': {
},
'ang': {
},
'csb': {
},
'sc': {
},
'zh-classical': {
},
'hif': {
},
'km': {
},
'lad': {
},
'cbk-zam': {
},
'pi': {
},
'frp': {
},
'ps': {
},
'hak': {
},
'kw': {
},
'pa': {
},
'nv': {
},
'szl': {
},
'xal': {
},
'pdc': {
},
'haw': {
},
'stq': {
},
'ie': {
},
'so': {
},
'kv': {
},
'crh': {
},
'to': {
},
'ace': {
},
'mhr': {
},
'myv': {
},
'pcd': {
},
'krc': {
},
'ln': {
},
'ext': {
},
'gn': {
},
'ky': {
},
'eml': {
},
'arc': {
},
'pap': {
},
'ay': {
},
'rw': {
},
'jbo': {
},
'wo': {
},
'bjn': {
},
'frr': {
},
'ce': {
},
'ba': {
},
'kl': {
},
'tpi': {
},
'kab': {
},
'udm': {
},
'ty': {
},
'srn': {
},
'zea': {
},
'mrj': {
},
'koi': {
},
'dsb': {
},
'ig': {
},
'ab': {
},
'or': {
},
'gag': {
},
'kg': {
},
'lo': {
},
'av': {
},
'mdf': {
},
'mwl': {
},
'rmy': {
},
'cu': {
},
'kaa': {
},
'sm': {
},
'tet': {
},
'got': {
},
'ks': {
},
'bm': {
},
'ik': {
},
'sd': {
},
'bi': {
},
'lbe': {
},
'na': {
},
'pih': {
},
'iu': {
},
'pnt': {
},
'chr': {
},
'cdo': {
},
'as': {
},
'ss': {
},
'pfl': {
},
'ha': {
},
'ee': {
},
'ti': {
},
'om': {
},
'zu': {
},
'za': {
},
've': {
},
'ts': {
},
'rn': {
},
'dz': {
},
'sg': {
},
'cr': {
},
'ch': {
},
'lg': {
},
'bug': {
},
'bxr': {
},
'fj': {
},
'ak': {
},
'st': {
},
'xh': {
},
'ny': {
},
'tn': {
},
'ff': {
},
'ki': {
},
'tum': {
},
'sn': {
},
'tw': {
},
'chy': {
},
}

_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l <at> lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Kudu | 9 Sep 18:42 2011
Picon

replace.py error

node:pywikipedia kudu$ python replace.py -transcludes:sometemplate
-regex 'someregex' 'somereplacement'
unicode test: triggers problem #3081100
Getting references to [[Template:sometemplate]] via API...
Getting 1 pages from wiki:wiki...
Traceback (most recent call last):
  File "replace.py", line 825, in <module>
    main()
  File "replace.py", line 816, in main
    bot.run()
  File "replace.py", line 399, in run
    new_text = self.doReplacements(new_text)
  File "replace.py", line 342, in doReplacements
    allowoverlap=self.allowoverlap)
  File "~/pywikipedia/pywikibot/textlib.py", line 175, in replaceExcept
    match.group(groupID) + \
TypeError: coercing to Unicode: need string or buffer, NoneType found

~K

Gmane