Created
April 12, 2015 03:46
-
-
Save s2t2/770b79037870d5a1f008 to your computer and use it in GitHub Desktop.
reads text from a public github repository
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 'github_api' | |
github = Github.new | |
dir = github.repos.contents.get :user => 's2t2', :repo => 'text', :path => '/' | |
files = dir.map{|f| | |
github.repos.contents.get :user => 's2t2', :repo => 'text', :path => f.path.to_s | |
} | |
file_contents = files.map{ |f| | |
Base64.decode64(f.content) | |
} | |
file_contents.each do |fc| | |
puts fc | |
puts "" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment