Wikidata:Requests for permissions/Bot/CaliburnBOT
The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section. A summary of the conclusions reached follows.
- Approved--Ymblanter (talk) 12:37, 6 April 2015 (UTC)[reply]
CaliburnBOT (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Caliburn (talk • contribs • logs)
Task/s: Adding Commons category (P373) to pages in this category and this category. (and other similar categories on non-English Wikis on request)
Code: User:Caliburn/code.py (the actual python file is stored locally on my computer, so this may not represent the final version, or the version that is being used) and User:Caliburn/code.py/fi
Function details: Basically, it loads a page from the category specified in the short description, uses mwparserfromhell to get the parameter, then adds the parameter. You can see some working diffs: here and here. I did run into a few problems, but those have been resolved and have been retested. Note:I would do this on my Caliburn account, but it's currently being renamed. I will post a confirmation signature when I can log in. CaliburnBOT (talk) 12:21, 20 February 2015 (UTC)[reply]
Confirmation: --George (Talk · Contribs · CentralAuth · Log) 12:52, 20 February 2015 (UTC)[reply]
- On hold - making large improvements and modifications. This might take some time. --George (Talk · Contribs · CentralAuth · Log) 12:56, 22 February 2015 (UTC)[reply]
@Caliburn: your script is wrong, because if template.name == "Commons category" or "Commons cat" or ...
will always evaluate as True. You should probably write something like: if template.name.strip() in ("Commons category", "Commons cat", ...)
. --Ricordisamoa 10:30, 30 March 2015 (UTC)[reply]
- @Ricordisamoa: Thanks! :D The code is probably badly written, as this is my first attempt at a bot. I will make the change. Otherwise, how does it look? --George (Talk · Contribs · CentralAuth · Log) 15:02, 30 March 2015 (UTC)[reply]
- Done - The bot is ready to be flagged. --George (Talk · Contribs · CentralAuth · Log) 10:34, 3 April 2015 (UTC)[reply]
- We are going to wait for comments for several days.--Ymblanter (talk) 11:33, 3 April 2015 (UTC)[reply]
- Ok, thanks. :) For anyone that can help, I'd like to know if there's any more errors in the code that I should fix. --George (Talk · Contribs · CentralAuth · Log) 17:05, 3 April 2015 (UTC)[reply]