Wikidata:Requests for permissions/Bot/AmmarBot 4
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.
- Not done, no progress since August 2021. Feel free to re-open this if work resumes. Thanks. Mike Peel (talk) 18:38, 24 September 2022 (UTC)[reply]
AmmarBot 4[edit]
AmmarBot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Ammarpad (talk • contribs • logs)
Task/s:Import data for number of pages (P1104) from English Wikipedia
Code: book_data.py
Function details: The bot will periodically iterate through the pages using the {{Infobox book}} template on English Wikipedia and primarily attempt to extract the page number value if it exists and is valid. It will then add it to the corresponding data item of the page. If the page has no data item it will be skipped. Similarly if the value is not valid. Additionally where either ISBN-13 (P212)/ISBN-10 (P957) or OCLC control number (P243) exists (or both), are not already on Wikidata, and are valid there'll be imported too. This script is also is written as part of Outreachy program work and my mentor is Mike Peel. --Ammarpad (talk) 10:56, 19 July 2021 (UTC)[reply]
- what if the item isn't an instance of a book? can we see sample edits? BrokenSegue (talk) 15:36, 19 July 2021 (UTC)[reply]
- I think number of pages (P1104) is not limited for books only; the doc says "number of pages in an edition of a written work", and written-work comprises many things beyond bounded books. I will do some some test run now. Ammarpad (talk) 09:57, 20 July 2021 (UTC)[reply]
- I don't understand how it can apply to a written work. the same work can be published in multiple editions with different page counts.... BrokenSegue (talk) 23:38, 20 July 2021 (UTC)[reply]
- @BrokenSegue: Different editions have different items here, and the enwp article should be linked to the correct one if appropriate. If not, the enwp article should be moved to the correct item, along with content about that specific edition. Thanks. Mike Peel (talk) 09:47, 21 July 2021 (UTC)[reply]
- @Mike Peel: right so we shouldn't be adding page numbers to literary works. BrokenSegue (talk) 14:57, 21 July 2021 (UTC)[reply]
- @BrokenSegue: There seems to be a disconnect here, your follow-up wasn't what I was meaning. Can you expand more please? Thanks. Mike Peel (talk) 19:53, 21 July 2021 (UTC)[reply]
- @Mike Peel: Different editions have different items. Only editions of works have page counts. If a wikipedia article is linked to a literary work item but has a page number we shouldn't import the page number (works don't have page numbers, editions do). Because in this scenario wikipedia article is likely confused or linked to the wrong item. Either way don't import. BrokenSegue (talk) 20:50, 21 July 2021 (UTC)[reply]
- Thank you BrokenSegue, I am working on this now I will restrict the script to instances of book. Ammarpad (talk) 11:32, 24 July 2021 (UTC)[reply]
- Implemented this. Now restricted to instances of book (Q571). Ammarpad (talk) 06:12, 29 July 2021 (UTC)[reply]
- Sorry, book is probably too restrictive. You want to include other sensible things number of pages (P1104) supports like version, edition or translation (Q3331189). Also, the code link above no longer works. BrokenSegue (talk) 15:58, 29 July 2021 (UTC)[reply]
- I replaced the broken link. I also added version, edition or translation (Q3331189) as supported instance. Ammarpad (talk) 07:42, 30 July 2021 (UTC)[reply]
- Sorry, book is probably too restrictive. You want to include other sensible things number of pages (P1104) supports like version, edition or translation (Q3331189). Also, the code link above no longer works. BrokenSegue (talk) 15:58, 29 July 2021 (UTC)[reply]
- @Mike Peel: Different editions have different items. Only editions of works have page counts. If a wikipedia article is linked to a literary work item but has a page number we shouldn't import the page number (works don't have page numbers, editions do). Because in this scenario wikipedia article is likely confused or linked to the wrong item. Either way don't import. BrokenSegue (talk) 20:50, 21 July 2021 (UTC)[reply]
- @BrokenSegue: There seems to be a disconnect here, your follow-up wasn't what I was meaning. Can you expand more please? Thanks. Mike Peel (talk) 19:53, 21 July 2021 (UTC)[reply]
- @Mike Peel: right so we shouldn't be adding page numbers to literary works. BrokenSegue (talk) 14:57, 21 July 2021 (UTC)[reply]
- I share BrokeSegue's concerns. Wikipedia is unlikely to have articles on (different) editions of the same work (except the Bible). --- Jura 08:11, 7 August 2021 (UTC)[reply]
- Thanks, I believe I have already made changes to the script based on his feedback above. Ammarpad (talk) 21:53, 8 August 2021 (UTC)[reply]
- Can we see a new test run then? The one above still adds it to things like written works. Maybe adding it as qualifier to ISBN numbers instead could be a solution. --- Jura 09:53, 9 August 2021 (UTC)[reply]
- Thanks, I believe I have already made changes to the script based on his feedback above. Ammarpad (talk) 21:53, 8 August 2021 (UTC)[reply]
- @BrokenSegue: Different editions have different items here, and the enwp article should be linked to the correct one if appropriate. If not, the enwp article should be moved to the correct item, along with content about that specific edition. Thanks. Mike Peel (talk) 09:47, 21 July 2021 (UTC)[reply]
@Ammarpad: Is this bot request still active, or should it be archived? Thanks. Mike Peel (talk) 22:12, 18 January 2022 (UTC)[reply]