Created
March 18, 2013 17:32
-
-
Save badmetacoder/5189107 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import argparse | |
import base64 | |
import urllib | |
import sys | |
# parse arguments | |
parser = argparse.ArgumentParser(description='Convert a .p12 file into a string a Google Big Query Push connector can use.') | |
parser.add_argument('-f', required=True, action='store', dest='fin', | |
help='the name of the .p12 file') | |
args = parser.parse_args() | |
with open(args.fin, 'r') as f: | |
p12 = f.read() | |
sys.stdout.write(urllib.quote(base64.b64encode(p12))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment