def template_context_function(recids, *args, **kwargs): """ @see invenio.search_engine_summarizer:summarize_records """ from invenio.search_engine_summarizer import summarize_records return summarize_records( intbitset(recids) if not isinstance(recids, intbitset) else recids, *args, **kwargs)
def _get_summarize_records(pubs, tag, ln, rec_query, person_id): ''' Returns html for records summary given personid, tag and ln @param person_id: int person id @param tag: str kind of output @param ln: str language ''' html = summarize_records(intbitset(pubs), tag, ln, rec_query) return html
def citation_summary(recids, of, ln, p, f): out = ReqStringIO() x = search_engine_summarizer.summarize_records(recids, of, ln, p, f, out) if x: output = x else: out.seek(0) output = out.read() return output
def test_xml(self): from invenio.search_engine_summarizer import summarize_records summarize_records(intbitset(range(1, 100)), 'xcs', 'en')
def test_extended(self): from invenio.search_engine_summarizer import summarize_records summarize_records(intbitset(range(1, 100)), 'hcs2', 'en')