Wikivoyage:Bot/Autorizzazioni/Archivio/2013/06

Da Wikivoyage.
Questa è una pagina di discussione archiviata. Sei pregato di non modificarla! Utilizza la pagina attuale, anche se vuoi continuare una vecchia discussione.

Bot flag for CarsracBot

  • Operator  : Carsrac
  • Automatic or Manually Assisted : Automatic
  • Programming Language(s)  : Python (pywikipedia)
  • Function Summary  : Interwiki
  • Already has a bot flag (Y/N)  : Yes, on 200+ wikis. See here.
  • Function Details  : Add, modify, or remove interwikis

Thanks! Carsrac (discussioni) 03:04, 31 gen 2013 (CET)[rispondi]

  • Manovratore/Botmaster: User:Sumone10154
  • Nome del bot/Bot's name: User:Sumone's bot
  • Software: AWB
  • Altri progetti/List of bot flags on other projects: full list
  • Scopo/Purpose: fix Wikipedia interwiki links to point to it: instead of en:

sumone10154(talk) 01:23, 4 feb 2013 (CET)[rispondi]

It would make edits similar to this. sumone10154(talk) 22:24, 2 mar 2013 (CET)[rispondi]
Can use the short link [[w:page|text]] for linking it.wiki?--Wim b /[ t ] 19:02, 16 mar 2013 (CET)[rispondi]
It looks like a good idea to clean it up. But there should also not better to check if the new link is to correct page. But linking to an english page is alway incorrect on an italian project. Watchout that you will not create [[wikipedia:it:it:Rome]]. Carsrac (discussioni) 10:39, 17 mar 2013 (CET)[rispondi]
  • Manovratore/Botmaster: Wim b
  • Nome del bot/Bot's name: Wim bot
  • Software: pywikipediabot oppure AWB
  • Altri progetti/List of bot flags on other projects: full list
  • Scopo/Purpose: sostituzioni più o meno complesse usando anche regex quando necessario. Per una lista di contributi guardare su it.wikt

--Wim b (discussioni) 02:59, 7 mar 2013 (CET)[rispondi]

Trastful person with a lot of experience and the same account (Wim bot) has 35k+ edits on it.wikitionary 93.36.112.10 23:44, 14 mar 2013 (CET) (<-- sono io -.- Fale (discussioni) 00:03, 15 mar 2013 (CET))[rispondi]
 Favorevole --Andyrom75 (discussioni) 19:04, 16 mar 2013 (CET)[rispondi]
  • Manovratore/Botmaster: Andyrom75
  • Nome del bot/Bot's name: Andyrom bot
  • Software: pywikipediabot oppure AWB
  • Altri progetti/List of bot flags on other projects: full list
  • Scopo/Purpose: sostituzioni più o meno complesse usando anche regex quando necessario.

--Andyrom75 (discussioni) 19:04, 16 mar 2013 (CET)[rispondi]

✔ Fatto come da log: la segnalazione è qui da 10gg e il progetto ha bisogno di bot. Ho fatto il bold.--Wim b /[ t ] 17:42, 25 mar 2013 (CET)[rispondi]


  • Manovratore/Botmaster: SteveR
  • Nome del bot/Bot's name: SteveRBot
  • Software: pywikipediabot
  • Altri progetti/List of bot flags on other projects: full list
  • Scopo/Purpose: interwiki

--SteveR (discussioni) 16:52, 22 apr 2013 (CEST)[rispondi]

