import requests import pyperclip from PySide2 import QtGui from PySide2.QtCore import Qt from PySide2.QtGui import QIcon from PySide2.QtWidgets import QApplication, QMainWindow, QInputDialog, QLineEdit, QMessageBox, QSplashScreen import download import gui.ui_united import metadata import parsecontents import updater import wiiload VERSION = updater.current_version() BRANCH = updater.get_branch() if BRANCH == "Stable": DISPLAY_VERSION = VERSION else: DISPLAY_VERSION = VERSION + " " + BRANCH HOST = "hbb1.oscwii.org" # escape ansi for stdout output of download status def escape_ansi(line): ansi_escape = re.compile(r'(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]') return ansi_escape.sub('', line)
import metadata import download import parsecontents import gui.ui_united import updater import export import io import re from contextlib import redirect_stdout from PySide2.QtWidgets import QApplication, QMainWindow, QFileDialog version = updater.current_version() def escape_ansi(line): ansi_escape = re.compile(r'(\x9B|\x1B\[)[0-?]*[ -\/]*[@-~]') return ansi_escape.sub('', line) class MainWindow(gui.ui_united.Ui_MainWindow, QMainWindow): def __init__(self): super(MainWindow, self).__init__() self.ui = gui.ui_united.Ui_MainWindow() self.ui.setupUi(self) self.setWindowTitle("Open Shop Channel Downloader v" + version + " - Library") self.populate() self.populate_meta() self.status_message("Ready to download") self.ui.statusBar.addPermanentWidget(self.ui.progressBar)
if pid == os.getpid(): continue os.kill(pid, signal.SIGTERM) sys.exit(0) if __name__ == "__main__": if len(sys.argv): for item in sys.argv: if item == 'test': utils.config_test(config) exit(0) if item == 'rmdirs': utils.remove_empty_directories(config) exit(0) if item == 'rmhidden': remove_hidden() exit(0) logger.debug("Current branch: %s", updater.active_branch()) logger.debug("Current version: %s", updater.current_version()) logger.debug("Latest version: %s", updater.latest_version()) if config['use_git_autoupdater'] and updater.update(): logger.debug("Restarting...") sys.exit(1) signal.signal(signal.SIGINT, exit_gracefully) signal.signal(signal.SIGTERM, exit_gracefully) signal.signal(signal.SIGHUP, exit_restart) start(config['unionfs_folder'])
description="Open Shop Channel Package Downloader" ) subparser = parser.add_subparsers(dest='cmd') applist = subparser.add_parser('list') query = subparser.add_parser('query') get = subparser.add_parser('get') getall = subparser.add_parser('get-all') getlist = subparser.add_parser('get-list') meta = subparser.add_parser('meta') repolist = subparser.add_parser('repo-list') update = subparser.add_parser('update') if build > 0: parser.add_argument('-v', '--version', action='version', version='%(prog)s ' + updater.current_version() + ' (Build: ' + str(build) + ') Developed by dhtdht020. Open Source Software.') else: parser.add_argument('-v', '--version', action='version', version='%(prog)s ' + updater.current_version() + ' Developed by dhtdht020. Open Source Software.') query.add_argument( "-n", "--name", help="Name of homebrew app", required=True ) query.add_argument( "-v", "--verify", help="Check if app exists and return True or False", action="store_true"
applist = subparser.add_parser('list') query = subparser.add_parser('query') get = subparser.add_parser('get') getall = subparser.add_parser('get-all') getlist = subparser.add_parser('get-list') meta = subparser.add_parser('meta') repolist = subparser.add_parser('repo-list') export_cmd = subparser.add_parser('export') update = subparser.add_parser('update') transmit = subparser.add_parser('transmit') if build > 0: parser.add_argument('-v', '--version', action='version', version='%(prog)s ' + updater.current_version() + ' (Build: ' + str(build) + ') Developed by dhtdht020. Open Source Software.') else: parser.add_argument('-v', '--version', action='version', version='%(prog)s ' + updater.current_version() + ' Developed by dhtdht020. Open Source Software.') query.add_argument("-n", "--name", help="Name of homebrew app", required=True) query.add_argument("-v", "--verify", help="Check if app exists and return True or False", action="store_true")