def main(username, password, output): if username == None: username = input('Github Username: '******'Github Password: '******'message']) except Exception: print('An error occured while generating report.')
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 2019/1/14 5:26 PM # @Author : w8ay # @File : data.py from lib.collector import Collector from lib.log import LOGGER logger = LOGGER() class PATHS: ROOT_PATH = '' PLUGIN_PATH = '' OUTPUT_PATH = '' DATA_PATH = '' collector = Collector()
action = sys.argv[1].lower() if action == 'help': sys.stderr.write(''' available commands: collect [notebook-name] - retrieve and organize the latest notes rebuild - rebuild static site usage: {0} [action] [additional parameters?] '''.format(sys.argv[0])) elif action == 'collect': if len(sys.argv) < 3: sys.stderr.write( 'error: missing required parameter: notebook-name\n') sys.exit(ERR_MISSING_REQUIRED_PARAM) myNotebook = sys.argv[2] Collector(myNotebook).run() elif action == 'rebuild': generator = HtmlGenerator() generator.generate() else: sys.stderr.write( 'error: unrecognized action: "{0}", view help by running `{1} help`\n' .format(action, sys.argv[0])) sys.exit(1)
def __init__(self): self.collector = Collector() self.normalize = Normalizer()