twtxt/cli.py
def cli(ctx, config, verbose):
    """Decentralised, minimalist microblogging service for hackers."""
    init_logging(debug=verbose)

    if ctx.invoked_subcommand == "quickstart":
        return  # Skip initializing config file

    try:
        if config:
            conf = Config.from_file(config)
        else:
            conf = Config.discover()
    except ValueError as e:
        if "Error in config file." in str(e):
            click.echo("✗ Please correct the errors mentioned above an run twtxt again.")
        else:
            click.echo("✗ Config file not found or not readable. You may want to run twtxt quickstart.")
        sys.exit()

    ctx.default_map = conf.build_default_map()
    ctx.obj = {'conf': conf}
def cli(ctx, config, verbose):
    """Decentralised, minimalist microblogging service for hackers."""
    init_logging(debug=verbose)

    if ctx.invoked_subcommand == "quickstart":
        return  # Skip initializing config file

    try:
        if config:
            conf = Config.from_file(config)
        else:
            conf = Config.discover()
    except ValueError as e:
        if "Error in config file." in str(e):
            click.echo("✗ Please correct the errors mentioned above an run twtxt again.")
        else:
            click.echo("✗ Config file not found or not readable. You may want to run twtxt quickstart.")
        sys.exit()

    ctx.default_map = conf.build_default_map()
    ctx.obj = {'conf': conf}
def cli ( ctx , config , verbose ) : init_logging ( debug = verbose ) if ctx . invoked_subcommand == "quickstart" : return # Skip initializing config file try : if config : conf = Config . from_file ( config ) else : conf = Config . discover ( ) except ValueError as e : if "Error in config file." in str ( e ) : click . echo ( "✗ Please correct the errors mentioned above an run twtxt again.") else : click . echo ( "✗ Config file not found or not readable. You may want to run twtxt quickstart.") sys . exit ( ) ctx . default_map = conf . build_default_map ( ) ctx . obj = { 'conf' : conf }
Decentralised, minimalist microblogging service for hackers.
Decentralised minimalist microblogging service for hackers .