Ejemplo n.º 1
0
if template_dir:
    os.system("cp -r %s* %s" % (template_dir,db_destination))
    os.system("cp %s.htaccess %s" % (template_dir,db_destination))


####################
## Load the files ##
####################

l = Loader(data_destination,
           Philo_Types,
           XPaths,
           Metadata_XPaths,
           filters, 
           token_regex,
           non_nesting_tags,
           self_closing_tags,
           pseudo_empty_tags,
           debug=debug)
l.add_files(files)
filenames = l.list_files()
load_metadata = [{"filename":f} for f in sorted(filenames,reverse=True)]
l.parse_files(workers,load_metadata)
l.merge_objects()
l.analyze()
l.make_tables(tables, *r_r_obj)
l.finish(**extra_locals)

print "\nDone indexing."
print "Your database is viewable at " + db_url + "\n"
Ejemplo n.º 2
0
try:
    os.mkdir(template_destination)
except OSError:
    print "The %s database already exists" % dbname
    print "Do you want to delete this database? Yes/No"
    choice = raw_input().lower()
    if choice.startswith('y'):
        os.system('rm -rf %s' % template_destination)
        os.mkdir(template_destination)
    else:
        sys.exit()
os.system("cp -r %s* %s" % (install_dir, template_destination))
os.system("cp %s.htaccess %s" % (install_dir, template_destination))
print "copied templates to %s" % template_destination

####################
## Load the files ##
####################

l = Loader(workers, filters=filters, tables=tables, clean=False)
l.setup_dir(data_destination, files)
l.parse_files(XPaths, Metadata_XPaths, token_regex, non_nesting_tags,
              self_closing_tags, pseudo_empty_tags)
l.merge_objects()
l.analyze()
l.make_tables()
l.finish(Philo_Types, Metadata_XPaths, db_url=db_url)
print >> sys.stderr, "done indexing."
print >> sys.stderr, "db viewable at " + db_url + "/dispatcher.py/form"
Ejemplo n.º 3
0
if template_dir:
    os.system("cp -r %s* %s" % (template_dir, db_destination))
    os.system("cp %s.htaccess %s" % (template_dir, db_destination))

####################
## Load the files ##
####################

l = Loader(data_destination,
           Philo_Types,
           XPaths,
           Metadata_XPaths,
           filters,
           token_regex,
           non_nesting_tags,
           self_closing_tags,
           pseudo_empty_tags,
           debug=debug)
l.add_files(files)
filenames = l.list_files()
load_metadata = [{"filename": f} for f in sorted(filenames, reverse=True)]
l.parse_files(workers, load_metadata)
l.merge_objects()
l.analyze()
l.make_tables(tables, *r_r_obj)
l.finish(**extra_locals)

print "\nDone indexing."
print "Your database is viewable at " + db_url + "\n"
Ejemplo n.º 4
0
try:
    os.mkdir(template_destination)
except OSError:
    print "The %s database already exists" % dbname
    print "Do you want to delete this database? Yes/No"
    choice = raw_input().lower()
    if choice.startswith('y'):
        os.system('rm -rf %s' % template_destination)
        os.mkdir(template_destination)
    else:
        sys.exit()
os.system("cp -r %s* %s" % (install_dir,template_destination))
os.system("cp %s.htaccess %s" % (install_dir,template_destination))
print "copied templates to %s" % template_destination


####################
## Load the files ##
####################

l = Loader(workers, filters=filters, tables=tables, clean=True)
l.setup_dir(data_destination,files)
l.parse_files(XPaths,Metadata_XPaths,token_regex,non_nesting_tags,self_closing_tags,pseudo_empty_tags)
l.merge_objects()
l.analyze()
l.make_tables()
l.finish(Philo_Types, Metadata_XPaths,db_url=db_url)
print >> sys.stderr, "done indexing."
print >> sys.stderr, "db viewable at " + db_url
Ejemplo n.º 5
0
## Load the files ##
####################

l = Loader(data_destination,
           token_regex,
           XPaths,
           Metadata_XPaths,
           filters, 
           pseudo_empty_tags,
           suppress_tags,
           default_object_level=default_object_level,
           debug=debug)

#destination,token_regex=default_token_regex,xpaths=default_xpaths,
#                 metadata_xpaths=default_metadata,filters=default_filters,
#                 pseudo_empty_tags=[],suppress_tags=[],console_output=True,
#                 log=False, debug=False)

l.add_files(files)
filenames = l.list_files()
print filenames
load_metadata = [{"filename":f} for f in sorted(filenames)]
l.parse_files(workers,load_metadata)
l.merge_objects()
l.analyze()
l.make_tables(tables)
l.finish(post_filters,**extra_locals)

print "\nDone indexing."
print "Your database is viewable at " + db_url + "\n"
Ejemplo n.º 6
0
####################
## Load the files ##
####################

l = Loader(data_destination,
           token_regex,
           XPaths,
           Metadata_XPaths,
           filters,
           pseudo_empty_tags,
           suppress_tags,
           default_object_level=default_object_level,
           debug=debug)

#destination,token_regex=default_token_regex,xpaths=default_xpaths,
#                 metadata_xpaths=default_metadata,filters=default_filters,
#                 pseudo_empty_tags=[],suppress_tags=[],console_output=True,
#                 log=False, debug=False)

l.add_files(files)
filenames = l.list_files()
load_metadata = [{"filename": f} for f in sorted(filenames)]
l.parse_files(workers, load_metadata)
l.merge_objects()
l.analyze()
l.make_tables(tables)
l.finish(post_filters, **extra_locals)

print "\nDone indexing."
print "Your database is viewable at " + db_url + "\n"