rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
p1 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p1) | p1n = re.sub(r'(\w)[^a-zA-Z0-9\s\:](\w)', "\\1_\\2", p1) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
p1 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p1) | p1n = re.sub(r'(\w)[^a-zA-Z0-9\s\:](\w)', "\\1 \\2", p1) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
p2 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p2) | p2n = re.sub(r'(\w)[^a-zA-Z0-9\s\:](\w)', "\\1_\\2", p2) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
p2 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p2) | p2n = re.sub(r'(\w)[^a-zA-Z0-9\s\:](\w)', "\\1 \\2", p2) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
p3 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p3) | p3n = re.sub(r'(\w)[^a-zA-Z0-9\s\:](\w)', "\\1_\\2", p3) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
p3 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p3) | p3n = re.sub(r'(\w)[^a-zA-Z0-9\s\:](\w)', "\\1 \\2", p3) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
print_warning(req, "No match found, trying similar queries...", "", "<p>","<p>") | print_warning(req, "No exact match found, trying similar queries...", "", "<p>","<p>") | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
if p1: results_tmp = search_pattern(req, p1, f1, colls_to_search, m1) | if p1n: results_tmp = search_pattern(req, p1n, f1, colls_to_search, m1) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
if p2: results_tmp = search_pattern(req, p2, f2, colls_to_search, m2) | if p2n: results_tmp = search_pattern(req, p2n, f2, colls_to_search, m2) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
if p3: results_tmp = search_pattern(req, p3, f3, colls_to_search, m3) | if p3n: results_tmp = search_pattern(req, p3n, f3, colls_to_search, m3) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
if re.search(r'\w[^a-zA-Z0-9]\w',p): | if re.search(r'\w[^a-zA-Z0-9\s\:]\w',p): pn = p | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
p = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p) | pn = re.sub(r'(\w)[^a-zA-Z0-9\s\:](\w)', "\\1_\\2", p) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
p = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p) | pn = re.sub(r'(\w)[^a-zA-Z0-9\s:](\w)', "\\1 \\2", p) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
print_warning(req, "No match found, trying %s..." % p, "", "<p>","<p>") results_final = search_pattern(req, p, f, colls_to_search, None) | print_warning(req, "No exact match found, trying <em>%s</em>..." % pn, "", "<p>","<p>") results_final = search_pattern(req, pn, f, colls_to_search, None) | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """P... |
if strict: raise ParseDataError(msg) | if strict: raise ParseDateError(msg) | def __init__(self, message_string, strict=True, hints=_default_handling_hints): |
f = lambda (k,v): k.lower() in basic_headers basic_items = filter(f, msg.items()) | basic_items = filter(lambda (k,v): k.lower() in basic_headers, msg.items()) | def _basic_email_info(msg): """ Takes an email.Message object and returns a dictionary, formatted like the following example, containing a basic subset of information about the message: { from: u'Ann Other <person@example.org>' from_email : u'person@example.org', from_name : u'Ann Other', subject : u'This email is... |
g = lambda (k,v): (k,v[0]) basic_decoded_headers = dict(map(g, basic_decoded_headers.items())) | basic_decoded_headers = dict(map(lambda (k,v): (k,v[0]), basic_decoded_headers.items())) | def _basic_email_info(msg): """ Takes an email.Message object and returns a dictionary, formatted like the following example, containing a basic subset of information about the message: { from: u'Ann Other <person@example.org>' from_email : u'person@example.org', from_name : u'Ann Other', subject : u'This email is... |
f = lambda headers, (header,value): _process_header(msg, headers, header, value, force_processing) return reduce(f, header_value_pairs, {}) | return reduce(lambda headers, (header,value): \ _process_header(msg, headers, header, value, force_processing), header_value_pairs, {}) | def _process_headers(msg, header_value_pairs, force_processing=False): f = lambda headers, (header,value): _process_header(msg, headers, header, value, force_processing) return reduce(f, header_value_pairs, {}) |
f = lambda (value, charset): _native2unicode(value, charset, not force_processing) unicode_decoded_parts = map(f, decoded_parts) | unicode_decoded_parts = map(lambda (value, charset): \ _native2unicode(value, charset, not force_processing), decoded_parts) | def _decode_rfc2047_header(msg, header, value, force_processing=False): """ Take an rfc2047 encoded string and convert it to unicode. """ # For each header value two decoding steps happen: # 1. We decode the header from its RFC2047 encoded format. # 2. We decode the resulting information from its native # charset t... |
result = """<td rowspan="%(len_subfields)s" class="bibEditCellTag"> %(print_tag_field)s %(print_tag_form)s </td> %(subfield)s %(print_link_function)s """ % {'len_subfields' : len_subfields, 'print_tag_field' : print_tag_field, 'print_tag_form' : print_tag_form, 'subfield' : self.tmpl_subfields... | try: result = """<td rowspan="%(len_subfields)s" class="bibEditCellTag"> %(print_tag_field)s %(print_tag_form)s </td> %(subfield)s %(print_link_function)s """ % {'len_subfields' : len_subfields, 'print_tag_field' : print_tag_field, 'print_tag_form' : print_tag_form, 'subfield' : self.tmpl_subf... | def tmpl_table_value(self, ln, recid, tag, field, format_tag, type_table, add, form_add=0): """ Return a field to print in table. """ |
citation_list = get_cited_by_dictionary()[record_id] | citation_list = get_cited_by_dictionary().get(record_id, []) | def get_cited_by_list(record_id): """return citation list dictionary of record_id """ citation_list = [] try: citation_list = get_cited_by_dictionary()[record_id] except TypeError: pass return citation_list |
if not rnkID: return "No ranking method selected." if not get_rnk_code(rnkID): return "Ranking method %s does not seem to exist." % str(rnkID) | def perform_modifyrank(rnkID, rnkcode='', ln=cdslang, template='', cfgfile='', confirm=0): """form to modify a rank method rnkID - id of the rank method """ subtitle = 'Step 1 - Please modify the wanted values below' if not rnkcode: oldcode = get_rnk_code(rnkID)[0] else: oldcode = rnkcode output = """ <dl> <dd>When... | |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_accesspolicy(req, callback='yes', confirm=0): """Modify default behaviour of a guest user or if new accounts should automatically/manually be modified.""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="1"></a>1. Access policy... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_accountoverview(req, callback='yes', confirm=0): """Modify default behaviour of a guest user or if new accounts should automatically/manually be modified.""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="2"></a>2. Account ov... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_createaccount(req, email='', password='', callback='yes', confirm=0): """Modify default behaviour of a guest user or if new accounts should automatically/manually be modified.""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name=... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_modifyaccountstatus(req, userID, email_user_pattern, limit_to, maxpage, page, callback='yes', confirm=0): """set a disabled account to enabled and opposite""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) res = run_sql("SELECT id, email, note, pas... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_modifybasket(req, userID, callback='yes', confirm=0): """modify email and password of an account""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="2"></a>2. Modify baskets.   <small>[<a title="See guide" href="%s/... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_modifylogindata(req, userID, email='', password='', callback='yes', confirm=0): """modify email and password of an account""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="1"></a>1. Edit login-data.   <small>[<a ... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_modifyalerts(req, userID, callback='yes', confirm=0): """modify email and password of an account""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="3"></a>3. Modify alerts.   <small>[<a title="See guide" href="%s/a... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_modifypreferences(req, userID, login_method='', callback='yes', confirm=0): """modify email and password of an account""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="4"></a>4. Modify preferences.   <small>[<a t... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_deleteaccount(req, userID, callback='yes', confirm=0): """delete account""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) subtitle = """<a name="5"></a>5. Delete account.   <small>[<a title="See guide" href="%s/admin/webaccess/guide.ht... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_rejectaccount(req, userID, email_user_pattern, limit_to, maxpage, page, callback='yes', confirm=0): """Delete account and send an email to the owner.""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return mustloginpage(req, auth_message) res = run_sql("SELECT id, email, password, note ... |
try: body = [output, extra] except NameError: body = [output] | body = [output] | def perform_modifyaccounts(req, email_user_pattern='', limit_to=-1, maxpage=MAXPAGEUSERS, page=1, content='', callback='yes', confirm=0): """Modify default behaviour of a guest user or if new accounts should automatically/manually be modified.""" (auth_code, auth_message) = is_adminuser(req) if auth_code != 0: return ... |
newfield_number = 1 + max([f[4] for v in vals for f in v]) | try: newfield_number = 1 + max([f[4] for v in vals for f in v]) except ValueError: newfield_number = 1 | def record_add_field(rec, tag, ind1="", ind2="", controlfield_value="", datafield_subfield_code_value_tuples=[]): """ Add a new field TAG to record REC with the following values: In case of creating a controlfield, only one argument matters: controlfield_value - value of the control field, in case this field is a con... |
out = _("You have <b>%i</b> new messages out of <a href=\"%s/yourmessages/?ln=%s\">%i messages</a>.")% (nb_new_mail, weburl, ln, total_mail) | out = _("You have %s new messages out of %s messages") out %= ('<b>' + str(nb_new_mail) + '</b>', '<a href="' + weburl + '/yourmessages/?ln=' + ln + '">' + str(total_mail)) out += '</a>.' | def tmpl_account_new_mail(self, nb_new_mail=0, total_mail=0, ln=cdslang): """ display infos about inbox (used by myaccount.py) @param nb_new_mail: number of new mails @param ln: language return: html output. """ _ = gettext_set_language(ln) out = _("You have <b>%i</b> new messages out of <a href=\"%s/yourmessages/?ln=%... |
login_box = create_login_page_box(referer) | login_box = create_login_page_box(referer=referer, ln=ln) | def add(req, ln=cdslang, recid=-1, action='DISPLAY', msg="", note="", score="", reviews=0, comid=-1): """ Add a comment (review) to record with id recid where recid>0 Also works for adding a remark to basket with id recid where recid<-99 @param ln: languange @param recid: record id @param action: 'DISPLAY' to display ... |
query = "SELECT bx.value FROM %s AS bx, %s AS bibx WHERE bibx.id_bibrec='%s' AND bx.id=bibx.id_bibxxx AND bx.tag LIKE '%s'" \ "ORDER BY bibx.field_number, bx.tag ASC" % (bx, bibx, recID, tag) | query = "SELECT bx.value FROM %s AS bx, %s AS bibx " \ " WHERE bibx.id_bibrec='%s' AND bx.id=bibx.id_bibxxx AND bx.tag LIKE '%s' " \ " ORDER BY bibx.field_number, bx.tag ASC" % (bx, bibx, recID, tag) print query | def get_fieldvalues(recID, tag): """Return list of field values for field TAG inside record RECID.""" out = [] if tag == "001___": # we have asked for recID that is not stored in bibXXx tables out.append(str(recID)) else: # we are going to look inside bibXXx tables digit = tag[0:2] bx = "bib%sx" % digit bibx = "bibrec_... |
raise elmsubmitSubmissionError("Submission does not contain the required fields for document type %s. Required fields: %s" % (doctype, elmsubmit_config.CFG_ELMSUBMIT_REQUIRED_FIELDS)) | raise elmsubmitSubmissionError("Submission does not contain the required fields %s." % (elmsubmit_config.CFG_ELMSUBMIT_REQUIRED_FIELDS)) | def process_email(email_string): """ main entry point of the module, handles whole processing of the email """ # See if we can parse the email: try: e = elmsubmit_EZEmail.ParseMessage(email_string) except elmsubmit_EZEmail.EZEmailParseError, err: try: if err.basic_email_info['from'] is None: raise ValueError respon... |
anguage=ln, | language=ln, | def lost(req, ln=cdslang): uid = webuser.getUid(req) if uid == -1 or CFG_ACCESS_CONTROL_LEVEL_SITE >= 1: return webuser.page_not_authorized(req, "../youraccount.py/lost") return page(title="Lost your password?", body=webaccount.perform_lost(), navtrail="""<a class="navtrail" href="%s/youraccount.py/display?ln=%s">You... |
out += """The following <A href="../youralerts.py/list_alerts">alerts</A> are related to this basket: """ | out += """The following <A href="../youralerts.py/list">alerts</A> are related to this basket: """ | def perform_display(uid, action="", delete_alerts="", confirm_action="", id_basket=0, bname="", newname="", newbname="", mark=[], to_basket="", copy_move="", idup="", ordup="", iddown="", orddown=""): # set variables out = "" basket_name = "" public_basket="no" permission = [] bname = get_basket_name( id_basket ) # e... |
Msg = """The following <A href="../youralerts.py/list_alerts">alerts</A> are related to this basket: """ | Msg = """The following <A href="../youralerts.py/list">alerts</A> are related to this basket: """ | def delete_basket(uid, id_basket, basket_name): # set variables out = "" # search for related alerts out += """<FORM name="deletebasket" action="display" method="post">""" out += """<TABLE style="background-color:F1F1F1; border:thin groove grey" cellspacing="0" """\ """cellpadding="0" width="650">\n<TR><TD>""" out +=... |
if verbose > 0: voutput += "Ranking data loaded, size of structure: %s" % len(rnkdict) | def rank_by_method(rank_method_code, lwords, hitset, rank_limit_relevance,verbose): """input: list of words, ['ellis', 'muon'] optional list of recIDs output: sorted list of recIDs based on rank method given, e.g. [[23,34], [344,24], [1,01]] if not possible, then return empty list""" global voutput rnkdict = run_sql("... | |
while howmany>>0: | while howmany>0: | def tmpl_print_brs(self, ln, howmany): """Outputs some <br>s""" _ = gettext_set_language(ln) text = "" while howmany>>0: text += """<br>""" howmany = howmany - 1 return text |
fromaddr = "From:cds.alert@cdsware.cern.ch" toaddrs = "To:" + p_email | fromaddr = "From: <ALERTENGINEEMAIL>" toaddrs = "To: " + p_email | def send_email(req,p_email=None): uid = webuser.getUid(req) passw = webuser.givePassword(p_email) if passw == -999: eMsg = "The entered e-mail address doesn't exist in the database" return page(title="Your Account", body=webaccount.perform_emailMessage(eMsg), navtrail="""<a class="navtrail" href="%s/youraccount.py/di... |
SQL_query = "SELECT a.alert_name FROM query q, user_query_basket a, basket b "\ | SQL_query = "SELECT distinct a.alert_name FROM query q, user_query_basket a, basket b "\ | def account_list_alerts(uid, action="", id_alert=0, id_basket=0,newname=""): # set variables out = "" id_user = uid # XXX SQL_query = "SELECT a.alert_name FROM query q, user_query_basket a, basket b "\ "WHERE a.id_user='%s' "\ "AND a.id_query=q.id "\ "AND a.id_basket=b.id "\ "ORDER BY a.alert_name ASC " % id_user que... |
"AND a.id_basket=b.id "\ | def account_list_alerts(uid, action="", id_alert=0, id_basket=0,newname=""): # set variables out = "" id_user = uid # XXX SQL_query = "SELECT a.alert_name FROM query q, user_query_basket a, basket b "\ "WHERE a.id_user='%s' "\ "AND a.id_query=q.id "\ "AND a.id_basket=b.id "\ "ORDER BY a.alert_name ASC " % id_user que... | |
for possible_field_instance in rec[tag]: if possible_field_instance[1] == ind1 and \ possible_field_instance[2] == ind2: out.append(possible_field_instance) | if record_had_field(rec, tag): for possible_field_instance in rec[tag]: if possible_field_instance[1] == ind1 and \ possible_field_instance[2] == ind2: out.append(possible_field_instance) | def record_get_field_instances(rec, tag="", ind1="", ind2=""): """Return the list of field instances of record REC matching TAG and IND1 and IND2. When TAG is an emtpy string, then return all field instances.""" out = [] if tag: for possible_field_instance in rec[tag]: if possible_field_instance[1] == ind1 and \ possib... |
s = string.replace(s, '>', '>') | def encode_for_xml(s): "Encode special chars in string so that it would be XML-compliant." s = string.replace(s, '&', '&') s = string.replace(s, '<', '<') s = string.replace(s, '>', '>') return s | |
'explain_loans' : _("Check out book you have on load, submit borrowing requests, etc. Requires CERN ID."), | 'explain_loans' : _("Check out book you have on loan, submit borrowing requests, etc. Requires CERN ID."), | def tmpl_account_info(self, ln, uid, guest, cfg_cern_site): """ Displays the account information |
for field in ('p', 'p1', 'p2', 'p3'): if field in argd and argd[field] == p: argd[field] = term break | for (px, fx) in ('p', 'f'),('p1', 'f1'), ('p2', 'f2'), ('p3', 'f3'): if px in argd: if f == argd[fx] or f == "anyfield" or f == "": if string.find(argd[px], p) > -1: argd[px] = string.replace(argd[px], p, term) break else: if string.find(f+":"+argd[px], p) > -1: argd[px] = string.replace(f+":"+argd[px], f+":"+p, term) ... | def create_nearest_terms_box(urlargd, p, f, t='w', n=5, ln=cdslang, intro_text_p=True): """Return text box containing list of 'n' nearest terms above/below 'p' for the field 'f' for matching type 't' (words/phrases) in language 'ln'. Propose new searches according to `urlargs' with the new words. If `intro_text_p' is t... |
def registerUser(req, email, passw, nickname="", nickname_required=True): """Register user with used-wished values of NICKNAME, EMAIL and | def registerUser(req, email, passw, nickname, register_without_nickname=False): """Register user with the desired values of NICKNAME, EMAIL and | def registerUser(req, email, passw, nickname="", nickname_required=True): """Register user with used-wished values of NICKNAME, EMAIL and PASSW. If NICKNAME_REQUIRED is set to False, then ignore desired NICKNAME and do not set any. This is suitable for external authentications so that people could login without havin... |
If NICKNAME_REQUIRED is set to False, then ignore desired NICKNAME and do not set any. This is suitable for external authentications so that people could login without having to register an internal account first. | If REGISTER_WITHOUT_NICKNAME is set to True, then ignore desired NICKNAME and do not set any. This is suitable for external authentications so that people can login without having to register an internal account first. | def registerUser(req, email, passw, nickname="", nickname_required=True): """Register user with used-wished values of NICKNAME, EMAIL and PASSW. If NICKNAME_REQUIRED is set to False, then ignore desired NICKNAME and do not set any. This is suitable for external authentications so that people could login without havin... |
if nickname_required: | if register_without_nickname: nickname = "" else: | def registerUser(req, email, passw, nickname="", nickname_required=True): """Register user with used-wished values of NICKNAME, EMAIL and PASSW. If NICKNAME_REQUIRED is set to False, then ignore desired NICKNAME and do not set any. This is suitable for external authentications so that people could login without havin... |
else: nickname = "" | def registerUser(req, email, passw, nickname="", nickname_required=True): """Register user with used-wished values of NICKNAME, EMAIL and PASSW. If NICKNAME_REQUIRED is set to False, then ignore desired NICKNAME and do not set any. This is suitable for external authentications so that people could login without havin... | |
if registerUser(req, p_email, p_pw, nickname_required=False) != 0: | if registerUser(req, p_email, p_pw, "", register_without_nickname=True) != 0: | def loginUser(req, p_un, p_pw, login_method): """It is a first simple version for the authentication of user. It returns the id of the user, for checking afterwards if the login is correct """ # p_un passed may be an email or a nickname: p_email = get_email_from_username(p_un) # go on with the old stuff based on p_em... |
def get_config(rank_method_code): """Load common data into memory""" global voutput global stopwords global stemmer global chars_alphanumericseparators global col_size global rnkWORD_table languages = {'fr': 'french', 'en': 'porter', 'no':'norwegian', 'se':'swedish', 'de': 'german', 'it':'italian', 'pt':'portugese'} vo... | def get_config(rank_method_code): #needs some work """Load common data into memory""" global voutput global stopwords global stemmer global chars_alphanumericseparators global col_size global rnkWORD_table languages = {'fr': 'french', 'en': 'porter', 'no':'norwegian', 'se':'swedish', 'de': 'german', 'it':'italian', 'pt... | |
global methods | global methods languages = {'fr': 'french', 'en': 'porter', 'no':'norwegian', 'se':'swedish', 'de': 'german', 'it':'italian', 'pt':'portugese'} | def create_rnkmethod_cache(): """Create cache with vital information for each rank method.""" global methods bibrank_meths = run_sql("SELECT name from rnkMETHOD") methods = {} for (rank_method_code,) in bibrank_meths: try: file = etcdir + "/bibrank/" + rank_method_code + ".cfg" config = ConfigParser.ConfigParser() con... |
if config.has_option(cfg_function, "stem_if_avail") and config.get(cfg_function, "stem_if_avail") == "yes": methods[rank_method_code]["stem_lang"] = config.get(cfg_function, "stem_query_language") | methods[rank_method_code]["col_size"] = run_sql("SELECT count(*) FROM %sR" % methods[rank_method_code]["rnkWORD_table"][:-1])[0][0] if config.has_option(cfg_function, "stem_if_avail") and config.get(cfg_function, "stem_if_avail") == "yes": methods[rank_method_code]["stemmer"] = Stemmer.Stemmer(languages[config.get(cfg... | def create_rnkmethod_cache(): """Create cache with vital information for each rank method.""" global methods bibrank_meths = run_sql("SELECT name from rnkMETHOD") methods = {} for (rank_method_code,) in bibrank_meths: try: file = etcdir + "/bibrank/" + rank_method_code + ".cfg" config = ConfigParser.ConfigParser() con... |
methods[rank_method_code]["stopword"] = config.get(cfg_function, "stopword") | methods[rank_method_code]["stopwords"] = get_stopwords("%s" % config.get(cfg_function, "stopword")) | def create_rnkmethod_cache(): """Create cache with vital information for each rank method.""" global methods bibrank_meths = run_sql("SELECT name from rnkMETHOD") methods = {} for (rank_method_code,) in bibrank_meths: try: file = etcdir + "/bibrank/" + rank_method_code + ".cfg" config = ConfigParser.ConfigParser() con... |
i8n_names = run_sql("SELECT ln,value from rnkMETHODNAME,rnkMETHOD where id_rnkMETHOD=rnkMETHOD.id and rnkMETHOD.name='%s'" % (rank_method_code)) for (ln, value) in i8n_names: methods[rank_method_code][ln] = value | def create_rnkmethod_cache(): """Create cache with vital information for each rank method.""" global methods bibrank_meths = run_sql("SELECT name from rnkMETHOD") methods = {} for (rank_method_code,) in bibrank_meths: try: file = etcdir + "/bibrank/" + rank_method_code + ".cfg" config = ConfigParser.ConfigParser() con... | |
except Exception: | except Exception, e: | def rank_records(rank_method_code, rank_limit_relevance, hitset_global, pattern=[], verbose=0): """rank_method, e.g. `jif' or `sbr' (word frequency vector model) rank_limit_relevance, e.g. `23' for `nbc' (number of citations) or `0.10' for `vec' hitset, search engine hits; optional pattern, search engine query or recor... |
get_config(rank_method_code) | def rank_records(rank_method_code, rank_limit_relevance, hitset_global, pattern=[], verbose=0): """rank_method, e.g. `jif' or `sbr' (word frequency vector model) rank_limit_relevance, e.g. `23' for `nbc' (number of citations) or `0.10' for `vec' hitset, search engine hits; optional pattern, search engine query or recor... | |
res = run_sql("SELECT termlist FROM %sR WHERE id_bibrec=%s" % (rnkWORD_table[:-1], recID)) | res = run_sql("SELECT termlist FROM %sR WHERE id_bibrec=%s" % (methods[rank_method_code]["rnkWORD_table"][:-1], recID)) | def find_similar(rank_method_code, recID, hitset, rank_limit_relevance,verbose): """Finding terms to use for calculating similarity. Terms are taken from the recid given, returns a list of recids's and relevance, [[23,34], [344,24], [1,01]] recID - record to use for find similar rank_limit_relevance - find all similar ... |
terms_recs = dict(run_sql("SELECT term, hitlist FROM %s WHERE term IN (%s)" % (rnkWORD_table,terms))) | terms_recs = dict(run_sql("SELECT term, hitlist FROM %s WHERE term IN (%s)" % (methods[rank_method_code]["rnkWORD_table"],terms))) | def find_similar(rank_method_code, recID, hitset, rank_limit_relevance,verbose): """Finding terms to use for calculating similarity. Terms are taken from the recid given, returns a list of recids's and relevance, [[23,34], [344,24], [1,01]] recID - record to use for find similar rank_limit_relevance - find all similar ... |
if len(query_terms_old) <= methods[rank_method_code]["max_nr_words_lower"] or (len(term_recs) >= methods[rank_method_code]["min_nr_words_docs"] and (((float(len(term_recs)) / float(col_size)) <= methods[rank_method_code]["max_word_occurence"]) and ((float(len(term_recs)) / float(col_size)) >= methods[rank_method_code]... | if len(query_terms_old) <= methods[rank_method_code]["max_nr_words_lower"] or (len(term_recs) >= methods[rank_method_code]["min_nr_words_docs"] and (((float(len(term_recs)) / float(methods[rank_method_code]["col_size"])) <= methods[rank_method_code]["max_word_occurence"]) and ((float(len(term_recs)) / float(methods[ra... | def find_similar(rank_method_code, recID, hitset, rank_limit_relevance,verbose): """Finding terms to use for calculating similarity. Terms are taken from the recid given, returns a list of recids's and relevance, [[23,34], [344,24], [1,01]] recID - record to use for find similar rank_limit_relevance - find all similar ... |
voutput += "<br>Number of terms: %s<br>" % run_sql("SELECT count(id) FROM %s" % rnkWORD_table)[0][0] | voutput += "<br>Number of terms: %s<br>" % run_sql("SELECT count(id) FROM %s" % methods[rank_method_code]["rnkWORD_table"])[0][0] | def find_similar(rank_method_code, recID, hitset, rank_limit_relevance,verbose): """Finding terms to use for calculating similarity. Terms are taken from the recid given, returns a list of recids's and relevance, [[23,34], [344,24], [1,01]] recID - record to use for find similar rank_limit_relevance - find all similar ... |
voutput += "Current number of recIDs: %s<br>" % (col_size) | voutput += "Current number of recIDs: %s<br>" % (methods[rank_method_code]["col_size"]) | def find_similar(rank_method_code, recID, hitset, rank_limit_relevance,verbose): """Finding terms to use for calculating similarity. Terms are taken from the recid given, returns a list of recids's and relevance, [[23,34], [344,24], [1,01]] recID - record to use for find similar rank_limit_relevance - find all similar ... |
rank_method_stat(reclist, query_terms) | rank_method_stat(rank_method_code, reclist, query_terms) | def find_similar(rank_method_code, recID, hitset, rank_limit_relevance,verbose): """Finding terms to use for calculating similarity. Terms are taken from the recid given, returns a list of recids's and relevance, [[23,34], [344,24], [1,01]] recID - record to use for find similar rank_limit_relevance - find all similar ... |
if not stopwords.has_key(term): | if not methods[rank_method_code]["stopwords"].has_key(term): | def word_frequency(rank_method_code, lwords, hitset, rank_limit_relevance,verbose): """input: list of words, ['ellis', 'muon'] optional list of recIDs output: sorted list of recIDs by summary word frequencies, e.g. [[23,34], [344,24], [1,01]] if not possible (e.g. all stopwords), then return empty list""" global voutp... |
terms = string.split(string.lower(re.sub(chars_alphanumericseparators, ' ', term))) | terms = string.split(string.lower(re.sub(methods[rank_method_code]["chars_alphanumericseparators"], ' ', term))) | def word_frequency(rank_method_code, lwords, hitset, rank_limit_relevance,verbose): """input: list of words, ['ellis', 'muon'] optional list of recIDs output: sorted list of recIDs by summary word frequencies, e.g. [[23,34], [344,24], [1,01]] if not possible (e.g. all stopwords), then return empty list""" global voutp... |
if stemmer: term = stemmer.stem(string.replace(term, ' ', '')) | if methods[rank_method_code].has_key("stemmer"): term = methods[rank_method_code]["stemmer"].stem(string.replace(term, ' ', '')) | def word_frequency(rank_method_code, lwords, hitset, rank_limit_relevance,verbose): """input: list of words, ['ellis', 'muon'] optional list of recIDs output: sorted list of recIDs by summary word frequencies, e.g. [[23,34], [344,24], [1,01]] if not possible (e.g. all stopwords), then return empty list""" global voutp... |
term_recs = run_sql("SELECT term, hitlist FROM %s WHERE term='%s'" % (rnkWORD_table, MySQLdb.escape_string(term))) | term_recs = run_sql("SELECT term, hitlist FROM %s WHERE term='%s'" % (methods[rank_method_code]["rnkWORD_table"], MySQLdb.escape_string(term))) | def word_frequency(rank_method_code, lwords, hitset, rank_limit_relevance,verbose): """input: list of words, ['ellis', 'muon'] optional list of recIDs output: sorted list of recIDs by summary word frequencies, e.g. [[23,34], [344,24], [1,01]] if not possible (e.g. all stopwords), then return empty list""" global voutp... |
if check_term({}, term, col_size, len(term_recs), 1.0, 0.00, 0): | if check_term({}, term, methods[rank_method_code]["col_size"], len(term_recs), 1.0, 0.00, 0): | def word_frequency(rank_method_code, lwords, hitset, rank_limit_relevance,verbose): """input: list of words, ['ellis', 'muon'] optional list of recIDs output: sorted list of recIDs by summary word frequencies, e.g. [[23,34], [344,24], [1,01]] if not possible (e.g. all stopwords), then return empty list""" global voutp... |
voutput += "<br>Current number of recIDs: %s<br>" % (col_size) voutput += "Number of terms: %s<br>" % run_sql("SELECT count(id) FROM %s" % rnkWORD_table)[0][0] | voutput += "<br>Current number of recIDs: %s<br>" % (methods[rank_method_code]["col_size"]) voutput += "Number of terms: %s<br>" % run_sql("SELECT count(id) FROM %s" % methods[rank_method_code]["rnkWORD_table"])[0][0] | def word_frequency(rank_method_code, lwords, hitset, rank_limit_relevance,verbose): """input: list of words, ['ellis', 'muon'] optional list of recIDs output: sorted list of recIDs by summary word frequencies, e.g. [[23,34], [344,24], [1,01]] if not possible (e.g. all stopwords), then return empty list""" global voutp... |
rank_method_stat(reclist, query_terms) | rank_method_stat(rank_method_code, reclist, query_terms) | def word_frequency(rank_method_code, lwords, hitset, rank_limit_relevance,verbose): """input: list of words, ['ellis', 'muon'] optional list of recIDs output: sorted list of recIDs by summary word frequencies, e.g. [[23,34], [344,24], [1,01]] if not possible (e.g. all stopwords), then return empty list""" global voutp... |
def rank_method_stat(reclist, lwords): | def rank_method_stat(rank_method_code, reclist, lwords): | def rank_method_stat(reclist, lwords): """Shows some statistics about the searchresult.""" global voutput if len(reclist) > 20: j = 20 else: j = len(reclist) voutput += "<br>Rank statistics:<br>" for i in range(1, j): voutput += "%s,Recid:%s,Score:%s<br>" % (i,reclist[len(reclist) - i][0],reclist[len(reclist) - i][1])... |
res = run_sql("SELECT termlist FROM %sR WHERE id_bibrec=%s" % (rnkWORD_table[:-1],reclist[len(reclist) - i][0])) | res = run_sql("SELECT termlist FROM %sR WHERE id_bibrec=%s" % (methods[rank_method_code]["rnkWORD_table"][:-1],reclist[len(reclist) - i][0])) | def rank_method_stat(reclist, lwords): """Shows some statistics about the searchresult.""" global voutput if len(reclist) > 20: j = 20 else: j = len(reclist) voutput += "<br>Rank statistics:<br>" for i in range(1, j): voutput += "%s,Recid:%s,Score:%s<br>" % (i,reclist[len(reclist) - i][0],reclist[len(reclist) - i][1])... |
print "Psyco Error",e | pass | def rank_method_stat(reclist, lwords): """Shows some statistics about the searchresult.""" global voutput if len(reclist) > 20: j = 20 else: j = len(reclist) voutput += "<br>Rank statistics:<br>" for i in range(1, j): voutput += "%s,Recid:%s,Score:%s<br>" % (i,reclist[len(reclist) - i][0],reclist[len(reclist) - i][1])... |
query = "SELECT DATE_FORMAT(creation_date,'%%Y-%%m-%%d %%H:%%i:%%s') FROM bibrec WHERE id='%s'" % (sysno) res = run_sql(query) for row in res: out = row[0] return localtime_to_UTC(out) | res = run_sql("SELECT DATE_FORMAT(creation_date,'%%Y-%%m-%%d %%H:%%i:%%s') FROM bibrec WHERE id=%s", (sysno,), 1) if res[0][0]: out = localtime_to_UTC(res[0][0]) return out | def get_creation_date(sysno): "Returns the creation date of the record 'sysno'." out = "" query = "SELECT DATE_FORMAT(creation_date,'%%Y-%%m-%%d %%H:%%i:%%s') FROM bibrec WHERE id='%s'" % (sysno) res = run_sql(query) for row in res: out = row[0] return localtime_to_UTC(out) |
out = "" query = "SELECT DATE_FORMAT(modification_date,'%%Y-%%m-%%d %%H:%%i:%%s') FROM bibrec WHERE id='%s'" % (sysno) res = run_sql(query) for row in res: out = row[0] return localtime_to_UTC(out) | out = "" res = run_sql("SELECT DATE_FORMAT(modification_date,'%%Y-%%m-%%d %%H:%%i:%%s') FROM bibrec WHERE id=%s", (sysno,), 1) if res[0][0]: out = localtime_to_UTC(res[0][0]) return out | def get_modification_date(sysno): "Returns the date of last modification for the record 'sysno'." out = "" query = "SELECT DATE_FORMAT(modification_date,'%%Y-%%m-%%d %%H:%%i:%%s') FROM bibrec WHERE id='%s'" % (sysno) res = run_sql(query) for row in res: out = row[0] return localtime_to_UTC(out) |
out = "" query = "SELECT MIN(DATE_FORMAT(creation_date,'%Y-%m-%d %H:%i:%s')) FROM bibrec" res = run_sql(query) return localtime_to_UTC(res[0][0]) | out = "" res = run_sql("SELECT MIN(DATE_FORMAT(creation_date,'%%Y-%%m-%%d %%H:%%i:%%s')) FROM bibrec", (), 1) if res[0][0]: out = localtime_to_UTC(res[0][0]) return out | def get_earliest_datestamp(): "Get earliest datestamp in the database" out = "" query = "SELECT MIN(DATE_FORMAT(creation_date,'%Y-%m-%d %H:%i:%s')) FROM bibrec" res = run_sql(query) return localtime_to_UTC(res[0][0]) |
for pair in values: out += """<option value="%(value)s"%(selected)s>%(text)s""" % { 'value' : pair['value'], 'selected' : self.tmpl_is_selected(pair['value'], selected), 'text' : pair['text'] } | if values: for pair in values: out += """<option value="%(value)s"%(selected)s>%(text)s""" % { 'value' : pair['value'], 'selected' : self.tmpl_is_selected(pair['value'], selected), 'text' : pair['text'] } | def tmpl_searchwithin_select(self, ln, fieldname, selected, values): """ Produces 'search within' selection box for the current collection. |
return fields.append({'value' : value, 'text' : value + _("MARC tag") }) else: return fields | out.append({'value' : value, 'text' : str(value) + " " + _("MARC tag") }) return out | def _add_mark_to_field(self, value, fields, ln, chars = 1): """Adds the current value as a MARC tag in the fields array Useful for advanced search""" |
topics_infos = db.get_personal_topics_infos(uid) | topics_infos = map(lambda x: x[0], db.get_personal_topics_infos(uid)) | def perform_request_create_basket(uid, new_basket_name='', new_topic_name='', create_in_topic=-1, topic_number=-1, ln=cdslang): """if new_basket_name and topic infos are given create a basket and return topic number, else return (body, errors, warnings) tuple of basket creation form. @param uid: user id (int) @param ne... |
return self.tmpl_warnings([_(("There have been no reports so far."), 'green')]) | return self.tmpl_warnings([(_("There have been no reports so far."), 'green')]) | def tmpl_admin_users(self, ln, users_data): """ @param users_data: tuple of ct, i.e. (ct, ct, ...) where ct is a tuple (total_number_reported, total_comments_reported, total_reviews_reported, total_nb_votes_yes_of_reported, total_nb_votes_total_of_reported, user_id, user_email, user_nickname) sorted by order of ct hav... |
<td>4. <small><a href="%s/admin/websearch/websearchadmin.py?colID=%s&ln=%s&mtype=perform_runwebcoll">Webcoll Status</a></small></td> | <td>4. <small><a href="%s/admin/websearch/websearchadmin.py?colID=%s&ln=%s&mtype=perform_checkwebcollstatus">Webcoll Status</a></small></td> | def perform_index(colID=1, ln=cdslang, mtype='', content='', confirm=0): """The index method, calling methods to show the collection tree, create new collections and add collections to tree. """ subtitle = "Overview" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output = "" fin_output = "" if not... |
<td>5. <small><a href="%s/admin/websearch/websearchadmin.py?colID=%s&ln=%s&mtype=perform_validateconf">Collections Status</a></small></td> | <td>5. <small><a href="%s/admin/websearch/websearchadmin.py?colID=%s&ln=%s&mtype=perform_checkcollectionstatus">Collections Status</a></small></td> | def perform_index(colID=1, ln=cdslang, mtype='', content='', confirm=0): """The index method, calling methods to show the collection tree, create new collections and add collections to tree. """ subtitle = "Overview" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output = "" fin_output = "" if not... |
if mtype == "perform_runwebcoll" and content: | if mtype == "perform_checkwebcollstatus" and content: | def perform_index(colID=1, ln=cdslang, mtype='', content='', confirm=0): """The index method, calling methods to show the collection tree, create new collections and add collections to tree. """ subtitle = "Overview" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output = "" fin_output = "" if not... |
elif mtype == "perform_runwebcoll" or mtype == "perform_showall": fin_output += perform_runwebcoll(colID, ln, callback='') if mtype == "perform_validateconf" and content: | elif mtype == "perform_checkwebcollstatus" or mtype == "perform_showall": fin_output += perform_checkwebcollstatus(colID, ln, callback='') if mtype == "perform_checkcollectionstatus" and content: | def perform_index(colID=1, ln=cdslang, mtype='', content='', confirm=0): """The index method, calling methods to show the collection tree, create new collections and add collections to tree. """ subtitle = "Overview" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output = "" fin_output = "" if not... |
elif mtype == "perform_validateconf" or mtype == "perform_showall": fin_output += perform_validateconf(colID, ln, callback='') | elif mtype == "perform_checkcollectionstatus" or mtype == "perform_showall": fin_output += perform_checkcollectionstatus(colID, ln, callback='') | def perform_index(colID=1, ln=cdslang, mtype='', content='', confirm=0): """The index method, calling methods to show the collection tree, create new collections and add collections to tree. """ subtitle = "Overview" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output = "" fin_output = "" if not... |
def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes""" | def perform_checkwebcollstatus(colID, ln, confirm=0, callback='yes'): """Check status of the collection tables with respect to the webcoll cache.""" | def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes""" subtitle = """<a name="11"></a>Webcoll Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """<br><b>Last updates:</b><br>""" collection_table_update_time = ""... |
subtitle = """<a name="11"></a>Webcoll Status""" | subtitle = """<a name="11"></a>Webcoll Status   [<a href="%s/admin/websearch/guide.html | def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes""" subtitle = """<a name="11"></a>Webcoll Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """<br><b>Last updates:</b><br>""" collection_table_update_time = ""... |
if str(res[0][11])[-3:] == ".00": collection_table_update_time = str(res[0][11])[:-3] else: collection_table_update_time = str(res[0][11]) | collection_table_update_time = re.sub(r'\.00$', '', str(res[0][11])) | def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes""" subtitle = """<a name="11"></a>Webcoll Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """<br><b>Last updates:</b><br>""" collection_table_update_time = ""... |
collection_web_update_time = str(file.readline()) | collection_web_update_time = string.strip(file.readline()) collection_web_update_time = re.sub(r'[A-Z ]+$', '', collection_web_update_time) | def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes""" subtitle = """<a name="11"></a>Webcoll Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """<br><b>Last updates:</b><br>""" collection_table_update_time = ""... |
tabletime = time.strptime(collection_table_update_time, "%Y-%m-%d %H:%M:%S") try: webtime = time.strptime(collection_web_update_time, "%d %b %Y %H:%M:%S %Z") | try: collection_web_update_time = time.strftime("%04Y-%02m-%02d %02H:%02M:%02S", time.strptime(collection_web_update_time, "%d %b %Y %H:%M:%S")) | def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes""" subtitle = """<a name="11"></a>Webcoll Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """<br><b>Last updates:</b><br>""" collection_table_update_time = ""... |
collection_web_update_time[0:string.rfind(collection_web_update_time, " ")] webtime = time.strptime(collection_web_update_time, "%d %b %Y %H:%M:%S") if tabletime > webtime: | pass if collection_table_update_time > collection_web_update_time: | def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes""" subtitle = """<a name="11"></a>Webcoll Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """<br><b>Last updates:</b><br>""" collection_table_update_time = ""... |
return perform_index(colID, ln, "perform_runwebcoll", addadminbox(subtitle, body)) | return perform_index(colID, ln, "perform_checkwebcollstatus", addadminbox(subtitle, body)) | def perform_runwebcoll(colID, ln, confirm=0, callback='yes'): """Status of the collection tables / indexes""" subtitle = """<a name="11"></a>Webcoll Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) output += """<br><b>Last updates:</b><br>""" collection_table_update_time = ""... |
def perform_validateconf(colID, ln, confirm=0, callback='yes'): """Validation of the configuration of the collections""" | def perform_checkcollectionstatus(colID, ln, confirm=0, callback='yes'): """Check the configuration of the collections.""" | def perform_validateconf(colID, ln, confirm=0, callback='yes'): """Validation of the configuration of the collections""" subtitle = """<a name="11"></a>Collections Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) collections = run_sql("SELECT id, name, dbquery, restricted FROM... |
subtitle = """<a name="11"></a>Collections Status""" | subtitle = """<a name="11"></a>Collections Status   [<a href="%s/admin/websearch/guide.html | def perform_validateconf(colID, ln, confirm=0, callback='yes'): """Validation of the configuration of the collections""" subtitle = """<a name="11"></a>Collections Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) collections = run_sql("SELECT id, name, dbquery, restricted FROM... |
header = ['Id', 'Name', 'Query', 'Subcollections', 'Restricted', 'I8N','Status'] | header = ['ID', 'Name', 'Query', 'Subcollections', 'Restricted', 'I18N','Status'] | def perform_validateconf(colID, ln, confirm=0, callback='yes'): """Validation of the configuration of the collections""" subtitle = """<a name="11"></a>Collections Status""" output = "" colID = int(colID) col_dict = dict(get_def_name('', "collection")) collections = run_sql("SELECT id, name, dbquery, restricted FROM... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.