Functions | |
def | upload (file, project_name, user_name, password, summary, labels=None) |
def | encode_upload_request (fields, file_path) |
def | upload_find_auth (file_path, project_name, summary, labels=None, user_name=None, password=None, tries=3) |
def | main () |
MAIN FUNCTION. More... | |
Variables | |
string | __author__ = 'danderson@google.com (David Anderson)' |
def googlecode_upload.encode_upload_request | ( | fields, | |
file_path | |||
) |
Encode the given fields and file into a multipart form body. fields is a sequence of (name, value) pairs. file is the path of the file to upload. The file will be uploaded to Google Code with the same file name. Returns: (content_type, body) ready for httplib.HTTP instance
Definition at line 110 of file googlecode_upload.py.
References open(), and upload_find_auth().
Referenced by upload().
def googlecode_upload.main | ( | ) |
MAIN FUNCTION.
1D plots hits vs w //
Definition at line 209 of file googlecode_upload.py.
References upload_find_auth().
def googlecode_upload.upload | ( | file, | |
project_name, | |||
user_name, | |||
password, | |||
summary, | |||
labels = None |
|||
) |
Upload a file to a Google Code project's file server. Args: file: The local path to the file. project_name: The name of your project on Google Code. user_name: Your Google account name. password: The googlecode.com password for your account. Note that this is NOT your global Google Account password! summary: A small description for the file. labels: an optional list of label strings with which to tag the file. Returns: a tuple: http_status: 201 if the upload succeeded, something else if an error occured. http_reason: The human-readable string associated with http_status file_url: If the upload succeeded, the URL of the file on Google Code, None otherwise.
Definition at line 59 of file googlecode_upload.py.
References encode_upload_request().
Referenced by upload_find_auth().
def googlecode_upload.upload_find_auth | ( | file_path, | |
project_name, | |||
summary, | |||
labels = None , |
|||
user_name = None , |
|||
password = None , |
|||
tries = 3 |
|||
) |
Find credentials and upload a file to a Google Code project's file server. file_path, project_name, summary, and labels are passed as-is to upload. Args: file_path: The local path to the file. project_name: The name of your project on Google Code. summary: A small description for the file. labels: an optional list of label strings with which to tag the file. config_dir: Path to Subversion configuration directory, 'none', or None. user_name: Your Google account name. tries: How many attempts to make.
Definition at line 156 of file googlecode_upload.py.
References upload().
Referenced by encode_upload_request(), and main().
|
private |
Definition at line 49 of file googlecode_upload.py.