Files @ 6dc33a2c308a
Branch filter:

Location: FVDE/ennstatus/ennstatus/cli/__init__.py - annotation

Dennis Fink
Fix onion and bit addressess

We needed to put // in front of the jinja statement
import pathlib

import click


@click.group()
@click.option('-p', '--path', default='/srv/http/enn.lu',
              help='Path where the config files are',
              type=click.Path(exists=True,
                              file_okay=False,
                              writable=True,
                              readable=True)
              )
@click.pass_context
def cli(ctx, path):
    ctx.obj = {}
    path = pathlib.Path(path)
    ctx.obj['path'] = path
    ctx.obj['config_file'] = path / 'config.json'
    ctx.obj['data_dir'] = path / 'data'


from .commands import config
cli.add_command(config, 'config')

if __name__ == '__main__':
    cli()