Created
August 2, 2013 14:39
-
-
Save izumogeiger/6140366 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
# coding:utf-8 | |
require "pp" | |
now = Time.now - 3600*24 | |
dir = File.join(ENV["HOME"],"gc10",now.strftime("%Y"),now.strftime("%m")) | |
file = File.join(dir,now.strftime("%d")+".txt") | |
remotedir = File.join("gc10",now.strftime("%Y"),now.strftime("%m")) | |
jar = File.join( | |
File.dirname(File.expand_path(__FILE__)), | |
"google-docs-upload-1.4.7.jar") | |
command = <<-EOS | |
java -jar #{jar} \ | |
#{file} \ | |
--username "XXXXXXXXXX@gmail.com" \ | |
--password "XXXXXXXXXX" \ | |
--protocol https \ | |
--remote-folder #{remotedir} | |
EOS | |
puts `#{command}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment