# -*- coding: utf-8 -*-
"""
    demeter web
    name:admin.py
    author:rabin
"""
from demeter.core import *

param = {}
param['method'] = 'm'
param['topic'] = 't'
Demeter.getopt(param)


#Demeter.echo(Demeter.option['method'])

method = Demeter.option['method']

if 'topic' in Demeter.option:
	Demeter.service(method, 'mqtt').load(Demeter.option['topic'])
else:
	Demeter.service(method, 'mqtt').run()