Ejemplo n.º 1
0
def return_bibTex_format_export(solr_data, include_abs, request_type='POST'):
    """

    :param include_abs:
    :return:
    """
    if (solr_data is not None):
        if ('error' in solr_data):
            return return_response({'error': 'unable to query solr'}, 400)
        bibTex_export = BibTexFormat(solr_data)
        return return_response(bibTex_export.get(include_abs=include_abs), 200,
                               request_type)
    return return_response({'error': 'no result from solr'}, 404)
Ejemplo n.º 2
0
def return_bibTex_format_export(solr_data,
                                include_abs,
                                keyformat,
                                maxauthor,
                                authorcutoff,
                                journalformat,
                                request_type='POST'):
    """

    :param include_abs:
    :return:
    """
    if (solr_data is not None):
        bibTex_export = BibTexFormat(solr_data, keyformat=keyformat)
        return return_response(
            bibTex_export.get(include_abs=include_abs,
                              maxauthor=maxauthor,
                              authorcutoff=authorcutoff,
                              journalformat=journalformat), 200, request_type)
    return return_response({'error': 'no result from solr'}, 404)