Hi all,
I'd like to do an automated replacement in ca.wikipedia.orghttp://ca.wikipedia.orgfor include geographic data of about 500 cities in Valencia (Spain) and for not getting nuts I was trying to do a *.bat file for making changes like this: replace.py -page:Ademús "{{Predomini lingüístic" "{{Coordenades geogràfiques del municipi|40|04|15|1|17|06}}\n{{Predomini lingüístic" replace.py -page:Ador "{{Predomini lingüístic" "{{Coordenades geogràfiques del municipi|38|55|05|0|13|31}}\n{{Predomini lingüístic" etc...
But Win2000 changes the stressed letters into artifacts. For this reason I was thinking that maybe I could use the -file:xxx option, is there some way for making a different change in each page included in the file? Besides, the code '\n' is not properly interpreted, which code should I use instead?
I hope you can help me to solve this little problem.
Thanks, David
On 9/16/05, David Cuenca dacuetu@gmail.com wrote:
Hi all,
I'd like to do an automated replacement in ca.wikipedia.orghttp://ca.wikipedia.orgfor include geographic data of about 500 cities in Valencia (Spain) and for not getting nuts I was trying to do a *.bat file for making changes like this: replace.py -page:Ademús "{{Predomini lingüístic" "{{Coordenades geogràfiques del municipi|40|04|15|1|17|06}}\n{{Predomini lingüístic" replace.py -page:Ador "{{Predomini lingüístic" "{{Coordenades geogràfiques del municipi|38|55|05|0|13|31}}\n{{Predomini lingüístic" etc...
But Win2000 changes the stressed letters into artifacts.
I'm not sure whether it works, but you could try using Adem%C3%BAs instead of Ademús etcetera.
For this reason I was thinking that maybe I could use the -file:xxx option, is there some way for making a different change in each page included in the file?
I don't think so. This looks like a thing that could be done better by making a dedicated bot. Either that or by hand.
Andre Engels
I'm not sure whether it works, but you could try using Adem%C3%BAs instead of Ademús etcetera.
I tried it, but the char tables are completely different so the % also are affected, anyways finally I´ve managed to "make a translation" using a macro that replaces the Hex code of each stressed character with the Hex code from the font used by Windows... odd, but it will do the trick.
I don't think so. This looks like a thing that could be done better by
making a dedicated bot. Either that or by hand.
Don't worry, now, with all the problems solved I'm about to turn it on :)
Thanks again ;-)
David
I'm not sure whether it works, but you could try using Adem%C3%BAs instead of Ademús etcetera.
I tried it, but the char tables are completely different so the % also are affected, anyways finally I´ve managed to "make a translation" using a macro that replaces the Hex code of each stressed character with the Hex code from the font used by Windows... odd, but it will do the trick.
I don't think so. This looks like a thing that could be done better by
making a dedicated bot. Either that or by hand.
Don't worry, now, with all the problems solved I'm about to turn it on :)
Thanks again ;-)
David _______________________________________________ Wikibots-l mailing list Wikibots-l@wikimedia.org http://mail.wikipedia.org/mailman/listinfo/wikibots-l
David, the other option you can try is importing replace.py into a separate file... I don't know if that would work for you, but I'm presuming you can just call: import replace
Then call any of the functions within the file like any other module...
---- Jason Y. Lee Computer Science Major University of California, Riverside
wikibots-l@lists.wikimedia.org