Wikidata:Requests for permissions/Bot/RfcBot
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 Bot flag granted. --Lymantria (talk) 10:48, 10 January 2018 (UTC)[reply]
RfcBot edit
RfcBot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Dhx1 (talk • contribs • logs)
Task/s:
- Add Request for Comments (Q212971) items where they do not currently exist (checked via existence of both RfC ID (P892) and instance of (P31) Request for Comments (Q212971))
- Add missing claims to Request for Comments (Q212971) items (including addition of references)
- Add missing references to claims on Request for Comments (Q212971) items
Code:
- GitHub repository for RfcBot
- Tested with Python 3.5.4
- Tested with HEAD git revision of Pywikibot as of 6 Jan 2018
Function details:
- Loads the latest RFC database (XML variant) from disk or directly from the RFC index file hosted online
- Queries Wikidata to match RFC database entries to existing Wikidata items
- Check performed via existence of both RfC ID (P892) and instance of (P31) Request for Comments (Q212971)
- Whilst code exists for an additional DOI (P356) check, the query is too slow to complete so this method is disabled
- For each RFC database entry that does not have a matching Wikidata item already in existence:
- Create a new Wikidata item with appropriate label, description and aliases in English (all RFC publications are only in English AFAIK)
- Create the following statements completed with a reference to the RFC Index (Q33133762):
- For each RFC database entry that has an existing/matched Wikidata item:
- Check that the following statements exist and have a reference to the RFC Index (Q33133762):
--Dhx1 (talk) 16:06, 5 January 2018 (UTC)[reply]
- Comment This is the first time I have requested a bot account. Unfortunately I got the request procedure order incorrect and have already performed a small number of carefully controlled and monitored test edits at 1, 2, 3, 4 and 5. The latest source code in the Git repository uses the bot flag for edits, and also increases the edit frequency to the recommended 1 edit per 5 seconds. Dhx1 (talk) 16:16, 5 January 2018 (UTC)[reply]
- Support the new items you've created look good. Can you run one or two sample updates of existing RFC entries with the bot account to verify that side of it? ArthurPSmith (talk) 16:36, 5 January 2018 (UTC)[reply]
- Comment @ArthurPSmith: I've run a few test edits for updating existing RFC entries and updated the bot script to resolve some minor bugs. See 1, 2, 3, 4, 5 and 6. Updated code diff at 1 if interested. Dhx1 (talk) 07:21, 6 January 2018 (UTC)[reply]
- I don't see any problems, thanks! ArthurPSmith (talk) 16:12, 8 January 2018 (UTC)[reply]
- @Dhx1: Could you create a user page for your bot, preferrably with
{{Bot|Dhx1}}
? If you have done that, I am ready to grant the bot flag, provided that no objections are raised in the meantime. Lymantria (talk) 13:39, 9 January 2018 (UTC)[reply]