Wikisource:Bot requests

From Wikisource
Jump to navigation Jump to search
Bot requests

This page allows users to request that an existing bot accomplish a given task. Note that some tasks may require that an entirely new bot or script be written. This is not the place to ask for help running or writing a bot.

A bot operating performing a task should make note of it so that other bots don't attempt to do the same. Tasks that are permanently assigned or scheduled for long-term execution are listed on Persistent tasks. See also Wikisource:Bots.

Move all subpages of Who's Who in the Far East to use title case[edit]

I was informed by User:Beeswaxcandle that I should use title case instead of all caps in article names. So I request to move all subpages of Who's Who in the Far East to use title case. Although I can use a bot to move it myself, that would leave tons of redirects for admins to delete. But if an admin can easily batch-delete a list of pages, I can move it myself and then provide the list of pages to delete. I'm sorry for the inconvenience. Thanks, --Stevenliuyi (talk) 08:58, 6 May 2021 (UTC)Reply[reply]

@Stevenliuyi: Please review the list at Wikisource:Bot requests/sandbox. I notice that there is at least one English name that needs to be fixed, and the Chinese names didn't convert on the regex that I used. Would you fix or create the target (only) in the list in the pair list, and I will get it done. No need to fix those that are broken though you should fix the previous/next links of the articles either side. To note that as I did for your other work, I will look to get a work specific template in place, though will do that afterwards. — billinghurst sDrewth 13:10, 24 May 2021 (UTC)Reply[reply]
I suppose that I really to want to ensure that the Chinese names are capitalised properly. — billinghurst sDrewth 02:57, 25 May 2021 (UTC)Reply[reply]
@Stevenliuyi and @Billinghurst: Has this request been actioned (i.e. can it be closed as resolved)? Xover (talk) 10:34, 10 April 2022 (UTC)Reply[reply]
@Stevenliuyi: Please see Billinghurst's request (above) for quality control of the list of targets in Wikisource:Bot requests/sandbox. They have done the legwork to prepare for the move, but it is unable to progress until you've checked and corrected the target page names. Xover (talk) 05:33, 3 September 2022 (UTC)Reply[reply]
@Stevenliuyi: This is blocked on your input here. Xover (talk) 10:19, 7 November 2023 (UTC)Reply[reply]

Wikidata bulk edit[edit]

I made a query for works on enWS that have WD items with no "instance of" statement. The criteria I used are:

  • Pages in mainspace
  • No redirects or disambiguation pages (this includes Versions and Translations btw)
  • Does not contain a forward slash in the page name (in order to exclude subpages)
  • Is linked to Wikidata, and linked Wikidata item does not have a P31 statement

This query returns 13889 results, which is more than even QuickStatements can handle. Would it be possible for a bot to update these Wikidata items with P31=Q3331189 (instance of = version, edition, or translation)?

Thanks :) —Beleg Tâl (talk) 13:22, 1 November 2021 (UTC)Reply[reply]

