def main(param_list):
    """
    main(): single parameter for report_sources.sh output
    """
    dAllApks      = Global.dAllApks
    maxVerEachApk = Global.maxVerEachApk
    minSdkEachApk = Global.minSdkEachApk

    lines = ''
    if len(param_list) == 1:
        with open(param_list[0]) as report:
            lines = report.readlines()
    else:
        lines = sys.stdin.readlines()

    dAllApks = ReportHelper.processReportSourcesOutput(lines)

    if len(dAllApks.keys()) == 0:
        print('ERROR: expecting:')
        print(' - 1 parameter (report file from output of report_sources.sh)')
        print(' or ')
        print(' - stdin from report_sources.sh')
        return

    maxVerEachApk = ReportHelper.getMaxVersionDict(dAllApks)
    minSdkEachApk = ReportHelper.getMinSdkDict(dAllApks)

    ReportHelper.showMissingApks(dAllApks, maxVerEachApk)

    keys = dAllApks.keys()

    Global.dAllApks      = dAllApks
    Global.maxVerEachApk = maxVerEachApk
    Global.minSdkEachApk = minSdkEachApk

    # Start checking all apkids ...
    p = multiprocessing.Pool(5)
    p.map(checkOneApp, keys)
def main(param_list):
    """
    main(): single parameter for report_sources.sh output
    """
    dAllApks      = Global.dAllApks
    maxVerEachApk = Global.maxVerEachApk
    minSdkEachApk = Global.minSdkEachApk

    lines = ''
    if len(param_list) == 1:
        with open(param_list[0]) as report:
            lines = report.readlines()
    else:
        lines = sys.stdin.readlines()

    dAllApks = ReportHelper.processReportSourcesOutput(lines)

    if len(dAllApks.keys()) == 0:
        print('ERROR: expecting:')
        print(' - 1 parameter (report file from output of report_sources.sh)')
        print(' or ')
        print(' - stdin from report_sources.sh')
        return

    maxVerEachApk = ReportHelper.getMaxVersionDict(dAllApks)
    minSdkEachApk = ReportHelper.getMinSdkDict(dAllApks)

    ReportHelper.showMissingApks(dAllApks, maxVerEachApk)

    repos = ['albrtkmxxo',
             'android777',
             'apk-s',
             'aplicaciones-ceibal',
             'apps',
             'appstv',
             'austroid',
             'bazar-canaima',
             'benny09',
             'brainyideas',
             'catnamiw',
             'cesang7',
             'dalon',
             'darkkiller',
             'datawind-apps',
             'denis86',
             'donvito2021',
             'draconius666',
             'eearl',
             'eltremendo02',
             'epsil',
             'ezam-akmar',
             'gonzalo-rodriguez',
             'grungo2407',
             'gs3passion',
             'gyjano',
             'hampoo',
             'hfk217',
             'hoser98',
             'hot105',
             'iosefirina22',
             'irishandroid',
             'jaslibertas',
             'jodean',
             'kcprophet',
             'kryss974',
             'leighakat',
             'letechest',
             'lonerfox2013',
             'ludock96',
             'mark8',
             'matandroid',
             'megas0ra',
             'mestruque',
             'metin2ventor',
             'michael-belisle',
             'migatronic',
             'milaupv',
             'msi8',
             'mys3',
             'new-day-apps',
             'nowkin',
             'orgia82',
             'pentacore',
             'perfect-electronic',
             'pocketappz',
             'poulpe',
             'prozac4me',
             'rahullah',
             'rodrivergara',
             'ryoma3ch1z3n',
             'sandro797',
             'scratchn63',
             'shotaro',
             'slapchop',
             'snah',
             'sommydany',
             'speny',
             'sprithansi',
             'stein-gmg',
             'story89998',
             'sunnygnutz',
             'tim-we',
             'tutu75',
             'vip-apk',
             'wanky',
             'westcoastandroid',
             'xerodox',
             'yelbana2']

    Global.dAllApks      = dAllApks
    Global.maxVerEachApk = maxVerEachApk
    Global.minSdkEachApk = minSdkEachApk

    # Start checking all stores ...
    p = multiprocessing.Pool(5)
    p.map(checkOneStore, repos)