Exemplo n.º 1
0
def render_citation(p):
    """
    generates a (hopefull unique) citation string for a publication
    that will fit in a dropdown
    """
    import publication_tools
    return publication_tools.make_citation(p.author_list,p.publication_year)
Exemplo n.º 2
0
def status_tool():
    """
    Entry point to the publication status tools;
    lists the current publications by citation and reports status
    the view provides buttons to invoke check_update and update_dois
    """
    import publication_tools
    publications = db().select(db.publication.ALL,
                               orderby=db.publication.author_list)
    result = []
    for pub in publications:
        issues = publication_tools.issues_list(pub, db)
        if issues:
            pub_cit = publication_tools.make_citation(pub.author_list,
                                                      pub.publication_year)
            for issue in issues:
                pub_item = (pub_cit, issues, pub.id)
                result.append(pub_item)
    return {"report": result}