コード例 #1
0
def file_structure():
    """Shows basic usage of the Drive v3 API.
    Prints the names and ids of the first 10 files the user has access to.
    """
    creds = None
    # The file token.pickle stores the user's access and refresh tokens, and is
    # created automatically when the authorization flow completes for the first
    # time.
    if os.path.exists('token.pickle'):
        with open('token.pickle', 'rb') as token:
            creds = pickle.load(token, encoding="bytes")
    # If there are no (valid) credentials available, let the user log in.
    if not creds or not creds.valid:
        if creds and creds.expired and creds.refresh_token:
            creds.refresh(Request())
        else:
            flow = InstalledAppFlow.from_client_secrets_file(
                'credentials.json', SCOPES)
            creds = flow.run_local_server(port=0)
        # Save the credentials for the next run
        with open('token.pickle', 'wb') as token:
            pickle.dump(creds, token)

    service = build('drive', 'v3', credentials=creds)

    folders=searchFiles.searchFolder(service)
    #create_folder.create(service,folders)
    print(folders)
    for folder in folders:
        searchFiles.searchFile(folder['id'],service)
    files=downloadFiles.downloadRecentCV(service)
    return (files)
コード例 #2
0
def compareFilesEng():

    sFile = searchFiles.searchFile()
    tokenList = sFile.makeTokenList()

    enFile = EnglishFile.englishFile()
    enFile.openFile()

    listDifferences = []
    compareMakeListEngAux(enFile, tokenList, listDifferences)

    enFile.closeFile()

    return listDifferences
コード例 #3
0
def compareEngFiles():

    sFile = searchFiles.searchFile()
    tokenList = sFile.makeTokenList()

    enFile = EnglishFile.englishFile()
    enFile.openFile()

    listNotUsed = []
    listNotUsed = compareEngFilesAux(enFile, tokenList, listNotUsed)

    enFile.closeFile()

    return listNotUsed
コード例 #4
0
ファイル: compareEngFiles.py プロジェクト: matganine/testPT
def compareEngFiles():

    sFile = searchFiles.searchFile()
    tokenList = sFile.makeTokenList()

    enFile = EnglishFile.englishFile()
    enFile.openFile()

    listNotUsed = []
    listNotUsed = compareEngFilesAux(enFile, tokenList, listNotUsed)

    enFile.closeFile();
    
    return listNotUsed
コード例 #5
0
ファイル: compareEngFiles.py プロジェクト: matganine/testPT
def compareFilesEng():
 
    sFile = searchFiles.searchFile()
    tokenList = sFile.makeTokenList()

    enFile = EnglishFile.englishFile()
    enFile.openFile()

    listDifferences = []
    compareMakeListEngAux(enFile, tokenList, listDifferences)

    enFile.closeFile();
    
    return listDifferences
            
#token = enFile.getNextToken()
#if token:
#    print tokenList.index(token)