[Pywikipedia-l] Solve_disambiguation.py warns the user

Bináris wikiposta at gmail.com
Tue May 6 12:53:05 UTC 2008


I have modified solve_disambiguation.py in order it leaves a notice on
user's talk page if a subpage of his/hers has been edited by the
disambiguation robot. Main idea was that on subpages there are very often
articles under construction, and correcting the links in them should be in
accordance with the author's purpose. I never edit the userpage itself, only
subpages, if this seems to be the owner's purpose.

Is anybody interested in publication of such a code? This stands after
modifying refPage:

        if refPage.namespace()==2:
           UserSubPage=refPage.titleWithoutNamespace()
           try:
             UserPage=UserSubPage[:UserSubPage.index('/')]
           except ValueError:
             UserPage=UserSubPage
           UserTalkPage='User vita:'+UserPage
           wikipedia.output(UserTalkPage)
           EditComment = u"Figyelmeztetés felhasználói allap változtatására"
           WarnText=u'\n==Egyértelműsítés felhasználói allapon==\n'
           WarnText+=u'A(z) [[%s]] lapon módosítottam egy (vagy több)
hivatkozást, amely a(z) [[%s]] egyértelműsítő lapra mutatott.
[[User:BinBot#Egyértelműsítési irányelvek|Szívből remélem]], hogy ez
megfelelt a szándékaidnak. Ha nem, akkor [[user vita:Bináris|a gazdám
nevében]] elnézést kérek. ~~~~' % (refPage.title() , disambPage.title())
            site=wikipedia.getSite()
                   page = wikipedia.Page(site, UserTalkPage)
                   page.put(page.get()+WarnText, EditComment,
minorEdit=False)
                #TODO:
                # - to put the notification into a try/except
                # - to translate the texts and internationalizing them if
there is any attention to make this utility public

I am not familiar with Sourceforge methods, that's why I tell you here. I
need help in publication, but I don't mind if nobody is interested in doing
that, becuse I wrote it for myself.

-- 
Bináris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wikimedia.org/pipermail/pywikipedia-l/attachments/20080506/09befb17/attachment.htm 


More information about the Pywikipedia-l mailing list