def init(): """Create boilerplate configuration files""" from kibitzr.app import Application Application.bootstrap()
def telegram_chat(): """Return chat id for the last message sent to Telegram Bot""" # rename import to escape name clashing: from kibitzr.app import Application app = Application() app.telegram_chat()
def run(ctx, name): """Run kibitzr in the foreground mode""" from kibitzr.app import Application app = Application() sys.exit(app.run(once=False, log_level=ctx.obj['log_level'], names=name))
def once(ctx, name): """Run kibitzr checks once and exit""" from kibitzr.app import Application app = Application() sys.exit(app.run(once=True, log_level=ctx.obj['log_level'], names=name))
def firefox(): """Launch Firefox with persistent profile""" from kibitzr.app import Application Application().run_firefox()
def reload(): """Send signal to reload configuration for kibitzr process""" from kibitzr.app import Application app = Application() app.send_reload()
def app(): return Application()