def addlist(self): #functionality for parsing through the list of entries which need to be added in light of additions to SEP #first step; run the genetries function to refresh the sepentries table from SEPMirror #uncomment the next line to refresh entries -- need to figure out how to coordinate with doing fuzzymatches ahead of time...maybe just look for new entries and add them? #sep.getentries() #second, get the list of entries to be added in a context objects addlist = sep.addlist() c.entries = [] #perform a fuzzy match for each page and construct an appropriate link for entry in addlist: #create a link for each entry in addlist() entry.link = h.url(controller='admin', action='addentry', title=entry.title, sep_dir = entry.sep_dir) c.entries.append(entry) c.message = "Below is a list of SEP entries lacking a corresponding entry in the entity table. Please click on the link to edit the page for that idea.\n Note that clicking on one of these can take 2-5 minutes to fuzzymatch existing entity entries." return render ('admin/newentries.html')
def addlist(self): #functionality for parsing through the list of entries which need to be added in light of additions to SEP #first step; run the genetries function to refresh the sepentries table from SEPMirror #uncomment the next line to refresh entries -- need to figure out how to coordinate with doing fuzzymatches ahead of time...maybe just look for new entries and add them? #sep.getentries() #second, get the list of entries to be added in a context objects addlist = sep.addlist() c.entries = [] #perform a fuzzy match for each page and construct an appropriate link for entry in addlist: #create a link for each entry in addlist() entry.link = h.url(controller='admin', action='addentry', title=entry.title, sep_dir=entry.sep_dir) c.entries.append(entry) c.message = "Below is a list of SEP entries lacking a corresponding entry in the entity table. Please click on the link to edit the page for that idea.\n Note that clicking on one of these can take 2-5 minutes to fuzzymatch existing entity entries." return render('admin/newentries.html')
from scripts.environment import load import re import sys if __name__ == "__main__": print "Loading configuration ..." config = load(sys.argv[-1]) #TODO: Figure out why this is even necessary. print config['app_conf'] app = config['app_conf'] print app['sep.databases'] from inpho.model import * from mako.template import Template import inphosite.lib.sepparse as sepparse import inphosite.lib.searchstring as searchstring print "Getting entries ..." sepparse.getentries(app['sep.databases']) print "Building add list ..." list = sepparse.addlist() print "fuzzy matching ..." searchstring.fuzzymatchall(list) else: raise Exception("Must be called from command line")
from scripts.environment import load import re import sys if __name__ == "__main__": print "Loading configuration ..." config = load(sys.argv[-1]) #TODO: Figure out why this is even necessary. print config['app_conf'] app = config['app_conf'] print app['sep.databases'] from scripts.model import * from mako.template import Template import inphosite.lib.sepparse as sepparse import inphosite.lib.searchstring as searchstring print "Getting entries ..." sepparse.getentries(app['sep.databases']) print "Building add list ..." list = sepparse.addlist() print "fuzzy matching ..." searchstring.fuzzymatchall(list) else: raise Exception("Must be called from command line")