Hi Steve, I remember that last time there was some problem with your bot. Are you planning to add just the uk:interwiki or do you want to perform other activities/changes? Please, if any, list them all. Thanks, --Andyrom75 (discussioni) 17:09, 22 apr 2013 (CEST)[rispondi]
Hello! Thanks for your prompt reaction that time. That error occurred because those interwikis linked to pages that don't exist (my friend have already removed them). On Ukrainian wikivoyage we removed those invalid links from all pages using a regex. Russian colleagues asked us to do the same. My bot doesn't like invalid links, so it scrambled the interwiki order (just put invalid links in front of valid ones). Unfortunately, I couldn't predict that iw-conflict. My bot uses interwiki.py from pywiki library. On it.wikivoyage it'll put interwikis only (mainly ukrainian). Best regards, --SteveR (discussioni) 17:22, 22 apr 2013 (CEST)[rispondi]
Just to avoid misunderstanding and to be on the same page, could you configure your BOT to add only uk interwiki or other missing interwikis without affecting the current order? I want to understand if we have another option to the deletion, or it's the only one. Once we have understood all the possible scenarios I'll let you know how we would proceed. --Andyrom75 (discussioni) 17:28, 22 apr 2013 (CEST)I[rispondi]
Bot can ignore all links except Ukrainian but I've never tried this option. --SteveR (discussioni) 17:37, 22 apr 2013 (CEST)[rispondi]
Steve, we have briefly discussed internally, if you don't mind, could you run your bot without the bot flag for a sort of trial period, to double check that this time everything would be ok? During this period, please reduce the speed of the changes just to be able to stop it quickly in case of need. Regarding the incubator wiki, we'll adopt the Ukrainian adn Russian approach: delete them. Please let me know for any doubt. Thanks, --Andyrom75 (discussioni) 02:45, 23 apr 2013 (CEST)[rispondi]
Steve, I've seen that you have deleted manually the incubator interwiki. Could you add the automatic deletion of them? Or are you planning to do it manually when occur? --Andyrom75 (discussioni) 17:31, 23 apr 2013 (CEST)[rispondi]
No, today my bot made some test interwiki additions. I was checking its edits and I've just stumbled upon that article and deleted invalid links. I'm going to remove that links automatically. Is it OK, if bot removes part of that incubator interwikis without status? If you accept this, I'll launch it tomorrow. I suggest deleting invalid interwikis at first. After this operation bots will never scramble interwiki order, so everyone will be able to launch bot without restrictions. What do you think about it? Is it OK if bot makes clean up for the first time and just after that became an interwiki-bot? Best regards, --SteveR (discussioni) 20:33, 23 apr 2013 (CEST)[rispondi]
Ok for the 2-steps approach. For the first step, it would be great if you could specify in the subject of the change the list of the languages of the removed interwiki, if it's impossible just specify "incubator interwiki removal". Tomorrow, I'll be abroad for a short holiday so I can't guarantee my presence. If you want to make a try tonight I can help you to check the result, otherwise, another admin will monitor it. --Andyrom75 (discussioni) 22:41, 23 apr 2013 (CEST)[rispondi]
Done! My bot removed incubator interwiki. Now it is possible to add valid interwiki without fear of scrambling the order. --SteveR (discussioni) 17:25, 24 apr 2013 (CEST)[rispondi]
Are you sure that you have removed all the inappropriate interwiki? The amount of pages seems to be small. For example I've noticed that the templates still have several interwikis that should be removed (try to open one of those that you have modified last time). On top of this I've noticed that in a page your bot has deleted "normal text" far to be an interwiki (and than you have manually restored). This scares me... do you know why has it happened? --Andyrom75 (discussioni) 17:48, 28 apr 2013 (CEST)[rispondi]
Yes, I'm sure I removed all the inappropriate interwiki from the articles and all wikitravel/incubator interwiki from templates. That interwiki in last edited templates were imported from wikipedia with templates. I couldn't predict that so I'll remove them in the second wave (maybe tomorrow). As for deleting "normal text", everything is very simple. I just forgot to add ":" after the language code in regular expression. :) It happened just once, then I noticed that mistake, restored the article and corrected code. --SteveR (discussioni) 21:11, 28 apr 2013 (CEST)[rispondi]
Due to the fact that in the recent changes no issue has occurred, and that your bot has been tested in all the other wikivoyage's versions, I'm going to give you the bot flag. --Andyrom75 (discussioni) 20:34, 27 giu 2013 (CEST)[rispondi]
  • Manovratore/Botmaster: nella forma/in the form User:Kolega2357
  • Nome del bot/Bot's name: Kolega2357-Bot
  • Software: Pywikipedia (Python27)
  • Altri progetti/List of bot flags on other projects: Kolega2357-Bot
  • Scopo/Purpose: Interwiki bot

--Kolega2357 (talk) 01:16, 13 mag 2013 (CEST)[rispondi]

