Wiktionary talk:Votes/bt-2023-02/User:Huhu9001Bot for bot status

From Wiktionary, the free dictionary
Latest comment: 1 year ago by JeffDoozan in topic Alternative command
Jump to navigation Jump to search

Implementation

[edit]

@Huhu9001 What software are you using to implement this bot? If the code you are running is more than just one or two commands, I personally consider it good practice to post it somewhere publicly so that others can review and re-use it. I see you have performed nine of the proposed edits using your bot. I suggest performing a total of about 20 to demonstrate that your code is not going to make bad edits, even if your code is just a regular expression. When I did this during my own bot vote it caused me to catch a bug in my code. I do hope this vote goes in your favour, though, and am happy to support if these issues are addressed. — excarnateSojourner (talk · contrib) 18:33, 27 February 2023 (UTC)Reply

Done. -- Huhu9001 (talk) 02:13, 28 February 2023 (UTC)Reply

Alternative command

[edit]

Just FYI, with a minor change to your regex, you can do this with the pywikibot replace command:

pwb replace -transcludes:Template:tracking/ja-headword/kyu -regex '({{ja-(?:noun|verb|verb-suru|adj|pos|phrase)\s*(?:\|[^{|}]*)*?)(\|\s*kyu=[^{|}]+)((\|[^{|}]*)*}})' '\1\3' '-summary:remove |kyu='

In the future, if you need to do more complex template parameter changes, check out mwparserfromhell JeffDoozan (talk) 21:46, 1 March 2023 (UTC)Reply