rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
word_hitlist.union(word_hitlists[coll]) word_hitlist.calculate_nbhits() if word_hitlist._nbhits > 0: browsed_words_in_colls.append([word, word_hitlist._nbhits])
phrase_hitlist.union(phrase_hitlists[coll]) phrase_hitlist.calculate_nbhits() if phrase_hitlist._nbhits > 0: browsed_phrases_in_colls.append([phrase, phrase_hitlist._nbhits])
def browse_pattern(req, colls, p, f, rg): """Browse either biliographic phrases or words indexes, and display it.""" ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) ## prepare collection urlargument for later printing: p_orig = p urlarg_colls = "" for coll in colls: urlarg_colls += "&c=...
if browsed_words_in_colls == []: if browsed_words != []:
if browsed_phrases_in_colls == []: if browsed_phrases != []:
def browse_pattern(req, colls, p, f, rg): """Browse either biliographic phrases or words indexes, and display it.""" ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) ## prepare collection urlargument for later printing: p_orig = p urlarg_colls = "" for coll in colls: urlarg_colls += "&c=...
Please try different term.<p>Displaying matches in any collection...""" % p_orig, "") browsed_words_in_colls = browsed_words
Please try different term.<p>Displaying matches in any collection...""" % p_orig) for phrase in browsed_phrases: browsed_phrases_in_colls.append([phrase, get_nbhits_in_bibxxx(phrase, f)])
def browse_pattern(req, colls, p, f, rg): """Browse either biliographic phrases or words indexes, and display it.""" ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) ## prepare collection urlargument for later printing: p_orig = p urlarg_colls = "" for coll in colls: urlarg_colls += "&c=...
if len(browsed_words_in_colls) == 1:
if len(browsed_phrases_in_colls) == 1:
def browse_pattern(req, colls, p, f, rg): """Browse either biliographic phrases or words indexes, and display it.""" ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) ## prepare collection urlargument for later printing: p_orig = p urlarg_colls = "" for coll in colls: urlarg_colls += "&c=...
word, nbhits = browsed_words_in_colls[0][0], browsed_words_in_colls[0][1]
phrase, nbhits = browsed_phrases_in_colls[0][0], browsed_phrases_in_colls[0][1]
def browse_pattern(req, colls, p, f, rg): """Browse either biliographic phrases or words indexes, and display it.""" ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) ## prepare collection urlargument for later printing: p_orig = p urlarg_colls = "" for coll in colls: urlarg_colls += "&c=...
</tr>""" % (nbhits, weburl, urllib.quote(word), urllib.quote(f), urlarg_colls, word) elif len(browsed_words_in_colls) > 1:
</tr>""" % (nbhits, weburl, urllib.quote(phrase), urllib.quote(f), urlarg_colls, phrase) elif len(browsed_phrases_in_colls) > 1:
def browse_pattern(req, colls, p, f, rg): """Browse either biliographic phrases or words indexes, and display it.""" ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) ## prepare collection urlargument for later printing: p_orig = p urlarg_colls = "" for coll in colls: urlarg_colls += "&c=...
for word, nbhits in browsed_words_in_colls[:-1]:
for phrase, nbhits in browsed_phrases_in_colls[:-1]:
def browse_pattern(req, colls, p, f, rg): """Browse either biliographic phrases or words indexes, and display it.""" ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) ## prepare collection urlargument for later printing: p_orig = p urlarg_colls = "" for coll in colls: urlarg_colls += "&c=...
</tr>""" % (nbhits, weburl, urllib.quote(word), urllib.quote(f), urlarg_colls, word)
</tr>""" % (nbhits, weburl, urllib.quote(phrase), urllib.quote(f), urlarg_colls, phrase)
def browse_pattern(req, colls, p, f, rg): """Browse either biliographic phrases or words indexes, and display it.""" ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) ## prepare collection urlargument for later printing: p_orig = p urlarg_colls = "" for coll in colls: urlarg_colls += "&c=...
word, nbhits = browsed_words_in_colls[-1]
phrase, nbhits = browsed_phrases_in_colls[-1]
def browse_pattern(req, colls, p, f, rg): """Browse either biliographic phrases or words indexes, and display it.""" ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) ## prepare collection urlargument for later printing: p_orig = p urlarg_colls = "" for coll in colls: urlarg_colls += "&c=...
next %s: <a href="%s/search.py?search=Browse&p=%s&f=%s%s">%s</a>
<a href="%s/search.py?action=Browse&p=%s&f=%s%s">next</a>
def browse_pattern(req, colls, p, f, rg): """Browse either biliographic phrases or words indexes, and display it.""" ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) ## prepare collection urlargument for later printing: p_orig = p urlarg_colls = "" for coll in colls: urlarg_colls += "&c=...
</tr>""" % (weburl, f, weburl, urllib.quote(word), urllib.quote(f), urlarg_colls, word)
</tr>""" % (weburl, weburl, urllib.quote(phrase), urllib.quote(f), urlarg_colls)
def browse_pattern(req, colls, p, f, rg): """Browse either biliographic phrases or words indexes, and display it.""" ## do we search in words indexes? if not f: return browse_in_bibwords(req, p, f) ## prepare collection urlargument for later printing: p_orig = p urlarg_colls = "" for coll in colls: urlarg_colls += "&c=...
urlargs = string.replace(req.args, "search=Browse","search=SEARCH") req.write(create_nearest_terms_box(urlargs, p, f))
urlargs = string.replace(req.args, "action=Browse","action=SEARCH") req.write(create_nearest_terms_box(urlargs, p, f, 'w'))
def browse_in_bibwords(req, p, f): """Browse inside words indexes.""" req.write("<p>Words nearest to <em>%s</em> " % p) if f: req.write(" inside <em>%s</em> " % f) req.write(" in any collection are:<br>") urlargs = string.replace(req.args, "search=Browse","search=SEARCH") req.write(create_nearest_terms_box(urlargs, p, ...
def browse_in_bibxxx(p, f, rg): """Browse bibliographic phrases for the given pattern in the given field, regardless of collection. Return list of [word1, nbhits1],[word2, nbhits2],...[word_rg,nbhits_rg].""" if string.find(p, ":") > 0: f, p = split(p, ":", 2) p = re_quotes.sub("", p) tl = [] if str(f[0]).isdigit() a...
def browse_in_bibwords(req, p, f): """Browse inside words indexes.""" req.write("<p>Words nearest to <em>%s</em> " % p) if f: req.write(" inside <em>%s</em> " % f) req.write(" in any collection are:<br>") urlargs = string.replace(req.args, "search=Browse","search=SEARCH") req.write(create_nearest_terms_box(urlargs, p, ...
(text, create_nearest_terms_box(req.args, pi, fi)), "")
(text, create_nearest_terms_box(req.args, pi, fi, ti)))
def search_pattern(req, p=None, f=None, colls=[], m=None, hit_hints=0): """Searches for pattern 'p' and field 'f' and returns dict of recIDs HitLists per each collection in 'colls'. - Optionally, the function accepts the match type argument 'm'. If it is set (e.g. from advanced search interface), then it performs this ...
(fi, pi, results_for_opft_item._nbhits), "")
(fi, pi, results_for_opft_item._nbhits))
def search_pattern(req, p=None, f=None, colls=[], m=None, hit_hints=0): """Searches for pattern 'p' and field 'f' and returns dict of recIDs HitLists per each collection in 'colls'. - Optionally, the function accepts the match type argument 'm'. If it is set (e.g. from advanced search interface), then it performs this ...
(get_word_nbhits(pi, fi), weburl, url_args_new, pi)
(get_nbhits_in_bibwords(pi, fi), weburl, url_args_new, pi)
def search_pattern(req, p=None, f=None, colls=[], m=None, hit_hints=0): """Searches for pattern 'p' and field 'f' and returns dict of recIDs HitLists per each collection in 'colls'. - Optionally, the function accepts the match type argument 'm'. If it is set (e.g. from advanced search interface), then it performs this ...
print_warning(req, text, "")
print_warning(req, text)
def search_pattern(req, p=None, f=None, colls=[], m=None, hit_hints=0): """Searches for pattern 'p' and field 'f' and returns dict of recIDs HitLists per each collection in 'colls'. - Optionally, the function accepts the match type argument 'm'. If it is set (e.g. from advanced search interface), then it performs this ...
(weburl, url_args, results_in_Home._nbhits), "")
(weburl, url_args, results_in_Home._nbhits))
def search_pattern(req, p=None, f=None, colls=[], m=None, hit_hints=0): """Searches for pattern 'p' and field 'f' and returns dict of recIDs HitLists per each collection in 'colls'. - Optionally, the function accepts the match type argument 'm'. If it is set (e.g. from advanced search interface), then it performs this ...
if string.find(p, '%') > 0:
if string.find(p, '%') > -1:
def search_in_bibxxx(req, p, f, type): """Searches for pattern 'p' inside bibxxx tables for field 'f' and returns hitlist of recIDs found. The search type is defined by 'type' (e.g. equals to 'r' for a regexp search).""" p_orig = p # saving for eventual future 'no match' reporting # wash arguments: f = string.replace(f...
p_new = "%" + p + "%" print_warning(req, "No exact match found, looking for substrings...", "") return search_in_bibxxx(req, p_new, f, type)
if f == "recid" or f == "sysno": print_warning(req, "Requested record does not seem to exist.") set = HitList() return set else: p_new = "%" + p + "%" print_warning(req, "No exact match found, looking for substrings...") return search_in_bibxxx(req, p_new, f, type)
def search_in_bibxxx(req, p, f, type): """Searches for pattern 'p' inside bibxxx tables for field 'f' and returns hitlist of recIDs found. The search type is defined by 'type' (e.g. equals to 'r' for a regexp search).""" p_orig = p # saving for eventual future 'no match' reporting # wash arguments: f = string.replace(f...
def create_nearest_terms_box(urlargs, p, f, n=5, prologue="<blockquote>", epilogue="</blockquote>"):
def create_nearest_terms_box(urlargs, p, f, t='w', n=5, prologue="<blockquote>", epilogue="</blockquote>"):
def create_nearest_terms_box(urlargs, p, f, n=5, prologue="<blockquote>", epilogue="</blockquote>"): """Return text box containing list of 'n' nearest terms above/below 'p' in the words index list for the field 'f'. Propose new searches according to `urlargs' with the new words. """ out = "" # deduce into which bibword...
in the words index list for the field 'f'.
for the field 'f' for matching type 't' (words/phrases).
def create_nearest_terms_box(urlargs, p, f, n=5, prologue="<blockquote>", epilogue="</blockquote>"): """Return text box containing list of 'n' nearest terms above/below 'p' in the words index list for the field 'f'. Propose new searches according to `urlargs' with the new words. """ out = "" # deduce into which bibword...
return "%sNo words index available for %s.%s" % (prologue, f, epilogue) nearest_words = [] query = "SELECT word FROM %s WHERE word<'%s' ORDER BY word DESC LIMIT %d" % (bibwordsX, escape_string(p), n)
return nearest_words query = "SELECT word FROM %s WHERE word<'%s' ORDER BY word DESC LIMIT %d" % (bibwordsX, escape_string(p), n_above)
def create_nearest_terms_box(urlargs, p, f, n=5, prologue="<blockquote>", epilogue="</blockquote>"): """Return text box containing list of 'n' nearest terms above/below 'p' in the words index list for the field 'f'. Propose new searches according to `urlargs' with the new words. """ out = "" # deduce into which bibword...
if res:
for row in res: nearest_words.append(row[0]) nearest_words.reverse() nearest_words.append(p) query = "SELECT word FROM %s WHERE word>'%s' ORDER BY word ASC LIMIT %d" % (bibwordsX, escape_string(p), n_below) res = run_sql(query) for row in res: nearest_words.append(row[0]) return nearest_words def get_nearest_terms_i...
def create_nearest_terms_box(urlargs, p, f, n=5, prologue="<blockquote>", epilogue="</blockquote>"): """Return text box containing list of 'n' nearest terms above/below 'p' in the words index list for the field 'f'. Propose new searches according to `urlargs' with the new words. """ out = "" # deduce into which bibword...
nearest_words.append(row[0]) nearest_words.reverse() nearest_words.append(p) query = "SELECT word FROM %s WHERE word>'%s' ORDER BY word ASC LIMIT %d" % (bibwordsX, escape_string(p), n) res = run_sql(query) if res:
browsed_phrases_above[row[0]] = 1 if len(t) != 6 or t[-1:]=='%': query = "SELECT bx.value FROM %s AS bx WHERE bx.value>'%s' AND bx.tag LIKE '%s%%' ORDER BY bx.value ASC LIMIT %d" \ % (bx, escape_string(p), t, n_below) else: query = "SELECT bx.value FROM %s AS bx WHERE bx.value>'%s' AND bx.tag='%s' ORDER BY bx.value AS...
def create_nearest_terms_box(urlargs, p, f, n=5, prologue="<blockquote>", epilogue="</blockquote>"): """Return text box containing list of 'n' nearest terms above/below 'p' in the words index list for the field 'f'. Propose new searches according to `urlargs' with the new words. """ out = "" # deduce into which bibword...
nearest_words.append(row[0]) if nearest_words: out += """<table class="nearesttermsbox" cellpadding="0" cellspacing="0" border="0">""" for word in nearest_words: if word == p: if get_word_nbhits(word, f) > 0: out += """<tr> <td class="nearesttermsboxbodyselected" align="right">%d</td> <td class="nearesttermsboxbodysel...
browsed_phrases_below[row[0]] = 1 l1 = browsed_phrases_above.keys() l1.sort() l1.reverse() l1 = l1[:n_above] l1.reverse() l2 = browsed_phrases_below.keys() l2.sort() out = [] for phrase in l1[:n_above]: out.append(phrase) out.append(p) for phrase in l2[:n_below]: out.append(phrase) return out
def create_nearest_terms_box(urlargs, p, f, n=5, prologue="<blockquote>", epilogue="</blockquote>"): """Return text box containing list of 'n' nearest terms above/below 'p' in the words index list for the field 'f'. Propose new searches according to `urlargs' with the new words. """ out = "" # deduce into which bibword...
def get_word_nbhits(word, f):
def get_nbhits_in_bibwords(word, f):
def get_word_nbhits(word, f): """Return number of hits for word 'word' inside words index for field 'f'.""" out = 0 # deduce into which bibwordsX table we will search: bibwordsX = "bibwords%d" % get_wordsindex_id("anyfield") if f: wordsindex_id = get_wordsindex_id(f) if wordsindex_id: bibwordsX = "bibwords%d" % wordsin...
def print_warning(req, msg, type='Tip', prologue='', epilogue='<br>'):
def print_warning(req, msg, type='', prologue='<br>', epilogue='<br>'):
def print_warning(req, msg, type='Tip', prologue='', epilogue='<br>'): "Prints warning message and flushes output." if req: req.write('%s<span class="quicknote">' % (prologue)) if type: req.write('<strong>%s:</strong> ' % type) req.write('%s</span>%s' % (msg, epilogue))
req.write('%s<span class="quicknote">' % (prologue))
req.write('\n%s<span class="quicknote">' % (prologue))
def print_warning(req, msg, type='Tip', prologue='', epilogue='<br>'): "Prints warning message and flushes output." if req: req.write('%s<span class="quicknote">' % (prologue)) if type: req.write('<strong>%s:</strong> ' % type) req.write('%s</span>%s' % (msg, epilogue))
req.write('<strong>%s:</strong> ' % type)
req.write('%s: ' % type)
def print_warning(req, msg, type='Tip', prologue='', epilogue='<br>'): "Prints warning message and flushes output." if req: req.write('%s<span class="quicknote">' % (prologue)) if type: req.write('<strong>%s:</strong> ' % type) req.write('%s</span>%s' % (msg, epilogue))
out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?id=%s">Detailed record</a></span>""" \
out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?recid=%s">Detailed record</a></span>""" \
def print_record(recID, format='hb', ot='', decompress=zlib.decompress): "Prints record 'recID' formatted accoding to 'format'." out = "" # sanity check: if not record_exists(recID): return out # print record opening tags, if needed: if format == "marcxml" or format == "oai_dc": out += " <record>\n" out += " <head...
out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?sysnb=%s">Detailed record</a></span>""" \
out += """<br><span class="moreinfo"><a class="moreinfo" href="%s/search.py?sysno=%s">Detailed record</a></span>""" \
def print_record(recID, format='hb', ot='', decompress=zlib.decompress): "Prints record 'recID' formatted accoding to 'format'." out = "" # sanity check: if not record_exists(recID): return out # print record opening tags, if needed: if format == "marcxml" or format == "oai_dc": out += " <record>\n" out += " <head...
id="-1", idb="-1", sysnb="", search="SEARCH",
recid="-1", recidb="-1", sysno="", id="-1", idb="-1", sysnb="", action="SEARCH",
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...
search = wash_url_argument(search, 'str')
action = wash_url_argument(action, 'str')
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 sysnb or id>0:
if sysno or recid>0:
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 sysnb: id = get_mysql_recid_from_aleph_sysno(sysnb)
if sysno: recid = get_mysql_recid_from_aleph_sysno(sysno)
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 record_exists(id): if idb<=id: idb=id+1 print_records(req, range(id,idb), -1, -9999, of, ot)
if record_exists(recid): if recidb<=recid: recidb=recid+1 print_records(req, range(recid,recidb), -1, -9999, of, ot)
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, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d, search),
p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d, action),
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, "Requested record does not seem to exist.", None, "<p>") elif search == "Browse":
print_warning(req, "Requested record does not seem to exist.") elif action == "Browse":
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 exact match found, trying similar queries...", "", "<p>","<p>")
print_warning(req, "No exact match found, trying similar queries...")
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 exact match found, trying <em>%s</em>..." % pn, "", "<p>","<p>")
print_warning(req, "No exact match found, trying <em>%s</em>..." % pn)
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 exact match found, trying similar queries...", "", "<p>","<p>") req.write("<p>")
print_warning(req, "No exact match found, trying similar queries...")
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...
req.write(create_footer())
req.write(pagefooteronly())
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...
plist[u'\u00A8 ?a'] = u'\u00E4' plist[u'\u00A8 ?e'] = u'\u00EB' plist[u'\u00A8 ?i'] = u'\u00EF' plist[u'\u00A8 ?o'] = u'\u00F6' plist[u'\u00A8 ?u'] = u'\u00FC' plist[u'\u00A8 ?y'] = u'\u00FF' plist[u'\u00A8 ?A'] = u'\u00C4' plist[u'\u00A8 ?E'] = u'\u00CB' plist[u'\u00A8 ?I'] = u'\u00CF' plist[u'\u00A8 ?O'] = u'\u00D6' ...
plist[u'\u00A8 a'] = u'\u00E4' plist[u'\u00A8 e'] = u'\u00EB' plist[u'\u00A8 i'] = u'\u00EF' plist[u'\u00A8 o'] = u'\u00F6' plist[u'\u00A8 u'] = u'\u00FC' plist[u'\u00A8 y'] = u'\u00FF' plist[u'\u00A8 A'] = u'\u00C4' plist[u'\u00A8 E'] = u'\u00CB' plist[u'\u00A8 I'] = u'\u00CF' plist[u'\u00A8 O'] = u'\u00D6' plist[u'\u...
def _addMusicNotation(ptnlist): """Add all musical notation items to remove from document""" # Musical Notation Scoping musicNotation = [u"\U0001D173",u"\U0001D174",u"\U0001D175",u"\U0001D176",u"\U0001D177",u"\U0001D178",u"\U0001D179",u"\U0001D17A"] for itm in musicNotation: ptnlist[itm] = u""
plist[u'\u00B4 ?a'] = u'\u00E1' plist[u'\u00B4 ?e'] = u'\u00E9' plist[u'\u00B4 ?i'] = u'\u00ED' plist[u'\u00B4 ?o'] = u'\u00F3' plist[u'\u00B4 ?u'] = u'\u00FA' plist[u'\u00B4 ?y'] = u'\u00FD' plist[u'\u00B4 ?A'] = u'\u00C1' plist[u'\u00B4 ?E'] = u'\u00C9' plist[u'\u00B4 ?I'] = u'\u00CD' plist[u'\u00B4 ?O'] = u'\u00D3' ...
plist[u'\x13 a'] = u'\u00E1' plist[u'\x13 e'] = u'\u00E9' plist[u'\x13 i'] = u'\u00ED' plist[u'\x13 o'] = u'\u00F3' plist[u'\x13 u'] = u'\u00FA' plist[u'\x13 y'] = u'\u00FD' plist[u'\x13 A'] = u'\u00C1' plist[u'\x13 E'] = u'\u00C9' plist[u'\x13 I'] = u'\u00CD' plist[u'\x13 O'] = ...
def _addMusicNotation(ptnlist): """Add all musical notation items to remove from document""" # Musical Notation Scoping musicNotation = [u"\U0001D173",u"\U0001D174",u"\U0001D175",u"\U0001D176",u"\U0001D177",u"\U0001D178",u"\U0001D179",u"\U0001D17A"] for itm in musicNotation: ptnlist[itm] = u""
plist[u'\u0060 ?a'] = u'\u00E0' plist[u'\u0060 ?e'] = u'\u00E8' plist[u'\u0060 ?i'] = u'\u00EC' plist[u'\u0060 ?o'] = u'\u00F2' plist[u'\u0060 ?u'] = u'\u00F9' plist[u'\u0060 ?A'] = u'\u00C0' plist[u'\u0060 ?E'] = u'\u00C8' plist[u'\u0060 ?I'] = u'\u00CC' plist[u'\u0060 ?O'] = u'\u00D2' plist[u'\u0060 ?U'] = u'\u00D9'
plist[u'\u0060 a'] = u'\u00E0' plist[u'\u0060 e'] = u'\u00E8' plist[u'\u0060 i'] = u'\u00EC' plist[u'\u0060 o'] = u'\u00F2' plist[u'\u0060 u'] = u'\u00F9' plist[u'\u0060 A'] = u'\u00C0' plist[u'\u0060 E'] = u'\u00C8' plist[u'\u0060 I'] = u'\u00CC' plist[u'\u0060 O'] = u'\u00D2' plist[u'\u0060 U'] = u'\u00D9' plist[u'\u...
def _addMusicNotation(ptnlist): """Add all musical notation items to remove from document""" # Musical Notation Scoping musicNotation = [u"\U0001D173",u"\U0001D174",u"\U0001D175",u"\U0001D176",u"\U0001D177",u"\U0001D178",u"\U0001D179",u"\U0001D17A"] for itm in musicNotation: ptnlist[itm] = u""
text="<TEXTAREA name=\"%s\" rows=%s cols=%s>%s</TEXTAREA>" % (arr[3],arr3[5],arr3[6],arr3[8])
text="<TEXTAREA name=\"%s\" rows=%s cols=%s>%s</TEXTAREA>" % (arr[3],arr3[5],arr3[6],val)
def interface(req,c=cdsname,ln=cdslang, doctype="", act="", startPg=1, indir="", access="",mainmenu="",fromdir="",file="",nextPg="",nbPg="",curpage=1): ln = wash_language(ln) sys.stdout = req # get user ID: try: uid = getUid(req) uid_email = get_email(uid) except MySQLdb.Error, e: return errorMsg(e.value,req) # variabl...
text="<INPUT name=\"%s\" size=%s value=\"%s\">" % (arr[3],arr3[4],arr3[8])
text="<INPUT name=\"%s\" size=%s value=\"%s\">" % (arr[3],arr3[4],val)
def interface(req,c=cdsname,ln=cdslang, doctype="", act="", startPg=1, indir="", access="",mainmenu="",fromdir="",file="",nextPg="",nbPg="",curpage=1): ln = wash_language(ln) sys.stdout = req # get user ID: try: uid = getUid(req) uid_email = get_email(uid) except MySQLdb.Error, e: return errorMsg(e.value,req) # variabl...
text="<INPUT type=\"hidden\" name=\"%s\" value=\"%s\">" % (arr[3],arr3[8])
text="<INPUT type=\"hidden\" name=\"%s\" value=\"%s\">" % (arr[3],val)
def interface(req,c=cdsname,ln=cdslang, doctype="", act="", startPg=1, indir="", access="",mainmenu="",fromdir="",file="",nextPg="",nbPg="",curpage=1): ln = wash_language(ln) sys.stdout = req # get user ID: try: uid = getUid(req) uid_email = get_email(uid) except MySQLdb.Error, e: return errorMsg(e.value,req) # variabl...
xmltext = "%s%s" % (xmltext,field_xml_output(field[1],field[0]))
xmltext += str(field_xml_output(field[1],field[0]))
def record_xml_output(rec): """generates the XML for record 'rec' and returns it as a string""" xmltext = "<record>\n" if rec: # add the tag 'tag' to each field in rec[tag] fields=[] for tag in rec.keys(): for field in rec[tag]: fields.append((tag,field)) record_order_fields(fields) for field in fields: xmltext = "%s%s...
result[0] = (results_similar_recIDs, results_similar_relevances)
result = ((results_similar_recIDs, results_similar_relevances),result[1],result[2], result[3])
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...
result[0] = (None, None)
result = ((None, None),result[1],result[2], result[3])
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...
(starting_time, self.tablename[len("idxWORD"):-1],))
(starting_time, self.tablename[-3:-1],))
def update_last_updated(self, starting_time=None): """Update last_updated column of the index table in the database. Puts starting time there so that if the task was interrupted for record download, the records will be reindexed next time.""" if starting_time is None: return None if options["verbose"] >= 9: write_messa...
id = self.tablename[len("bibindex"):]
id = self.tablename[-3:-1]
def add_date(self, date): # If date is not set, then retrieve it from the database. # Reindex all formats newer than the modification date if not date: id = self.tablename[len("bibindex"):] query = """SELECT last_updated FROM idxINDEX WHERE id='%s' """ % id res = run_sql(query) if not res: return if not res[0][0]: date...
journal = cgi.escape(journal) volume = cgi.escape(volume) year = cgi.escape(year) number = cgi.escape(number) pages = cgi.escape(pages)
def format(bfo): """ Displays inline publication information with html link to ejournal (when available). """ out = '' publication_info = bfo.field('909C4') if publication_info == "": return "" journal_source = publication_info.get('p') journal = bfo.kb('ejournals', journal_source) volume = publication_info.get('v'...
raise OSError("Directory structure %s altered during processing: permissions changed during processing" % (dirlist))
raise OSError("Directory structure %s altered during processing: permissions changed during processing" % (dir_list))
def provide_dir_with_perms_then_exec(dir, function, perms, barrier_dir): # This function won't allow you to alter the root directories' # permissions: if your going to be changing the permissions on # your root directory, you probably need to do it more carefully # than with a python function! # sanitize path: dir = o...
f = lambda (dir, perms): os.chmod(dir, perms) map(f, dirlist)
return [os.chmod(dir, perms) for dir, perms in dirlist]
def _safely_chmod_dirlist(dirlist): f = lambda (dir, perms): os.chmod(dir, perms) map(f, dirlist)
pi = opfts[i][1] if pi == '*': print_warning(req, "Ignoring standalone wildcard word.", "Warning") del opfts[i]
try: pi = opfts[i][1] if pi == '*': print_warning(req, "Ignoring standalone wildcard word.", "Warning") del opfts[i] if pi == '': fi = opfts[i][2] if fi: print_warning(req, "Ignoring empty <em>%s</em> field term." % fi, "Warning") del opfts[i] except: pass
def create_basic_search_units(req, p, f, m=None): """Splits search pattern and search field into a list of independently searchable units. - A search unit consists of '(operand, pattern, field, type, hitset)' tuples where 'operand' is set union (|), set intersection (+) or set exclusion (-); 'pattern' is either a word ...
(2,msg_may[ln]), (6,msg_june[ln]), (7,msg_july[ln]), (8,msg_august[ln]), \
(5,msg_may[ln]), (6,msg_june[ln]), (7,msg_july[ln]), (8,msg_august[ln]), \
def create_inputdate_box(name="d1", selected_year=0, selected_month=0, selected_day=0, ln=cdslang): "Produces 'From Date', 'Until Date' kind of selection box. Suitable for search options." box = "" # day box += """<select name="%sd">""" % name box += """<option value="">%s""" % msg_any_day[ln] for day in range(1,32): ...
if record_had_field(rec, tag):
if record_has_field(rec, tag):
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: if record_had_field(rec, tag): for possible_field_instance in rec[tag]: if possible_field_i...
if not bingo: val = string.join(vals)
if not bingo: val = sort_pattern + " " + string.join(vals)
def sort_records(req, recIDs, sort_field='', sort_order='d', sort_pattern='', verbose=0): """Sort records in 'recIDs' list according sort field 'sort_field' in order 'sort_order'. If more than one instance of 'sort_field' is found for a given record, try to choose that that is given by 'sort pattern', for example "sort...
params = {}
params = {'c':'', 'p1':'', 'f1':'', 'm1':'', 'p2':'', 'f2':'', 'm2':'', 'p3':'', 'f3':'', 'm3':''}
def parse_set_definition(set_definition): """ Returns the parameters for the given set definition The returned structure is a dictionary with keys being c, p1, f1, m1, p2, f2, m2, p3, f3, m3 and corresponding values @param set_definition a string as returned by the database for column 'setDefinition' @return a dictio...
if options['tag'] is None:
if options['tag'] is None or options['tag'] == tag:
def delete_tags_to_correct(record, rec_old): """Delete the tags which are existing in both records""" # Browse through all the tags from the marc file for tag in record.keys(): # Do we have to delete only a special tag or all? if options['tag'] is None: # See if these tags exist in the old record if rec_old.has_key(tag...
write_message(" Delete tag: "+tag+" ind1= "+rec_old[tag][0][1]+" ind2= "+rec_old[tag][0][2], verbose=9) record_delete_field(rec_old, tag, rec_old[tag][0][1], rec_old[tag][0][2]) else: if rec_old.has_key(tag) and options['tag'] == tag: write_message(" Delete tag: "+tag+" ind1= "+rec_old[tag][0][1]+" ind2= "+r...
for dummy_sf_vals, ind1, ind2, dummy_cf, dummy_field_number in record[tag]: write_message(" Delete tag: " + tag + " ind1=" + ind1 + " ind2=" + ind2, verbose=9) record_delete_field(rec_old, tag, ind1, ind2)
def delete_tags_to_correct(record, rec_old): """Delete the tags which are existing in both records""" # Browse through all the tags from the marc file for tag in record.keys(): # Do we have to delete only a special tag or all? if options['tag'] is None: # See if these tags exist in the old record if rec_old.has_key(tag...
sre_phrase = sre.compile("(?s)<[^>]*>|&
sre_html = sre.compile("(?s)<[^>]*>|&
def write_message(msg, stream=sys.stdout): """Write message and flush output stream (may be sys.stdout or sys.stderr).""" if stream == sys.stdout or stream == sys.stderr: stream.write(time.strftime("%Y-%m-%d %H:%M:%S --> ", time.localtime())) stream.write("%s\n" % msg) stream.flush() else: sys.stderr.write("Unknown str...
phrase = sre_compile.sub(' ', phrase)
phrase = sre_html.sub(' ', phrase)
def get_words_from_phrase(phrase, split=string.split): "Returns list of words from phrase 'phrase'." words = {} # chars_punctuation and chars_alphanumericseparators from config if cfg_remove_html_code and string.find(phrase, "</") > -1: #Most likely html, remove html code phrase = sre_compile.sub(' ', phrase) phrase ...
""" % (id, id == int(fldID) and 'selected="selected"' or '', fld_dict[id])
""" % (id, '', fld_dict[id])
def perform_addexistingfield(colID, ln=cdslang, fldID=-1, fldvID=-1, fmeth='', callback='yes', confirm=-1): """form to add an existing field to a collection. colID - the collection to add the field to fldID - the field to add sel_ln - the language of the field""" subtitle = """<a name="6.2"></a><a name="7.2"></a><a na...
move += """<a href="%s/admin/websearch/websearchadmin.py/switchfldvaluescore?colID=%s&amp;ln=%s&amp;id_1=%s&amp;id_2=%s&amp;fmeth=soo&amp;rand=%s
move += """<a href="%s/admin/websearch/websearchadmin.py/switchfldscore?colID=%s&amp;ln=%s&amp;id_1=%s&amp;id_2=%s&amp;fmeth=soo&amp;rand=%s
def perform_showsortoptions(colID, ln=cdslang, callback='yes', content='', confirm=-1): """show the sort fields of this collection..""" colID = int(colID) col_dict = dict(get_def_name('', "collection")) fld_dict = dict(get_def_name('', "field")) fld_type = get_sort_nametypes() subtitle = """<a name="8">8. Modify sort...
if res: v_score = int(res[0][0]) else: v_score = 0
def add_col_fld(colID, fldID, type, fldvID=''): """Add a sort/search/field to the collection. colID - the id of the collection involved fldID - the id of the field. fldvID - the id of the fieldvalue. type - which type, seo, sew... score - the score of the format, decides sorting, if not given, place the format on top""...
v_score = 0
def add_col_fld(colID, fldID, type, fldvID=''): """Add a sort/search/field to the collection. colID - the id of the collection involved fldID - the id of the field. fldvID - the id of the fieldvalue. type - which type, seo, sew... score - the score of the format, decides sorting, if not given, place the format on top""...
res = run_sql("INSERT INTO collection_field_fieldvalue(id_field, id_fieldvalue, id_collection, type, score, score_fieldvalue) values (%s,%s,%s,'%s',%s,%s)" % (fldID, fldvID, colID, type, score, (v_score + 1)))
run_sql("UPDATE collection_field_fieldvalue SET score_fieldvalue=score_fieldvalue+1 WHERE id_field=%s AND id_collection=%s and type='%s'" % (fldID, colID, type)) res = run_sql("INSERT INTO collection_field_fieldvalue(id_field, id_fieldvalue, id_collection, type, score, score_fieldvalue) values (%s,%s,%s,'%s',%s,%s)" % ...
def add_col_fld(colID, fldID, type, fldvID=''): """Add a sort/search/field to the collection. colID - the id of the collection involved fldID - the id of the field. fldvID - the id of the fieldvalue. type - which type, seo, sew... score - the score of the format, decides sorting, if not given, place the format on top""...
return (0, (0,"Already exists"))
return (0, (1, "Already exists"))
def add_col_fld(colID, fldID, type, fldvID=''): """Add a sort/search/field to the collection. colID - the id of the collection involved fldID - the id of the field. fldvID - the id of the fieldvalue. type - which type, seo, sew... score - the score of the format, decides sorting, if not given, place the format on top""...
raise StandardError res = run_sql("SELECT score FROM collection_field_fieldvalue WHERE id_collection=%s AND type='%s' ORDER BY score desc" % (colID, type)) if res: score = int(res[0][0])
return (0, (1, "Already exists"))
def add_col_fld(colID, fldID, type, fldvID=''): """Add a sort/search/field to the collection. colID - the id of the collection involved fldID - the id of the field. fldvID - the id of the fieldvalue. type - which type, seo, sew... score - the score of the format, decides sorting, if not given, place the format on top""...
score = 0 res = run_sql("INSERT INTO collection_field_fieldvalue(id_field, id_collection, type, score,score_fieldvalue) values (%s,%s,'%s',%s, 0)" % (fldID, colID, type, (score + 1)))
run_sql("UPDATE collection_field_fieldvalue SET score=score+1") res = run_sql("INSERT INTO collection_field_fieldvalue(id_field, id_collection, type, score,score_fieldvalue) values (%s,%s,'%s',%s, 0)" % (fldID, colID, type, 1))
def add_col_fld(colID, fldID, type, fldvID=''): """Add a sort/search/field to the collection. colID - the id of the collection involved fldID - the id of the field. fldvID - the id of the fieldvalue. type - which type, seo, sew... score - the score of the format, decides sorting, if not given, place the format on top""...
except StandardError, e:
except Exception, e:
def modify_pbx(colID, pbxID, sel_ln, score='', position='', title='', body=''): """Modify a portalbox colID - the id of the collection involved pbxID - the id of the portalbox that should be modified sel_ln - the language of the portalbox that should be modified title - the title body - the content score - if several p...
res = run_sql("UPDATE collection_field_fieldvalue SET score=%s WHERE id_collection=%s and id_field=%s" % (res2[0][0], colID, id_1)) res = run_sql("UPDATE collection_field_fieldvalue SET score=%s WHERE id_collection=%s and id_field=%s" % (res1[0][0], colID, id_2))
if res1[0][0] == res2[0][0]: return (0, (1, "Both fields got the same score")) else: res = run_sql("UPDATE collection_field_fieldvalue SET score=%s WHERE id_collection=%s and id_field=%s" % (res2[0][0], colID, id_1)) res = run_sql("UPDATE collection_field_fieldvalue SET score=%s WHERE id_collection=%s and id_field=%s" ...
def switch_fld_score(colID, id_1, id_2): """Switch the scores of id_1 and id_2 in collection_field_fieldvalue colID - collection the id_1 or id_2 is connected to id_1/id_2 - id field from tables like format..portalbox... table - name of the table""" try: res1 = run_sql("SELECT score FROM collection_field_fieldvalue WH...
res = run_sql("UPDATE collection_field_fieldvalue SET score_fieldvalue=%s WHERE id_collection=%s and id_field=%s and id_fieldvalue=%s" % (res2[0][0], colID, id_1, fldvID_1)) res = run_sql("UPDATE collection_field_fieldvalue SET score_fieldvalue=%s WHERE id_collection=%s and id_field=%s and id_fieldvalue=%s" % (res1[0][...
if res1[0][0] == res2[0][0]: return (0, (1, "Both fields got the same score")) else: res = run_sql("UPDATE collection_field_fieldvalue SET score_fieldvalue=%s WHERE id_collection=%s and id_field=%s and id_fieldvalue=%s" % (res2[0][0], colID, id_1, fldvID_1)) res = run_sql("UPDATE collection_field_fieldvalue SET score_f...
def switch_fld_value_score(colID, id_1, fldvID_1, fldvID_2): """Switch the scores of two field_value colID - collection the id_1 or id_2 is connected to id_1/id_2 - id field from tables like format..portalbox... table - name of the table""" try: res1 = run_sql("SELECT score_fieldvalue FROM collection_field_fieldvalue ...
except StandardError, e:
except Exception, e:
def switch_fld_value_score(colID, id_1, fldvID_1, fldvID_2): """Switch the scores of two field_value colID - collection the id_1 or id_2 is connected to id_1/id_2 - id field from tables like format..portalbox... table - name of the table""" try: res1 = run_sql("SELECT score_fieldvalue FROM collection_field_fieldvalue ...
except StandardError, e:
except Exception, e:
def switch_pbx_score(colID, id_1, id_2, sel_ln): """Switch the scores of id_1 and id_2 in the table given by the argument. colID - collection the id_1 or id_2 is connected to id_1/id_2 - id field from tables like format..portalbox... table - name of the table""" try: res1 = run_sql("SELECT score FROM collection_portal...
y_axe.append(key_value[1]) max_tmp = max(y_axe)
y_axe.append(key_value[1]) max_tmp = 0 if y_axe: max_tmp = max(y_axe)
def write_coordinates_in_tmp_file(lists_coordinates): """write the graph coordinates in a temporary file for reading it later by the create_temporary_image method lists_coordinates is a list of list of this form: [[(1,3),(2,4),(3,5)],[(1,5),(2,5),(3,6)] This file is organized into one or more sets of 2 columns. Each se...
ordup = str(int(ordup)+1)
def order_items(uid, id_basket,idup,ordup,iddown,orddown): #check that the user which is changing the basket name is the owner of it if not is_basket_owner( uid, id_basket ): raise NotBasketOwner("You are not the owner of this basket") # move up the item ordup = str(int(ordup)+1) query_result = run_sql("UPDATE basket_r...
(ordup,id_basket,idup)) orddown = str(int(orddown)-1)
(orddown,id_basket,idup))
def order_items(uid, id_basket,idup,ordup,iddown,orddown): #check that the user which is changing the basket name is the owner of it if not is_basket_owner( uid, id_basket ): raise NotBasketOwner("You are not the owner of this basket") # move up the item ordup = str(int(ordup)+1) query_result = run_sql("UPDATE basket_r...
(orddown,id_basket,iddown))
(ordup,id_basket,iddown))
def order_items(uid, id_basket,idup,ordup,iddown,orddown): #check that the user which is changing the basket name is the owner of it if not is_basket_owner( uid, id_basket ): raise NotBasketOwner("You are not the owner of this basket") # move up the item ordup = str(int(ordup)+1) query_result = run_sql("UPDATE basket_r...
num = _('%i results found') % num
num = _('%s results found') % num
def print_results(req, lang, pagegetter, infos, current_time): """Print results of a given search engine.""" _ = gettext_set_language(lang) url = infos[0] engine = infos[1] results = engine.parser.parse_and_get_results(pagegetter.data) num = format_number(engine.parser.parse_num_results()) html2 = _("Time : %2.3f") %...
, "","&gt;","", "&gt; Search Results</small></small></td></tr></table>",0), \
, "","&gt;","", "&gt; Search Results</td></tr></table><br>",0), \
def create_header(cc=cdsname, as=0, headeradd=""): "Creates CDS header and info on URL and date." return """
def create_inputdate_box(title="From date", name="d1", selected_year="", selected_month="", selected_day=""):
def create_inputdate_box(name="d1", selected_year="", selected_month="", selected_day=""):
def create_inputdate_box(title="From date", name="d1", selected_year="", selected_month="", selected_day=""): "Produces 'From Date', 'Until Date' kind of selection box. Suitable for search options." box = "" box += "<small><strong>%s:</strong></small><br>" % title # day box += """<select name="%sd">""" % name box += "...
box += "<small><strong>%s:</strong></small><br>" % title
def create_inputdate_box(title="From date", name="d1", selected_year="", selected_month="", selected_day=""): "Produces 'From Date', 'Until Date' kind of selection box. Suitable for search options." box = "" box += "<small><strong>%s:</strong></small><br>" % title # day box += """<select name="%sd">""" % name box += "...
out += """<table align="right"><tr><td>%s</td></tr></table>""" % create_google_box(p, f, p1, p2, p3) out += "<table>"
out += create_google_box(p, f, p1, p2, p3)
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...
cell_1_left = "<small><strong>Search for:</strong></small><br>" + create_matchtype_box('m1', m1) + \
cell_1_left = create_matchtype_box('m1', m1) + \
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...
cell_1_right = "<small><strong>within:</strong></small><br>%s" % create_searchwithin_selection_box('f1', f1)
cell_1_right = create_searchwithin_selection_box('f1', f1)
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...
cell_1_farright = ""
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...
cell_2_farright = ""
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...
cell_3_moreright = """<input type="submit" name="search" value="SEARCH"><input type="submit" name="search" value="Browse">&nbsp;""" cell_3_farright = """<small class="light"><a href="%s/search.py?p=%s&amp;f=%s&amp;cc=%s">Simple&nbsp;Search</a></small> <br><small><a href="%s/help/search/tips.html">Search&nbsp;Tips</a></...
cell_3_moreright = """<input class="formbutton" type="submit" name="search" value="SEARCH"><input class="formbutton" type="submit" name="search" value="Browse">&nbsp;""" cell_4 = """<small><a href="%s/help/search/tips.html">search&nbsp;tips</a> :: <a href="%s/search.py?p=%s&amp;f=%s&amp;cc=%s">simple&nbsp;search</a></s...
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...
<tr> <td valign="top" nowrap> <table> <tr valign="bottom"> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> </tr> <tr valign="bottom"> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> </tr> <tr valign="bottom"> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> </tr> </table> </td> </tr>""" % \ (cell_1_left, cell_1_right, c...
<table class="searchbox"> <thead> <tr> <th colspan="3" class="searchboxheader"> Search for: </th> </tr> </thead> <tbody> <tr valign="bottom"> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> </tr> <tr valign="bottom"> <td class="searchboxbody">%s</td> <td class="sear...
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...
cell_1_left = """<small><strong>Search for:</strong></small> <br><input type="text" name="p" size="%d" value="%s">""" % \
cell_1_left = """<input type="text" name="p" size="%d" value="%s">""" % \
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...
cell_1_middle = "<small><strong>within:</strong></small><br>%s" % create_searchwithin_selection_box('f', f) cell_1_right = """<input type="submit" name="search" value="SEARCH"><input type="submit" name="search" value="Browse">&nbsp;""" cell_1_farright = """<small class="light"><a href="%s/search.py?p1=%s&amp;f1=%s&amp;...
cell_1_middle = create_searchwithin_selection_box('f', f) cell_1_right = """<input class="formbutton" type="submit" name="search" value="SEARCH"><input class="formbutton" type="submit" name="search" value="Browse">&nbsp;""" cell_2 = """<small><a href="%s/help/search/tips.html">search&nbsp;tips</a> :: <a href="%s/search...
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...
<tr> <td valign="top" nowrap> <table> <tr valign="bottom"> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> </tr> </table> </td> </tr> """ % (cell_1_left, cell_1_middle, cell_1_right, cell_1_farright)
<table class="searchbox"> <thead> <tr> <th colspan="3" class="searchboxheader"> Search for: </th> </tr> </thead> <tbody> <tr valign="bottom"> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> <td class="searchboxbody">%s</td> </tr> <tr valign="bottom"> <td colspan="3" align="right" class="searchboxbod...
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...
<tr> <td valign="top"> <small><strong>Search collections:</strong></small><br>"""
<table class="searchbox"> <thead> <tr> <th colspan="3" class="searchboxheader"> Search collections: </th> </tr> </thead> <tbody> <tr valign="bottom"> <td valign="top" class="searchboxbody">"""
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...
</tr>"""
</tr> </tbody> </table>"""
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...
cell_6_a = create_inputdate_box("Added since", "d1", d1y, d1m, d1d) cell_6_b = create_inputdate_box("until", "d2", d2y, d2m, d2d) out += """<table cellpadding="3" cellspacing="0">
cell_6_a = create_inputdate_box("d1", d1y, d1m, d1d) cell_6_b = create_inputdate_box("d2", d2y, d2m, d2d) out += """<table class="searchbox"> <thead>
def create_search_box(cc, colls, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d): "Create search box for 'search again in the results page' functionality." out = "" # print search box prolog: out += """ <form action="%s/search.py" method="get"> <strong c...