I'm reviewing your changes. Is your bot able to recognize the incubator interwiki that are already present in the article? It would be good to remove them or at least to order them within the other interwikis. The first example that I've found is in Kenya --Andyrom75 (discussioni) 10:20, 13 mag 2013 (CEST)[rispondi]
Yes my bot that can detect. --Kolega2357 (talk) 10:26, 13 mag 2013 (CEST)[rispondi]
Good, so please configure it in order to delete the incubator ones. In Kenya I've done it manually because your bot has skipped it. If I'll find another one, I'll highlight it to you without any manual change, so we can test it. --Andyrom75 (discussioni) 12:49, 13 mag 2013 (CEST)[rispondi]
Just found another one: Tanzania. Please check it & test it. --Andyrom75 (discussioni) 12:54, 13 mag 2013 (CEST)[rispondi]
It happens but it will be corrected. Every mistake you make bot will be corrected. --Kolega2357 (talk) 12:36, 21 mag 2013 (CEST)[rispondi]
My point was: are you able to tune your bot in order to avoid this kind of mistakes? It would be good to not manually review all its changes. --Andyrom75 (discussioni) 13:48, 21 mag 2013 (CEST)[rispondi]
Of course you can correct these types of errors, always use the latest script Pywikipedia. --Kolega2357 (talk) 21:40, 29 mag 2013 (CEST)[rispondi]
Good, so next time you'll use the bot to add the interwikis, be sure to use the latest Pywikipedia script and let's see if it really works. --Andyrom75 (discussioni) 22:38, 29 mag 2013 (CEST)[rispondi]
When I finally get a bot flag? --Kolega2357 (talk) 23:11, 29 mag 2013 (CEST)[rispondi]
After we have verified the correct functionality of the bot, until then we have to double check each change. In the meanwhile, feel free to use it without bot flag (in a semi-automated mode). --Andyrom75 (discussioni) 23:21, 29 mag 2013 (CEST)[rispondi]
  • Manovratore/Botmaster: Ricordisamoa
  • Nome del bot/Bot's name: SamoaBot
  • Software: pywikipediabot rewrite branch
  • Altri progetti/List of bot flags on other projects: itwiki, huwiki, elwiki, brwiki, kshwiki, fywiki, mtwiki, wikidata, commons, global (sulutil)
  • Scopo/Purpose: rimozione di chiavi di ordinamento categorico non più necessarie (esempio) --Ricordisamoa 22:33, 14 giu 2013 (CEST)[rispondi]
Pensi ce ne sia molte? Quale è il criterio di ricerca? --Andyrom75 (discussioni) 00:43, 15 giu 2013 (CEST)[rispondi]
Non c'è un criterio :-\ semplicemente cerca tutti i template, e la maggior parte sono da "fare". --Ricordisamoa 02:03, 15 giu 2013 (CEST)[rispondi]
Mi spiego meglio. Hai scritto una regex per individuarli/correggerli o usi un SW preconfezionato che se ne occupa? --Andyrom75 (discussioni) 07:40, 15 giu 2013 (CEST)[rispondi]
Un semplice
page.text=re.sub(ur'\[\[\s*([Cc]ategory|['+re.escape(site.namespace(14)[0].upper()+site.namespace(14)[0].lower())+']'+re.escape(site.namespace(14)[1:])+')\:(?P<cat>[^\|\[\]]*[Tt]emplate[^\|\[\]]+)\s*\|('+re.escape(page.title(withNamespace=False))+'|\{\{PAGENAME\}\})\s*\]\]','[['+site.namespace(14)+':\g<cat>]]',page.text)
in Python. --Ricordisamoa 07:46, 15 giu 2013 (CEST)[rispondi]
Un paio di note/domande. La dicitura Category non dovresti trovarla nel sito perchè tempo fa le sostituì tutte a favore di Categoria. Comunque, sebbene ridondante, male non fa.
Non essendo pratico con Python, non so cosa ottieni con site.namespace(14). Per come l'hai usato direi proprio Categoria, ma non ne sono sicuro.
Per lo stesso motivo di cui sopra, avrei bisogno di qualche info in più su:
(?P<cat>[^\|\[\]]*[Tt]emplate[^\|\[\]]+)\s*\|('+re.escape(page.title(withNamespace=False))+'|\{\{PAGENAME\}\})
--Andyrom75 (discussioni) 08:46, 15 giu 2013 (CEST)[rispondi]
  • page.text è il wikicodice del template
  • re.sub(sostituisco_questo,con_questo,in_questo) è la normale funzione di regex
  • site.namespace restituisce il nome "canonico" e tradotto di uno spazio dei nomi (site.namespace(14) dà proprio "Categoria"), non sarebbe indispensabile ma facilita l'adattamento ad altre lingue
  • page.title(withNamespace=False) è il titolo del template senza prefisso
  • re.escape evita che i caratteri speciali presenti in alcune stringhe possano "rompere" l'espressione regolare
  • la direttiva ?P<cat> rende il titolo della categoria richiamabile nella seconda parte mediante il gruppo "cat"
  • uso parentesi quadre per prevedere qualsiasi combinazione possibile di maiuscole/minuscole iniziali
