예제 #1
0
파일: cli.py 프로젝트: rufuspollock/econ
 def do_store_index(self, line=None):
     import econ.store
     if line:
         basePath = line
     else:
         basePath = econ.get_config()['data_store_path']
     indexList = econ.store.make_index(basePath)
     for item in indexList.list():
         print item.name
         print '  Title: ', item.metadata['title']
         print
예제 #2
0
파일: cli.py 프로젝트: okfn/econ
 def do_store_index(self, line=None):
     import econ.store
     if line:
         basePath = line
     else:
         basePath = econ.get_config()['data_store_path']
     indexList = econ.store.make_index(basePath)
     for item in indexList.list():
         print item.name
         print '  Title: ', item.metadata['title']
         print
예제 #3
0
파일: cli.py 프로젝트: rufuspollock/econ
 def do_bundle(self, line=None):
     args = []
     if line:
         args = line.split()
     import econ
     if args and args[0] == 'make':  # default
         args = line.split()
         if len(args) > 1:
             path = args[1]
         else:
             store_path = econ.get_config()['data_store_path']
             path = store_path
         import econ.store.bundle
         bndl = econ.store.bundle.create(path)
         print 'Created new data bundle %s at %s' % (bndl.id, bndl.path)
     elif args and args[0] == 'show':
         id = args[1]
         import econ.store
         index = econ.store.index()
         print index[id]
     else:
         print 'Unknown argument: %s' % line
         self.help_bundle()
예제 #4
0
파일: cli.py 프로젝트: okfn/econ
 def do_bundle(self, line=None):
     args = []
     if line:
         args = line.split()
     import econ
     if args and args[0] == 'make': # default
         args = line.split() 
         if len(args) > 1:
             path = args[1]
         else:
             store_path = econ.get_config()['data_store_path']
             path = store_path
         import econ.store.bundle
         bndl = econ.store.bundle.create(path)
         print 'Created new data bundle %s at %s' % (bndl.id, bndl.path)
     elif args and args[0] == 'show':
         id = args[1]
         import econ.store
         index = econ.store.index()
         print index[id]
     else:
         print 'Unknown argument: %s' % line
         self.help_bundle()
예제 #5
0
def index():
    store_path = econ.get_config()['data_store_path']
    return make_index(store_path)