|
|
@ -16,18 +16,22 @@ def command(conf, args):
|
|
|
|
papers = list(rp.all_papers())
|
|
|
|
papers = list(rp.all_papers())
|
|
|
|
|
|
|
|
|
|
|
|
paper_count = len(papers)
|
|
|
|
paper_count = len(papers)
|
|
|
|
doc_count = sum([0 if p.docpath is None else 1 for p in papers])
|
|
|
|
if paper_count == 0:
|
|
|
|
tag_count = len(list(rp.get_tags()))
|
|
|
|
ui.message('Your pubs repository is empty.')
|
|
|
|
papers_with_tags = sum([0 if p.tags else 1 for p in papers])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ui.message(color.dye_out('Repository statistics:', 'bold'))
|
|
|
|
else:
|
|
|
|
ui.message('Total papers: {}, {} ({}) have a document attached'.format(
|
|
|
|
doc_count = sum([0 if p.docpath is None else 1 for p in papers])
|
|
|
|
color.dye_out('{:d}'.format(paper_count), 'bgreen'),
|
|
|
|
tag_count = len(list(rp.get_tags()))
|
|
|
|
color.dye_out('{:d}'.format(doc_count), 'bold'),
|
|
|
|
papers_with_tags = sum([0 if p.tags else 1 for p in papers])
|
|
|
|
'{:.0f}%'.format(100. * doc_count / paper_count),
|
|
|
|
|
|
|
|
))
|
|
|
|
ui.message(color.dye_out('Repository statistics:', 'bold'))
|
|
|
|
ui.message('Total tags: {}, {} ({}) of papers have at least one tag'.format(
|
|
|
|
ui.message('Total papers: {}, {} ({}) have a document attached'.format(
|
|
|
|
color.dye_out('{:d}'.format(tag_count), 'bgreen'),
|
|
|
|
color.dye_out('{:d}'.format(paper_count), 'bgreen'),
|
|
|
|
color.dye_out('{:d}'.format(papers_with_tags), 'bold'),
|
|
|
|
color.dye_out('{:d}'.format(doc_count), 'bold'),
|
|
|
|
'{:.0f}%'.format(100. * papers_with_tags / paper_count),
|
|
|
|
'{:.0f}%'.format(100. * doc_count / paper_count),
|
|
|
|
))
|
|
|
|
))
|
|
|
|
|
|
|
|
ui.message('Total tags: {}, {} ({}) of papers have at least one tag'.format(
|
|
|
|
|
|
|
|
color.dye_out('{:d}'.format(tag_count), 'bgreen'),
|
|
|
|
|
|
|
|
color.dye_out('{:d}'.format(papers_with_tags), 'bold'),
|
|
|
|
|
|
|
|
'{:.0f}%'.format(100. * papers_with_tags / paper_count),
|
|
|
|
|
|
|
|
))
|
|
|
|