'''
Attempt to automate steps necessary for uploading stuff
to Google Drive. Based on steps listed on:
https://developers.google.com/drive/quickstart-python

1. Enable the Drive API
  1. Create API project
     https://code.google.com/apis/console/?pli=1
  2. Enable the Drive API in Services
  3. Open API Access tab and create an OAuth 2.0 client ID
  4. Set application name (e.g. "Drive Quickstart Sample")
  5. Client ID Settings section:
    1. Installed application
    2. Other
  5. From the API Access page, you'll need Client ID
     and Client Secret info.
  
Author: anatoly techtonik <techtonik@gmail.com>
License: Public Domain
'''

from config import CLIENT_ID, CLIENT_SECRET

@@ -684,8 +684,951 @@
 _SECRET%0A
+%0A# ---%5B bootstrap section %5D---%0A# check dependencies and fetch them if neeeded%0Atry:%0A  import httplib2%0A  import apiclient%0Aexcept ImportError as exc:%0A  print('Dependencies are not importable. Bootstrapping locally.')%0A  speccy = %7B%0A    'httplib2': (%0A      'httplib2-0.8.zip',%0A      'https://httplib2.googlecode.com/files/httplib2-0.8.zip',%0A      'bb79080bc94d5e01f8ca3b79ba449a5b169c5e72 159827'),%0A    'apiclient': (%0A      'google-api-python-client-1.2.zip',%0A      'https://google-api-python-client.googlecode.com/files/google-api-python-client-1.2.zip',%0A      '4e82bbc87e17acf70606ba45b379ea6c5095dd63 97080')%0A  %7D%0A  if 'httplib2' not in exc.message:%0A    speccy.pop('httplib2')%0A%0A  # %5B %5D create .locally if not exists%0A  # %5B %5D wgetsecure(.locally, speccy)%0A  %0A# ---%5B /bootstrap %5D---%0A%0A# ---%5B boilerplate from quickstart.py example %5D---%0A# ---%5B /boilerplate %5D---%0A%0A%0Aif __name__ == '__main__':%0A  # %5B %5D command line usage: drive.py upload %3Cfilename%3E%0A  pass%0A

Add autobootstrap section