Package gavo :: Package user :: Module show
[frames] | no frames]

Source Code for Module gavo.user.show

 1  """ 
 2  CLI function to show various things. 
 3   
 4  Maybe gavo config and gavo info should be folded in here if this grows. 
 5  """ 
 6   
 7  #c Copyright 2008-2019, the GAVO project 
 8  #c 
 9  #c This program is free software, covered by the GNU GPL.  See the 
10  #c COPYING file in the source distribution. 
11   
12   
13  from __future__ import print_function 
14   
15  from gavo import api 
16  from gavo.utils import Arg, exposedFunction, makeCLIParser 
17   
18   
19  @exposedFunction([ 
20          Arg("rdId", help="an RD id (or a path to RD xml)"),], 
21          help="show what data items are avalailable") 
22 -def dds(args):
23 rd = api.getReferencedElement(args.rdId, forceType=api.RD) 24 for dd in rd.dds: 25 outLine = dd.id 26 if dd.auto: 27 outLine += "*" 28 print(outLine)
29
30 31 -def main():
32 args = makeCLIParser(globals()).parse_args() 33 args.subAction(args)
34