mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-18 03:58:32 +02:00
Add added option to _print_edited_summary
This commit is contained in:
parent
b4ccf44d3a
commit
d57e60f76a
1 changed files with 6 additions and 1 deletions
|
@ -275,13 +275,18 @@ def _edit_search_results(config, journal, old_entries, **kwargs):
|
|||
|
||||
def _print_edited_summary(journal, old_stats, **kwargs):
|
||||
stats = {
|
||||
"added": len(journal) - old_stats["count"],
|
||||
"deleted": old_stats["count"] - len(journal),
|
||||
"modified": len([e for e in journal.entries if e.modified]),
|
||||
}
|
||||
|
||||
prompts = []
|
||||
|
||||
if stats["deleted"]:
|
||||
if stats["added"] > 0:
|
||||
prompts.append(f"{stats['added']} {_pluralize_entry(stats['added'])} added")
|
||||
stats["modified"] -= stats["added"]
|
||||
|
||||
if stats["deleted"] > 0:
|
||||
prompts.append(
|
||||
f"{stats['deleted']} {_pluralize_entry(stats['deleted'])} deleted"
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue