def task_set(): conf = config.get() if 'state' not in conf: conf['state'] = {} ec, ts = tasks() t_id = 0 while t_id > len(ts) or t_id <= 0: t_id = input('Active task: ') if t_id > len(ts) or t_id <= 0: sys.stderr.write('Unknown task, valid options are 1 - {}\n'.format(len(ts))) conf['state']['task'] = ts[int(t_id) - 1]['id'] config.write(conf)
def set(): conf = config.get() if 'state' not in conf: conf['state'] = {} ec, workspaces = list() ws_id = 0 while ws_id > len(workspaces) or ws_id <= 0: ws_id = input('Active workspace: ') if ws_id > len(workspaces) or ws_id <= 0: sys.stderr.write('Unknown workspace, valid options are 1 - {}\n'.format(len(workspaces))) conf['state']['workspace'] = workspaces[int(ws_id) - 1]['id'] config.write(conf)
def task_set(): conf = config.get() if 'state' not in conf: conf['state'] = {} ec, ts = tasks() t_id = 0 while t_id > len(ts) or t_id <= 0: t_id = input('Active task: ') if t_id > len(ts) or t_id <= 0: sys.stderr.write('Unknown task, valid options are 1 - {}\n'.format( len(ts))) conf['state']['task'] = ts[int(t_id) - 1]['id'] config.write(conf)
def set(): conf = config.get() if 'state' not in conf: conf['state'] = {} ec, projs = list() p_id = 0 while p_id > len(projs) or p_id <= 0: p_id = input('Active project: ') if p_id > len(projs) or p_id <= 0: sys.stderr.write('Unknown project, valid options are 1 - {}\n'.format(len(projs))) conf['state']['project'] = projs[int(p_id) - 1]['id'] config.write(conf) return 0
def set(): conf = config.get() if 'state' not in conf: conf['state'] = {} ec, workspaces = list() ws_id = 0 while ws_id > len(workspaces) or ws_id <= 0: ws_id = input('Active workspace: ') if ws_id > len(workspaces) or ws_id <= 0: sys.stderr.write( 'Unknown workspace, valid options are 1 - {}\n'.format( len(workspaces))) conf['state']['workspace'] = workspaces[int(ws_id) - 1]['id'] config.write(conf)
def set(): conf = config.get() if 'state' not in conf: conf['state'] = {} ec, projs = list() p_id = 0 while p_id > len(projs) or p_id <= 0: p_id = input('Active project: ') if p_id > len(projs) or p_id <= 0: sys.stderr.write( 'Unknown project, valid options are 1 - {}\n'.format( len(projs))) conf['state']['project'] = projs[int(p_id) - 1]['id'] config.write(conf) return 0