Removed deprecated command
This commit is contained in:
@ -1,58 +0,0 @@
|
|||||||
#cython: language_level=3
|
|
||||||
|
|
||||||
from obitools3.dms.dms import DMS # TODO cimport doesn't work
|
|
||||||
from obitools3.dms.view.view import View # TODO cimport doesn't work
|
|
||||||
|
|
||||||
|
|
||||||
__title__="Print a preview of a DMS, view, column...."
|
|
||||||
|
|
||||||
default_config = { 'inputview' : None,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# TODO make it work with URIs
|
|
||||||
|
|
||||||
def addOptions(parser):
|
|
||||||
|
|
||||||
# TODO put this common group somewhere else but I don't know where
|
|
||||||
group=parser.add_argument_group('DMS and view options')
|
|
||||||
|
|
||||||
group.add_argument('--default-dms','-d',
|
|
||||||
action="store", dest="obi:defaultdms",
|
|
||||||
metavar='<DMS NAME>',
|
|
||||||
default=None,
|
|
||||||
type=str,
|
|
||||||
help="Name of the default DMS for reading and writing data.")
|
|
||||||
|
|
||||||
group.add_argument('--view','-v',
|
|
||||||
action="store", dest="obi:view",
|
|
||||||
metavar='<VIEW NAME>',
|
|
||||||
default=None,
|
|
||||||
type=str,
|
|
||||||
help="Name of the view.")
|
|
||||||
|
|
||||||
|
|
||||||
def run(config):
|
|
||||||
|
|
||||||
# Open DMS
|
|
||||||
d = DMS.open(config['obi']['defaultdms'])
|
|
||||||
|
|
||||||
# Open input view uif there is one
|
|
||||||
if 'view' in config['obi'] :
|
|
||||||
view = View.open(d, config['obi']['view'])
|
|
||||||
print(repr(view))
|
|
||||||
|
|
||||||
else :
|
|
||||||
for v in d :
|
|
||||||
print(repr(v))
|
|
||||||
|
|
||||||
d.close()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user