Created
November 22, 2015 22:56
-
-
Save xbony2/4885bce9456d3cc0cc8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative 'lib/mediawiki-butt' | |
require 'open-uri' | |
f = File.new("Documents/domains.txt", "r").read.chomp.each_line do |url| | |
butt = MediaWiki::Butt.new(url.chomp) | |
butt.login("xbony2", "-REDACTED-") | |
if butt.get_extensions.include? "Semantic MediaWiki" | |
if butt.get_text("User:Xbony2/common.css").nil? | |
butt.create_page("User:Xbony2/common.css", "/* Hides \"This page supports semantic in-text annotations\" message */\n#smw-form-editpage-help {\n display: none;\n}\n", "Automated task: contact [[User:Xbony2]] with any issues.") | |
end | |
end | |
butt.logout | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment