Lankide eztabaida:Theklan/2013ko urria

Orriaren edukia ez da onartzen beste hizkuntza batzuetan.
Wikipedia, Entziklopedia askea

A job for TheklanBot?[aldatu iturburu kodea]

Hi Theklan!

Do you think your bot could perform a run within the species categories fixing the layout similar to this? It is rather boring to do this manually without editing more (like adding distribution maps :))

Rbrausse (eztabaida) 08:16, 10 urria 2013 (UTC)

Thanks!
And matching should be solvable with regexp, something like (pseudocode, not tested and probably guaranteed not working directly) "s/|authority=.*[0-9]{4}/\1 \2/" and "s/<ref>\*/<ref>/"
Rbrausse (eztabaida) 13:27, 10 urria 2013 (UTC)
This does work (sed running in a bash) with Calamaria lateralis and Calamaria joloensis:
  • Space between author and year:
's/\(|authority=.*\)\([0-9]\{4\}<ref>.*\)/\1 \2/'
  • Removal of the asterisk in the reference:
's/<ref>\*/<ref>/'
Good luck :P Rbrausse (eztabaida) 09:22, 11 urria 2013 (UTC)
the second replacement (asterisk) is rather straight-forward: Search for "<ref>*" and replace it with "<ref>" - this could be done as I don't see any justification for a reference text starting with an asterisk.
the first regexp (space between author and year) is more complicated: Search and store as first element any line with "|authority=" [the part "(|authority=.*)], as second element look for 4 digits followed by <ref> ["([0-9]{4}<ref>.*)"]. The found line is replaced by the first element ["\1"], a space and the second element ["\2"].
at least this is the basic idea - I'm not really good in regexps....
I'll take a look at Python's regexp implementation - never worked with it. Could take some time, though.
Rbrausse (eztabaida) 16:08, 11 urria 2013 (UTC)
PS I'm sure you're aware of this - but just to be sure: You'll have to escape the asterisk - most likely with a backslash (as in "\*"). Rbrausse (eztabaida) 16:42, 11 urria 2013 (UTC)

nice work - thanks a lot! Rbrausse (eztabaida) 10:14, 22 urria 2013 (UTC)

Broken taxobox because of two range map properties[aldatu iturburu kodea]

Hi Theklan,

take a look at Calamaria lovii - the box is broken as I added two range maps at Wikidata. Both maps are valid (different taxonomic definitions, neither is "false" or "true"), but your template doesn't handle this well...

Yours, Rbrausse (eztabaida) 12:50, 14 urria 2013 (UTC)

okay, I hope my edit is correct - automagically adding all available maps would be IMHO not the best way, as this duplicates (or even multiplicates) the same information: e.g. Eublepharis macularius Two maps showing identical data, the choice is a matter of taste. Rbrausse (eztabaida) 13:04, 14 urria 2013 (UTC)