I think we could be more specific for certain groups, e.g I have addressed "Presidential Radio Address" articles as "instance of speech". There are several groups of articles that can be identified and then addressed with QuickStatements. After that, the bot can be run on what is left. Mpaa (talk) 23:13, 1 November 2021 (UTC)Reply[reply]
@Mpaa: Except they are editions as we host them, the speech would be the parent to the item, per d:WD:Books as there may be other published editions of the same speech. — billinghurst sDrewth 12:17, 5 September 2022 (UTC)Reply[reply]
@Billinghurst I see. I saw other were linked that way and I followed along. If it is not correct, it should be cleaned up but I do not master wikidata tools enough to write a bot for it. Mpaa (talk) 21:34, 5 September 2022 (UTC)Reply[reply]
We desperately need better Wikidata tools (so we're not dependent on Billinghurst to be on eternal vigilance here). But the current gadget we have for this is loaded from some user's personal page on Russian Wikisource (which is kinda iffy in itself these days), and its code is completely incomprehensible. If anybody knows of or runs across good API docs for how to talk to Wikidata I'd be very interested. As far as I can tell, the only existing API is the main MW:API with some very minor additions for WD, and that's way way too painful to use for our purposes. Xover (talk) 06:15, 6 September 2022 (UTC)Reply[reply]
@Xover: Maybe we should just be bold and create a phabricator task and see where we go. We probably should have put this into the desired toys to be built for 2023, though we have missed that boat as it is currently in final stages of voting (I think). — billinghurst sDrewth 05:40, 22 February 2023 (UTC)Reply[reply]
User:Beleg Tâl why not just do it with Petscan itself, from memory it could additions. Also note that there is the interwiki Petscan: for these. — billinghurst sDrewth 12:14, 5 September 2022 (UTC)Reply[reply]

 Comment wondering whether we need to chip out components of this task. For example, something like petscan:23959659 shows works using {{Act of Congress}} which would not be edition, and would instead by another item, and they also have components that could have other elements added through QuickStatements. Yes, this will still need a large slab of works that need version, edition or translation (Q3331189) added, though at least it will allow for something less than the blunderbuss approach. — billinghurst sDrewth 05:24, 27 February 2023 (UTC)Reply[reply]

The three volumes of The Last Man only have a different title page between the first and second edition, could the proofread text of the three-volumes of the second edition be copied to the scans of the first edition. Languageseeker (talk) 23:29, 16 July 2022 (UTC)Reply[reply]

@Mpaa If it is OK to copy also the Page status, better wait for all 3 vols to be validated. Mpaa (talk) 13:53, 18 July 2022 (UTC)Reply[reply]
Makes Sense. 13:49, 22 July 2022 (UTC)

This one's a bit more complicated than my previous request. I'm working on doing the styles with templates and CSS classes. Fortunately, the users who worked on these pages have been remarkably consistent with the formatting markup, so it's pretty easy to update with find and replace (I've done a couple pages). The replacements I'd like for each subpage, in order, are:


{|cellspacing="0" cellpadding="6" border="0" width="90%" align="center"|


{{World Factbook 2004/table header}}


{|width="90%" border="0" cellspacing="0" cellpadding="6" align="center"|


{{World Factbook 2004/table header}}


!align="left" valign="middle" width="20%" height="31" style="background:#CCCCCC;"|[section]
!align="left" valign="middle" width="80%" height="31" style="background:#CCCCCC;"|[country]


{{World Factbook 2004/table section|[section]|[country]}}


!align="left" valign="middle" width="20%" height="31" bgcolor="#CCCCCC"|[section]
!align="left" valign="middle" width="80%" height="31" bgcolor="#CCCCCC"|[country]


{{World Factbook 2004/table section|[section]|[country]}}


! width="20%" align="right" valign="top"|




| width="80%" align="left"  valign="top"|






{{World Factbook 2004/table header}}



{{World Factbook 2004/table header}}

For clarity, [words in brackets] are placeholders, and a blank line at the end of a code block means to include the ending linebreak in the pattern. Thanks! —CalendulaAsteraceae (talkcontribs) 05:17, 24 January 2023 (UTC)Reply[reply]

Checkmark This section is considered resolved, for the purposes of archiving. If you disagree, replace this template with your comment. Mpaa (talk) 22:25, 6 December 2023 (UTC)Reply[reply]

Please convert any straight quotes to curly quotes. It seems Vol 1 (although I haven't checked through all of it) and much of Vol 2 have curly quotes, except near the end of Vol 2, the consistency is lost. Of course, if you feel like doing any other cleaning up (spaces around semicolons or hyphens, or missed nops), feel free, although I have hopefully caught most of them (again, mainly near the end of V2). Thanks, TeysaKarlov (talk) 21:54, 4 February 2023 (UTC)Reply[reply]

done. Mpaa (talk) 17:48, 12 February 2023 (UTC)Reply[reply]
@Mpaa Thanks! If I might ask one more thing, is there an issue with my Historic Highways request on the Scan Lab, or in just my foolish forgetting to ping the Scan Lab, did it go unnoticed? Thanks again, TeysaKarlov (talk) 21:18, 19 February 2023 (UTC)Reply[reply]

As discussed here, I'm working on updating some of the heading templates. These are uses of {{chapter heading}} in the Page namespace, with no additional parameters, where I've already set up the index to use {{pseudoheading}} and maintain the same styles: I would really appreciate it if, in the pages listed in the petscan, {{chapter heading| and {{ch| could be replaced with {{pseudoheading|. Thanks! —CalendulaAsteraceae (talkcontribs) 05:36, 7 March 2023 (UTC)Reply[reply]

@CalendulaAsteraceae: Not certain why we are doing any of this? template:chapter heading is not something that the community has had any consensus to do, and I would propose that it is out of sync with WS:Style guide and the presentation of text and the use of display layers. and peoples ability to have their own CSS as they require. Text is king. — billinghurst sDrewth 21:34, 7 March 2023 (UTC)Reply[reply]
@Billinghurst, I'm having trouble parsing this. I understand that you're raising concerns about my approach to template creation and/or use, and I would like to understand your concerns better so I can respond appropriately. In particular, is there a verb missing from the beginning of "template:chapter heading is not something that the community has had any consensus to do"?
My understanding had been that templates like {{pseudoheading}}, which are designed for use with index CSS, are essentially meant to be an alternative to layering formatting templates like {{center|{{larger|Chapter 1}}}} in cases where there's consistent formatting throughout a work. Personally, when I'm proofreading a work, I prefer index styles when there's repeated formatting throughout a work and I might change my mind partway through about what that formatting should be (like if I notice that those smaller all-caps lines were actually regular-sized all-small-caps). Is this understanding missing something?
I'm not clear on what "display layers" means in this context, nor on what you're saying interferes with people's ability to have their own CSS. I wouldn't expect inline styles vs. CSS to make much of a difference in that regard, so again, I'm probably missing something here. (And that something may be experience customizing websites' CSS beyond making minor improvements with Stylus.) —CalendulaAsteraceae (talkcontribs) 08:08, 8 March 2023 (UTC)Reply[reply]
@Billinghurst, @CalendulaAsteraceae what's the forward here? The approach looks reasonable to me, the only unclear thing is if, after this, the intention is to kill {{chapter heading}}. Mpaa (talk) 19:01, 8 December 2023 (UTC)Reply[reply]
@Mpaa: I for one would like to either kill {{chapter heading}} (after making sure it's unused) or convert it to a {{pseudoheading}} derivative without all the manual style parameters (after making sure Category:Chapter heading usage with manual styles is empty, which it currently is apart from the documentation). Really the only visible difference between {{ch}} and {{ph/main}} is the margins. —CalendulaAsteraceae (talkcontribs) 20:40, 8 December 2023 (UTC)Reply[reply]

Multiple missing images and interleaved blank pages[edit]

The body of "The Pictorial Flora; or British Botany Delineated" comprises alternating images and blank pages; all unnumbered.

Please can someone use a bot to set each image page to match file page 9 (with the page number in the template incremented appropriately) and the interleaved blank pages to match file page 10?

If you have a tool to build the page index to match, so much the better. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 19:08, 7 March 2023 (UTC)Reply[reply]

@Pigsonthewing: Three helpers
  1. use the script MediaWiki:Gadget-Without text.js <=without text (script enables clear and save of Page: ns pages
  2. we can write you a script for your sidebar to click to add {{raw image|{{subst:FULLPAGENAME}}}}
  3. For the Index: page there is also the available "even" and "odd" syntax that enables one to mark the pages as you require, see mul:Wikisource:ProofreadPage#The <pagelist/> tag.
Noting that we can just mark the empty page as empty, and have no need to do anything with them, neither mark them without text, and this way any transclusion will just ignore them as they don't exist. So skipped 1) and done 3). For 2) I await your guidance. Personally, I would not do anything and just add them when the images are ready. — billinghurst sDrewth 21:22, 7 March 2023 (UTC)Reply[reply]
Thank you. Every day's a school-day. When I asked previously about bulk marking pages as without text, I was referred here. My wish was to not have to visit every such page, even script assisted, to carry out repetitive task. "=empty" is useful, but it's a pity that it renders bogus page numbers on the index page. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:57, 8 March 2023 (UTC)Reply[reply]
I tried that in The Pictorial Flora; or British Botany Delineated/001-132, but there are red links between several of the pates (but not the first few). Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 22:06, 8 March 2023 (UTC)Reply[reply]
Index namespace is a work area, and the use of pagelist is to push the components through to transcluded namespace. It is not designed to be sexy, it is designed to show the workings. If you think that it needs improving for the page numbers marked empty, that is a job for phabricator: and the ProofreadPage extension. — billinghurst sDrewth 06:19, 11 April 2023 (UTC)Reply[reply]

Fix index of moved scan file: Index:Paralimomena Pick 1908.djvu[edit]

Checkmark This section is considered resolved, for the purposes of archiving. If you disagree, replace this template with your comment. Mpaa (talk) 22:25, 6 December 2023 (UTC)Reply[reply]

The scan file was moved without updating the Index page. Can someone please move the Index page and all Page pages from Index:Paralimomena Pick 1908.djvu to Index:Paralipomena Pick 1908.djvu and remove redirects? Thanks! —Beleg Âlt BT (talk) 15:08, 14 November 2023 (UTC)Reply[reply]

Doing… Xover (talk) 08:18, 15 November 2023 (UTC)Reply[reply]
@Beleg Tâl / @Beleg Âlt: Done Xover (talk) 08:26, 15 November 2023 (UTC)Reply[reply]

This involves both links in works as well as links within headers and Index: pages. --EncycloPetey (talk) 23:54, 18 November 2023 (UTC)Reply[reply]

@EncycloPetey: The redirect was changed into a dab in 2015, so all links added since could conceivably be legitimately pointed at the dab (to the degree links to an author dab are legitimate). Is the plan here to keep Author:Charles Dickens as a dab, or to convert it back to a redirect? Are we comfortable assuming nearly all extant inbound links should go to Author:Charles John Huffam Dickens instead?
I can do the bot run, and modulo som edge cases it should be a fairly straightforward job, but I'd like to be sure I understand it and don't make a mess. Xover (talk) 11:42, 19 November 2023 (UTC)Reply[reply]
@Xover: You're looking at the wrong history. The history currently there is a result of the recent move of Author:Dickens to Author:Charles Dickens, for which the previous redirect had to be deleted. The history of this location prior to yesterday can be found in the deleted history of the redirect. It was there until yesterday, when the surname-based disambiguation pages were deleted and/or moved. This was one of the moves, and is the reason for the bot request. --EncycloPetey (talk) 17:55, 19 November 2023 (UTC)Reply[reply]
Ah, ok, I think I got it now. Author:Charles Dickens was a redirect to Author:Charles John Huffam Dickens until yesterday. Now it's been converted to a dab, so all the pages that linked to Author:Charles John Huffam Dickens through the old redirect must now be updated to link directly to Author:Charles John Huffam Dickens. Right?
Provided I didn't get confused again along the way there I'll try to get the replacement run started later today or tomorrow. Xover (talk) 18:31, 19 November 2023 (UTC)Reply[reply]
@EncycloPetey: Done. Modulo some cases that can't be bot'ed etc. Xover (talk) 21:46, 19 November 2023 (UTC)Reply[reply]

Migrate more one- and two-parameter invocations of Template:RunningHeader[edit]


  • {{[running header]|[text]}} to {{rh|[text]||}}
  • {{[running header]||[text]}} to {{rh||[text]|}}
  • {{[running header]|[text]|}} to {{[running header|[text]||}}
  • {{[running header]|[left text]|[center text]}} to {{rh|[left text]|[center text]|}}
  • {{[running header]|[left text]|[center text]|{{[template]|[space or nothing]}}}} to {{rh|[left text]|[center text]|}}
  • {{[running header]|{{[template]|[space or nothing]}}|[center text]|[right text]}} to {{rh||[center text]|[right text]}}
  • {{[running header]|{{[template]|[space or nothing]}}|[text]|{{[template]|[space or nothing]}}}} to {{rh||[text]|}}
  • delete {{rh|| }}

CalendulaAsteraceae (talkcontribs) 03:38, 21 November 2023 (UTC)Reply[reply]

Just to note... Since there's no pre-made page generator to give pywikibot all these pages to work on I am going to have to make custom bot to loop over them, and since I don't have any similar code lying around that's going to have to wait until I have the time to sit down to figure out how to do that. Pywikibot also at some point seems to have dropped the ReplaceBot class, so I may have to reimplement a lot of the basic logic for that too. @Mpaa: you wouldn't happen to have any code like this handy that you could share? Or any advice on how to approach this? Xover (talk) 07:02, 26 November 2023 (UTC)Reply[reply]
@Xover it's called ReplaceRobot it this what you mean. I would use and make it in chunks; note that you can feed several -prefixindex:<prefix> at at time.

As a side comment, it seems you are changing the signature for {{rh}}, isn't it? If so, I haven't followed the discussion and the rational, but given the wide and long established use of the template, I am a bit skeptical (e.g. I have never specified the last | in {{rh|10|SOME WORK}}, so I expect a learning time, with more of this kind of replacement to be done. Mpaa (talk) 11:52, 26 November 2023 (UTC)Reply[reply]
@Mpaa: Isn't that an internal class for the script? There used to be a base pywikibot ReplaceBot class for making custom replace bots, but it got dropped at some point (or at least I wasn't able to find it). My Python-fu is pretty weak sauce so I could just be confused.
I've been using stock with options, but the list of indexes above is going to be a bear to do that way so I was looking for some way to do it in a foreach (and wrapping in perl, natch, failed due to PAWS' funky handling of stdin).
And, yes, the bot runs are part of changing the call signature of {{rh}} such that the number of args determines how many cells you get. The change should (I think) be immediately obvious so the learning curve might not be so bad. The most tricky case is when rh only gets two params, because that used to give you left+center and will now give you left+right. Xover (talk) 18:46, 26 November 2023 (UTC)Reply[reply]
@Xover: Would it be easier for you to work with a tracking category? If so, we should talk in more detail about the tracking categories I've added to Module:Running header and my thoughts on a two-stage migration. —CalendulaAsteraceae (talkcontribs) 01:06, 27 November 2023 (UTC)Reply[reply]
@CalendulaAsteraceae: Yes. Any list of pages I can reliably get from one of the Page Generators is much easier to work with because then I can just fire off the stock script. Getting the regexen right still requires some tweaking, but I speak regex natively so that's usually not a big problem.
Making a custom script for stuff like this isn't really that hard either, it's just that I have never done it—or worked with other custom pywikibot code—and combined with not being a Python coder it means it takes sustained attention and effort to learn first (which is the kind of time I have trouble finding).
Incidentally, Mpaa, being able to specify an Index: page in order to work on all the Page:es associated with it, might be a nice convenience for pywikibot. -pagesinindex:"Foo.djvu" or something. -prefixindex:"Page:Foo.djvu/" with manual fiddling works fine, but it is a couple of extra steps. Xover (talk) 07:06, 28 November 2023 (UTC)Reply[reply]

Remove empty invocations of Template:RunningHeader[edit]

So, I just learned that \s doesn't get results in an insource search, but just typing the space character does, and with that knowledge, I've found more empty running headers. Please delete all cases of \{\{[Rr](unning)?(\s)?[HhFf](eader)?\|[\| ]*\}\} in these pages. —CalendulaAsteraceae (talkcontribs) 04:26, 22 November 2023 (UTC)Reply[reply]

@CalendulaAsteraceae: Done Xover (talk) 13:40, 7 December 2023 (UTC)Reply[reply]
Thank you! —CalendulaAsteraceae (talkcontribs) 00:58, 8 December 2023 (UTC)Reply[reply]
Checkmark This section is considered resolved, for the purposes of archiving. If you disagree, replace this template with your comment. —CalendulaAsteraceae (talkcontribs) 00:58, 8 December 2023 (UTC)Reply[reply]
Checkmark This section is considered resolved, for the purposes of archiving. If you disagree, replace this template with your comment. Mpaa (talk) 22:25, 6 December 2023 (UTC)Reply[reply]

I mistakenly moved In the Days of the Comet to within the collected works of H. G. Wells. I have tried to undo the move myself but the system responds with the message (in red) 'The edit appears to have already been undone.', but it hasn't. Can someone fix this please?

Should be OK now. Mpaa (talk) 10:22, 2 December 2023 (UTC)Reply[reply]

A newcomer had been adding {{wdl}} template usages throughout the work. These need to be removed from all Page: uses, both the template and Q-id. --EncycloPetey (talk) 19:57, 4 December 2023 (UTC)Reply[reply]

@EncycloPetey What is the rationale? On the template page itself there is no mention of proper or improper use. Is it because it can be considered overlinking in this case? If so, a mention about proper usage on the template page might be needed. Mpaa (talk) 21:51, 4 December 2023 (UTC)Reply[reply]
The rationale is Wikisource:Annotations. Links to Wikidata are not permitted links. I agree, we need more people documenting the correct use of templates, as most of our templates have little to no guidance on proper and improper use. --EncycloPetey (talk) 23:55, 4 December 2023 (UTC)Reply[reply]
That was a lot of work. I left a note on the talk page and saved the annotations if someone is going to need them. I will run the bot in the coming days. Mpaa (talk) 22:19, 6 December 2023 (UTC)Reply[reply]
Ugh, and that's rather a lot of work by the contributor, which looks like pretty good quality too from what little I looked, so it's a crying shame to lose it. Makes me think we should look into ways to facilitate "invisible" annotations of this sort, but I suspect anything we could actually do just now would be infeasible in practice. Xover (talk) 06:06, 7 December 2023 (UTC)Reply[reply]
Yes, exactly. That is why I saved it before deleting it. Regarding visibility, there was some talk about it in the template talk page and in Template:Wikidata_link/styles.css. Maybe it is not a feature that is too complex to add (for those who know how to play with gadgets and .js, i.e. not me). Mpaa (talk) 20:22, 7 December 2023 (UTC)Reply[reply]
Links to Wikidata where done onside a University of Florence. Italy, project whose students worked initially on french Wikisource e than on e.wikisource, learning to correct texts on Wikisource and create items on Wikidata. Susanna Giaccai (talk) 09:45, 8 December 2023 (UTC)Reply[reply]
@EncycloPetey @Giaccai I can't understand this issue. I appeciate as lot the idea of Wdl template, since it usually outputs robust dynamic wikisource or wikipedia links that can't be broken by an edit of wikisource or wikipedia page names (and linking to an editable field is a terrible database mistake!). IMHO this is an excellent feature. When the template links to a wikidata item, it simply encourage any willing user to create a needed wikisource or wikipedia page. I can't see anything wrong into this template behaviour. Alex brollo (talk) 09:54, 8 December 2023 (UTC)Reply[reply]
@Alex brollo: The links were against our linking policy. Links, in general, are treated like annotations on enWS, and hence the linking policy only permits a very controlled subset of links. In this particular case the links were to things like historical personages, places, structures, concepts, etc. Those are appropriate links for a Wikipedia article, but not for a text reproduced on Wikisource (I mean enWS here; other languages will obviously have their own policies and practices around this). In essence, we permit links to authors (people who have or should have an Author:-namespace page on enWS) and works (anything that is or could be hosted on enWS), plus a very limited set of Wikitionary links. Even permitting very restricted linking to authors on enWP was controversial the last time we had a discussion, and there is a general fear of overlinking (we've had some egregious examples). Xover (talk) 12:53, 8 December 2023 (UTC)Reply[reply]
@Xover @Giaccai Thanks, I realize that overlinking could be a problem. Nevertheless, IMHO I think that Wdl is appropriate for links to Authors, and to Works, even when the resulting link points to Wikidata. Alex brollo (talk) 17:02, 8 December 2023 (UTC)Reply[reply]
In a footnote or bibliography, this makes sense, because the work is pointing the reader to that author or source. But in the middle of a paragraph, it (a) becomes a visual distraction, and (b) creates problems for people reading with touch-screens, who inadvertently open links and leave the text without meaning to. It's as much an accessibility issue as it is aesthetic. --EncycloPetey (talk) 17:50, 8 December 2023 (UTC)Reply[reply]

I replaced the file for this work because it was missing its title page. Could you increment the page number on all of the transcribed pages by 1 please. Regards,Chrisguise (talk) 11:09, 7 December 2023 (UTC)Reply[reply]

@Chrisguise: Done Xover (talk) 11:37, 7 December 2023 (UTC)Reply[reply]
Thanks. Chrisguise (talk) 12:15, 7 December 2023 (UTC)Reply[reply]