Rename -reminisce to -today-in-history

This commit is contained in:
karimpwnz 2021-01-10 23:41:38 +02:00
parent 9342f12664
commit 04465e4758
4 changed files with 9 additions and 9 deletions

View file

@ -285,12 +285,12 @@ Feature: Searching in a journal
| basic_folder | | basic_folder |
| basic_dayone | | basic_dayone |
Scenario Outline: Reminiscing Scenario Outline: Searching today in history
Given we use the config "<config>.yaml" Given we use the config "<config>.yaml"
And we use the password "test" if prompted And we use the password "test" if prompted
And we set current date and time to "2020-08-31 14:32" And we set current date and time to "2020-08-31 14:32"
When we run "jrnl 2019-08-31 01:01: Hi, from last year." When we run "jrnl 2019-08-31 01:01: Hi, from last year."
And we run "jrnl -reminisce --short" And we run "jrnl -today-in-history --short"
Then the output should be Then the output should be
""" """
2019-08-31 01:01 Hi, from last year. 2019-08-31 01:01 Hi, from last year.

View file

@ -177,8 +177,8 @@ def parse_args(args=[]):
"-on", dest="on_date", metavar="DATE", help="Show entries on this date" "-on", dest="on_date", metavar="DATE", help="Show entries on this date"
) )
reading.add_argument( reading.add_argument(
"-reminisce", "-today-in-history",
dest="reminisce", dest="today_in_history",
action="store_true", action="store_true",
help="Show entries of today over the years", help="Show entries of today over the years",
) )

View file

@ -78,7 +78,7 @@ def _is_write_mode(args, config, **kwargs):
args.edit, args.edit,
args.export, args.export,
args.end_date, args.end_date,
args.reminisce, args.today_in_history,
args.month, args.month,
args.day, args.day,
args.year, args.year,
@ -211,7 +211,7 @@ def _search_journal(args, journal, **kwargs):
if args.on_date: if args.on_date:
args.start_date = args.end_date = args.on_date args.start_date = args.end_date = args.on_date
if args.reminisce: if args.today_in_history:
now = time.parse("now") now = time.parse("now")
args.day = now.day args.day = now.day
args.month = now.month args.month = now.month

View file

@ -18,7 +18,7 @@ def expected_args(**kwargs):
"delete": False, "delete": False,
"edit": False, "edit": False,
"end_date": None, "end_date": None,
"reminisce": False, "today_in_history": False,
"month": None, "month": None,
"day": None, "day": None,
"year": None, "year": None,
@ -168,8 +168,8 @@ def test_year_alone():
assert cli_as_dict("-year 21") == expected_args(year="21") assert cli_as_dict("-year 21") == expected_args(year="21")
def test_reminisce_alone(): def test_today_in_history_alone():
assert cli_as_dict("-reminisce") == expected_args(reminisce=True) assert cli_as_dict("-today-in-history") == expected_args(today_in_history=True)
def test_short_alone(): def test_short_alone():