Commons:Bots/Requests/PereBot2

From Wikimedia Commons, the free media repository
Jump to: navigation, search

PereBot2 (talk · contribs)[edit]

Operator: Pere prlpz (talk · contributions · Number of edits · recent activity · block log · User rights log · uploads · Global account information)

Bot: PereBot (talk · contributions · Number of edits · recent activity · block log · User rights log · uploads · Global account information)

Bot's tasks for which permission is being sought: Fixing a mistake on description some images I've just uploaded with Commonist.

Automatic or manually assisted: No confirmation for every change, but random check of diffs.

Edit type (e.g. Continuous, daily, one time run): One time run.

Maximum edit rate (e.g. edits per minute): Pywikipediabot standard.

Bot flag requested: (Y/N): Existing bot without flag. I suppose I still don't need it.

Programming language(s): Python.

Pere prlpz (talk) 23:17, 4 May 2013 (UTC)

Discussion[edit]

More information:

  • The program is this one:
# -*- coding: utf-8 -*-

import sys
sys.path.append('C:\pywikipedia')
import wikipedia,catlib
import re

# El programa comença aquí.
lloc=u"Images from Wiki Loves Public Art 2013 in an unknown country"
sitecommons=wikipedia.getSite('commons','commons')
l=catlib.Category(sitecommons,lloc).articlesList(recurse=False)
#l=l[:2]
for page in l:
    text=page.get()
    if u"{{Wiki Loves Public Art 2013|ct-es}}" in text:
        text=text.replace(u"{{Wiki Loves Public Art 2013|ct-es}}",u"{{Wiki Loves Public Art 2013|es-ct}}")
        text=text.replace(u"[[Category:Public art in Sant Martí, Barcelona]]",u"")
        page.put(text,u"Bot fixing template in own images")
wikipedia.stopme()
  • I'm running a 108 edits test. I hope I won't need to run the program again after the test ends, but I could make the same mistake again and need the bot to fix it.
  • I suggest amending the bot policy not to waste bureaucrat's time in such a meaningless request, which under current policy is mandatory.--Pere prlpz (talk) 23:17, 4 May 2013 (UTC)
    Looks OK for me. For one time requests you could ask other bot owner to perform a job. --EugeneZelenko (talk) 14:19, 5 May 2013 (UTC)
    Another bot owner would have needed to ask permission for this particular job. I'm a bot owner, with permission to do another job. Then, asking anybody else wouldn't have made it easier. It would have just meant spending the time of one person more.--Pere prlpz (talk) 14:43, 5 May 2013 (UTC)

Approved. --Dschwen (talk) 21:17, 9 May 2013 (UTC)