Skip to content

Instantly share code, notes, and snippets.

@sle-c
Created July 18, 2016 04:27
Show Gist options
  • Save sle-c/9e3eb613c620802cd9b3c9cd4df44450 to your computer and use it in GitHub Desktop.
Save sle-c/9e3eb613c620802cd9b3c9cd4df44450 to your computer and use it in GitHub Desktop.
Babl module full main program
def main():
tempFile = ''.join(sys.stdin.readlines())
try:
token = os.environ["TOKEN"]
dest_path = os.environ["FILE"]
except KeyError as err:
print "One or more environment variable are missing, %s" % err
return
dbx = dropbox.Dropbox(token)
path_returned = upload(dbx, tempFile, dest_path).path_lower
shared_link = getSharedLink(dbx, path_returned)
print shared_link
return shared_link
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment