How to use the choochoo.log.make_log function in choochoo

To help you get started, we’ve selected a few choochoo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github andrewcooke / choochoo / choochoo / reminders.py View on Github external
def main(args):
    log = make_log(args)
    db = Database(args, log)
    tabs = TabList()
    saves = []
    bar = MessageBar()
    injuries = App(log, 'Reminders', bar, make_widget(db, log, tabs, bar, saves), tabs, saves)
    injuries.run()
github andrewcooke / choochoo / choochoo / aims.py View on Github external
def main(args):
    log = make_log(args)
    db = Database(args, log)
    tabs = TabList()
    saves = []
    bar = MessageBar()
    aims = App(log, 'Aims', bar, make_widget(db, log, tabs, bar, saves), tabs, saves)
    aims.run()
github andrewcooke / choochoo / choochoo / fit / profile.py View on Github external
def package_fit_profile(args):
    log = make_log(args)
    in_path = args.file(PATH, 0)
    log.info('Reading from %s' % in_path)
    nlog, types, messages = read_profile(log, in_path)
    out_path = join(dirname(__file__), PROFILE)
    nlog.set_log(None)
    log.info('Writing to %s' % out_path)
    with open(out_path, 'wb') as output:
        dump((nlog, types, messages), output)
    # test loading
    log.info('Test loading from %r' % PROFILE)
    log.info('Loaded %s, %s' % load_profile(log))