Skip to content

Instantly share code, notes, and snippets.

@izumogeiger
Created August 2, 2013 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save izumogeiger/6140366 to your computer and use it in GitHub Desktop.
Save izumogeiger/6140366 to your computer and use it in GitHub Desktop.
# 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