Esempio n. 1
0
def monitor_github(args):
    keyword = args.keyword
    work_folder = args.work_folder
    exclude_owner = args.exclude_owner
    if not keyword or not work_folder:
        raise Exception(
            "Invalid arguments: keyword and work_folder are must-have.")
    app_name = CLIParser.get_app_name()
    history_file = f"{work_folder}/{app_name}-{keyword}.txt"
    monitor = GitHubMonitor(history_file)
    monitor.monitor_keyword(keyword, exclude_owner)
Esempio n. 2
0
            'name':
            'list',
            'help':
            'List MP3 files with info',
            'func':
            list_mp3,
            'params': [{
                'name': 'paths',
                'help': 'MP3 file or folder',
                'multi-value': 'yes'
            }]
        }, {
            'name':
            'gain',
            'help':
            'Increase MP3 volume without cropping',
            'func':
            gain_mp3,
            'params': [{
                'name': 'paths',
                'help': 'MP3 file or folder',
                'multi-value': 'yes'
            }]
        }]
    }
    try:
        parser = CLIParser.get_parser(CLI_config)
        CLIParser.run(parser)
    except Exception as e:
        logger.error(f"Exception happened: {e}")