basefunctions/account_ident.py
def account_info_identifier(filepath):
    '''iter through accounts in text file and return accountype if found'''

    value, raw_data = acc_type_tester(filepath)
    
    #this extra loop was chosen deliberatly, so that acctype_recognition_tester return subtype of sparkasse and mlp/triodos
    if 'sparka' in value:
        imported_acctype = 'sparka_giro'

    elif 'standform1' in value:
        imported_acctype = 'standform1_giro'

    elif 'acctype' in value: # set account name to unknown if no account was recognised (for development)
        imported_acctype='unknown_account'

    else:
        imported_acctype = value


    # get account full name
    acctype_fullname = get_acctype_fullname(imported_acctype, filepath)

    accountinfo = globals()["INFO_"+imported_acctype.upper()] #get global variable of that specific account

    return (acctype_fullname, raw_data, accountinfo)
iter through accounts in text file and return accountype if found
iter through accounts in text file and return accountype if found
iter through accounts in text file and return accountype if found
def account_info_identifier(filepath):
    value, raw_data = acc_type_tester(filepath)
    if 'sparka' in value:
        imported_acctype = 'sparka_giro'
    elif 'standform1' in value:
        imported_acctype = 'standform1_giro'
    elif 'acctype' in value: 
        imported_acctype='unknown_account'
    else:
        imported_acctype = value
    acctype_fullname = get_acctype_fullname(imported_acctype, filepath)
    accountinfo = globals()["INFO_"+imported_acctype.upper()] 
    return (acctype_fullname, raw_data, accountinfo)
def account_info_identifier ( filepath ) : value , raw_data = acc_type_tester ( filepath ) if 'sparka' in value : imported_acctype = 'sparka_giro' elif 'standform1' in value : imported_acctype = 'standform1_giro' elif 'acctype' in value : imported_acctype = 'unknown_account' else : imported_acctype = value acctype_fullname = get_acctype_fullname ( imported_acctype , filepath ) accountinfo = globals ( ) [ "INFO_" + imported_acctype . upper ( ) ] return ( acctype_fullname , raw_data , accountinfo )
iter through accounts in text file and return accountype if found
iter through accounts in text file and return accountype if found
'''iter through accounts in text file and return accountype if found''' #this extra loop was chosen deliberatly, so that acctype_recognition_tester return subtype of sparkasse and mlp/triodos # set account name to unknown if no account was recognised (for development) # get account full name #get global variable of that specific account
filepath