def site_versions(): ''' Compare current OutWiker and plugins versions with versions on the site ''' app_list = getLocalAppInfoList() # Downloading versions info print(u'Downloading version info files...\n') print(u'{: <20}{: <20}{}'.format(u'Title', u'Deployed version', u'Dev. version')) print(u'-' * 60) for localAppInfo in app_list: url = localAppInfo.updatesUrl name = localAppInfo.appname print(u'{:.<20}'.format(name), end=u'') try: appinfo = downloadAppInfo(url) if appinfo.currentVersion == localAppInfo.currentVersion: font = Fore.GREEN else: font = Fore.RED print(u'{siteversion:.<20}{devversion}'.format( siteversion=str(appinfo.currentVersion), devversion=font + str(localAppInfo.currentVersion) )) except (urllib.error.URLError, urllib.error.HTTPError) as e: print(Fore.RED + u'Error') print(str(e)) print(url) print('')