fix statistics cmd; count papers w/ tag, not w/o

main
beuerle 5 years ago committed by Fabien C. Y. Benureau
parent 3209f35bd1
commit 54facc4085
No known key found for this signature in database
GPG Key ID: C3FB5E831A249A9A

@ -22,7 +22,7 @@ def command(conf, args):
else: else:
doc_count = sum([0 if p.docpath is None else 1 for p in papers]) doc_count = sum([0 if p.docpath is None else 1 for p in papers])
tag_count = len(list(rp.get_tags())) tag_count = len(list(rp.get_tags()))
papers_with_tags = sum([0 if p.tags else 1 for p in papers]) papers_with_tags = sum([1 if p.tags else 0 for p in papers])
ui.message(color.dye_out('Repository statistics:', 'bold')) ui.message(color.dye_out('Repository statistics:', 'bold'))
ui.message('Total papers: {}, {} ({}) have a document attached'.format( ui.message('Total papers: {}, {} ({}) have a document attached'.format(

Loading…
Cancel
Save