diff --git a/papis_extract/formatter.py b/papis_extract/formatter.py index 76c977b..986d691 100644 --- a/papis_extract/formatter.py +++ b/papis_extract/formatter.py @@ -66,10 +66,10 @@ def format_count( count += 1 return ( + f"{count} " f"{document.get('author', '')}" - f"{' - ' if 'author' in document else ''}" # only put separator if author - f"{document.get('title', '')}: " - f"{count}\n" + f"{': ' if 'author' in document else ''}" # only put separator if author + f"{document.get('title', '')}" ).rstrip() diff --git a/tests/test_formatting.py b/tests/test_formatting.py index 5b805a7..b018041 100644 --- a/tests/test_formatting.py +++ b/tests/test_formatting.py @@ -48,7 +48,7 @@ def test_markdown_setext(): def test_count_default(): fmt = format_count - assert fmt(document, annotations) == ("""document-author - document-title: 2""") + assert fmt(document, annotations) == ("""2 document-author: document-title""") def test_csv_default():