<s> import sys <EOL> sys . path . append ( "<STR_LIT>" ) <EOL> import csv <EOL> csv . field_size_limit ( sys . maxsize ) <EOL> import argparse <EOL> from db . Corpus_DB import Corpus_DB <EOL> def ImportSpreadsheet ( spreadsheet_filename , database_path , id_key , content_key , is_csv ) : <EOL> database_filename = '<STR_LIT>' . format ( database_path ) <EOL> print '<STR_LIT>' . format ( spreadsheet_filename , database_filename ) <EOL> with Corpus_DB ( database_path , isInit = True ) as corpus_db : <EOL> corpus_db . ImportFromSpreadsheet ( spreadsheet_filename , is_csv = is_csv , id_key = id_key , content_key = content_key ) <EOL> def main ( ) : <EOL> parser = argparse . ArgumentParser ( description = '<STR_LIT>' ) <EOL> parser . add_argument ( '<STR_LIT>' , type = str , help = '<STR_LIT>' ) <EOL> parser . add_argument ( '<STR_LIT>' , type = str , help = '<STR_LIT>' ) <EOL> parser . add_argument ( '<STR_LIT>' , type = str , default = None , help = '<STR_LIT>' ) <EOL> parser . add_argument ( '<STR_LIT>' , type = str , default = None , help = '<STR_LIT>' ) <EOL> parser . add_argument ( '<STR_LIT>' , const = True , default = False , help = '<STR_LIT>' , action = '<STR_LIT>' ) <EOL> args = parser . parse_args ( ) <EOL> ImportSpreadsheet ( args . corpus , args . database , args . id , args . content , args . csv ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
