Beispiel #1
0
 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
Beispiel #2
0
Datei: cli.py Projekt: 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
Beispiel #3
0
 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()
Beispiel #4
0
Datei: cli.py Projekt: 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()
Beispiel #5
0
def index():
    store_path = econ.get_config()['data_store_path']
    return make_index(store_path)