@ -295,21 +295,21 @@ Licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/2
< h1 > Neinomaten == Wikibots< / h1 >
< pre >
< font color = "#a520f7" > #!/usr/bin/env ruby< / font >
< font color = "#a520f7" > require< / font > < font color = "#6b59ce" > '< / font > < font color = "#ff00ff" > mediawikibot< / font > < font color = "#6b59ce" > '< / font >
< span class = "vim-control" > #!/usr/bin/env ruby< / span >
< span class = "vim-control" > require< / span > < span class = "vim-quote" > '< / span > < span class = "vim-constant" > mediawikibot< / span > < span class = "vim-quote" > '< / span >
< font color = "#a52829 "> < b > if< / b > < / font> < font color = "#008a8c" > ARGV< / font > .size() != < font color = "#ff00ff" > 2< / font >
< font color = "#008a8c" > $stderr< / font > .print(< font color = "#008a8c" > $0< / font > + < font color = "#6b59ce" > " < / font > < font color = "#ff00ff "> < wiki-user> < wiki-password> < / font> < font color = "#6b59ce" > \n< / font > < font color = "#6b59ce" > " < / font > )
< font color = "#a52829 "> < b > exit< / b > < / font> (< font color = "#ff00ff" > 1< / font > )
< font color = "#a52829 "> < b > end< / b > < / font >
< span class = "vim-statement "> < b > if< / b > < / span> < span class = "vim-var" > ARGV< / span > .size() != < span class = "vim-constant" > 2< / span >
< span class = "vim-var" > $stderr< / span > .print(< span class = "vim-var" > $0< / span > + < span class = "vim-quote" > " < / span > < span class = "vim-constant "> < wiki-user> < wiki-password> < / span> < span class = "vim-quote" > \n< / span > < span class = "vim-quote" > " < / span > )
< span class = "vim-statement "> < b > exit< / b > < / span> (< span class = "vim-constant" > 1< / span > )
< span class = "vim-statement "> < b > end< / b > < / span >
b = < font color = "#008a8c" > MediaWikiBot< / font > ::< font color = "#008a8c" > WikiBot< / font > .new(< font color = "#6b59ce" > " < / font > < font color = "#ff00ff "> < a href = "http://entropia.de/wiki/" > http://entropia.de/wiki/< / a > < / font> < font color = "#6b59ce" > " < / font > )
b.login(< font color = "#008a8c" > ARGV< / font > [< font color = "#ff00ff" > 0< / font > ], < font color = "#008a8c" > ARGV< / font > [< font color = "#ff00ff" > 1< / font > ])
b = < span class = "vim-var" > MediaWikiBot< / span > ::< span class = "vim-var" > WikiBot< / span > .new(< span class = "vim-quote" > " < / span > < span class = "vim-constant "> < a href = "http://entropia.de/wiki/" > http://entropia.de/wiki/< / a > < / span> < span class = "vim-quote" > " < / span > )
b.login(< span class = "vim-var" > ARGV< / span > [< span class = "vim-constant" > 0< / span > ], < span class = "vim-var" > ARGV< / span > [< span class = "vim-constant" > 1< / span > ])
old = b.get_raw(< font color = "#6b59ce" > " < / font > < font color = "#ff00ff" > RoboRally< / font > < font color = "#6b59ce" > " < / font > )
new = old.gsub(< font color = "#6b59ce" > /< / font > < font color = "#ff00ff" > \[#reg ([^|]*?)\]< / font > < font color = "#6b59ce" > /i< / font > ,
< font color = "#6b59ce" > '< / font > < font color = "#ff00ff" > [[#Gesperrte Register|\1]]< / font > < font color = "#6b59ce" > '< / font > )
b.edit(< font color = "#6b59ce" > " < / font > < font color = "#ff00ff" > RoboRally< / font > < font color = "#6b59ce" > " < / font > , new, < font color = "#6b59ce" > " < / font > < font color = "#ff00ff" > Kaputte interne Links repariert< / font > < font color = "#6b59ce" > " < / font > )
old = b.get_raw(< span class = "vim-quote" > " < / span > < span class = "vim-constant" > RoboRally< / span > < span class = "vim-quote" > " < / span > )
new = old.gsub(< span class = "vim-quote" > /< / span > < span class = "vim-constant" > \[#reg ([^|]*?)\]< / span > < span class = "vim-quote" > /i< / span > ,
< span class = "vim-quote" > '< / span > < span class = "vim-constant" > [[#Gesperrte Register|\1]]< / span > < span class = "vim-quote" > '< / span > )
b.edit(< span class = "vim-quote" > " < / span > < span class = "vim-constant" > RoboRally< / span > < span class = "vim-quote" > " < / span > , new, < span class = "vim-quote" > " < / span > < span class = "vim-constant" > Kaputte interne Links repariert< / span > < span class = "vim-quote" > " < / span > )
< / pre >
< / div > <!-- class="slide" -->