Created
June 4, 2013 13:41
-
-
Save andrei512/5706013 to your computer and use it in GitHub Desktop.
the proper way to use source control
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
#!/usr/bin/env ruby | |
require 'nokogiri' | |
require 'open-uri' | |
SITE = 'http://bunnyapprovesthesechanges.com/' | |
XPATH = '//*[@id="content"]/p' | |
doc = Nokogiri::HTML(open(SITE)) | |
doc.xpath(XPATH).each do |node| | |
message = node.content | |
message = message.gsub(/[^a-zA-Z\ ]/,'').gsub(/ +/,' ') | |
system("git add .") | |
system("git ci -am #{message}") | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment