INNER CODE UNIT · Python

format_by_year

unrealcv/synthetic-computer-vision · src/gen-reference.py:48

def format_by_year(papers):
    # Format the reference list
    print '-' * 80
    years = list(set([int(article['year']) for article in papers]))
    print years
    years.sort(reverse = True)

    sections = []
    for year in years:
        rows = [format_as_md_row(paper) for paper in papers if int(paper['year']) == year]
        section_head = '## %d \n(Total=%d)' % (year, len(rows))
        sections.append('\n\n'.join([section_head] + rows))

    content = '\n'.join(sections)
    # print content
    return content

def load_paper_list(paper_list_file):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…