Changeset - 5a2b6c5c3858
[Not reviewed]
version_5
0 1 1
Dennis Fink - 9 years ago 2015-10-14 22:08:00
dennis.fink@c3l.lu
Added config subcommand
2 files changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
ennstatus/cli/__init__.py
Show inline comments
 
@@ -6,14 +6,17 @@ import click
 
@click.group()
 
@click.option('-p', '--path', default='/srv/http/enn.lu',
 
              help='Path where the config files are')
 
@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()
ennstatus/cli/commands/__init__.py
Show inline comments
 
new file 100644
 
from .config import config
 

	
 
__all__ = ['config']
0 comments (0 inline, 0 general)