コード例 #1
0
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)
コード例 #2
0
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
コード例 #3
0
ファイル: api_calls.py プロジェクト: OrenBochman/montysolr
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
コード例 #4
0
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
コード例 #5
0
 def test_xml(self):
     from invenio.search_engine_summarizer import summarize_records
     summarize_records(intbitset(range(1, 100)), 'xcs', 'en')
コード例 #6
0
 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')
 def test_extended(self):
     from invenio.search_engine_summarizer import summarize_records
     summarize_records(intbitset(range(1, 100)), 'hcs2', 'en')