--Ricordisamoa 09:53, 15 giu 2013 (CEST)[rispondi]
Forse ho formulato male la domanda; riprovo. Nel codice che ho evidenziato, non ho capito cosa cerchi e perchè. Sembra che cerchi Template e PAGENAME ma non ne capisco il motivo. ...se vieni in IRC qualche minuto magari ci capiamo meglio e prima... --Andyrom75 (discussioni) 10:02, 15 giu 2013 (CEST)[rispondi]
Se la chiave di ordinamento nella categoria è uguale al nome del template senza prefisso (oppure a "Bot/Autorizzazioni/Archivio/2013/06"), allora può essere rimossa; cerco "template" per assicurarmi che sia una categoria di template, ma si può anche togliere... --Ricordisamoa 11:01, 15 giu 2013 (CEST)[rispondi]
Resto con qualche perplessità. Puoi fare una semplice find (senza replace) per stabilire quante occorrenze ci sono? --Andyrom75 (discussioni) 11:11, 15 giu 2013 (CEST)[rispondi]
Ne ho trovati circa 150 fino a Template:LBR. --Ricordisamoa 11:22, 15 giu 2013 (CEST)[rispondi]
Ok. Se per te va bene, non è che possiamo procedere per passi successivi con pattern un po' più mirati prima di usare (se sarà il caso) quello sopra indicato?
Esemplifico. Nel caso delle bandierine, sebbene la categoria non venga richiamata, concordo con te sull'inutilità di ripetere il nome del template e che per tanto vada eliminato. Quindi, fai prima una passata con "Categoria:Template bandierine nazionali|..." rimpiazzandoci direttamente "Categoria:Template bandierine nazionali" su tutte le categorie che hanno un nome composto da tre lettere e poi riconta quanti ne restano.
Che ne pensi? --Andyrom75 (discussioni) 11:37, 15 giu 2013 (CEST)[rispondi]

──────────────────────────────────────────────────────────────────────────────────────────────────── Va bene! --Ricordisamoa 11:44, 15 giu 2013 (CEST)[rispondi]

Ti metto il flag di bot, per questa singola modifica e poi ci riaggiorniamo con il conteggio non appena hai fatto. --Andyrom75 (discussioni) 11:50, 15 giu 2013 (CEST)[rispondi]
Dimenticavo, per quanto banale, fammene giusto un paio in chiaro subito. Grazie, --Andyrom75 (discussioni) 11:52, 15 giu 2013 (CEST)[rispondi]
[1] e [2]. --Ricordisamoa 11:59, 15 giu 2013 (CEST)[rispondi]
Perfetto grazie. Ti ho messo il flag. Riaggiorniamoci a valle della modifica. --Andyrom75 (discussioni) 12:06, 15 giu 2013 (CEST)[rispondi]
  • Manovratore/Botmaster: nella forma/in the form Utente:Wrh2
  • Nome del bot/Bot's name: Utente:Wrh2Bot
  • Software: wiki-java
  • Altri progetti/List of bot flags on other projects: en:voy and pt:voy. Details in [link].
  • Scopo/Purpose: migrate the XML tags into Template:Listing

--Andyrom75 (discussioni) 21:23, 22 giu 2013 (CEST)[rispondi]

 Favorevole This is a necessary bot. Before givin the flag and start the job, we just need to very few test pages. --Andyrom75 (discussioni) 21:26, 22 giu 2013 (CEST)[rispondi]
Test passed. Bot authorized. --Andyrom75 (discussioni) 23:26, 22 giu 2013 (CEST)[rispondi]