mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-20 04:58:32 +02:00
Rename -reminisce to -today-in-history
This commit is contained in:
parent
9342f12664
commit
04465e4758
4 changed files with 9 additions and 9 deletions
|
@ -285,12 +285,12 @@ Feature: Searching in a journal
|
|||
| basic_folder |
|
||||
| basic_dayone |
|
||||
|
||||
Scenario Outline: Reminiscing
|
||||
Scenario Outline: Searching today in history
|
||||
Given we use the config "<config>.yaml"
|
||||
And we use the password "test" if prompted
|
||||
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."
|
||||
And we run "jrnl -reminisce --short"
|
||||
And we run "jrnl -today-in-history --short"
|
||||
Then the output should be
|
||||
"""
|
||||
2019-08-31 01:01 Hi, from last year.
|
||||
|
|
|
@ -177,8 +177,8 @@ def parse_args(args=[]):
|
|||
"-on", dest="on_date", metavar="DATE", help="Show entries on this date"
|
||||
)
|
||||
reading.add_argument(
|
||||
"-reminisce",
|
||||
dest="reminisce",
|
||||
"-today-in-history",
|
||||
dest="today_in_history",
|
||||
action="store_true",
|
||||
help="Show entries of today over the years",
|
||||
)
|
||||
|
|
|
@ -78,7 +78,7 @@ def _is_write_mode(args, config, **kwargs):
|
|||
args.edit,
|
||||
args.export,
|
||||
args.end_date,
|
||||
args.reminisce,
|
||||
args.today_in_history,
|
||||
args.month,
|
||||
args.day,
|
||||
args.year,
|
||||
|
@ -211,7 +211,7 @@ def _search_journal(args, journal, **kwargs):
|
|||
if args.on_date:
|
||||
args.start_date = args.end_date = args.on_date
|
||||
|
||||
if args.reminisce:
|
||||
if args.today_in_history:
|
||||
now = time.parse("now")
|
||||
args.day = now.day
|
||||
args.month = now.month
|
||||
|
|
|
@ -18,7 +18,7 @@ def expected_args(**kwargs):
|
|||
"delete": False,
|
||||
"edit": False,
|
||||
"end_date": None,
|
||||
"reminisce": False,
|
||||
"today_in_history": False,
|
||||
"month": None,
|
||||
"day": None,
|
||||
"year": None,
|
||||
|
@ -168,8 +168,8 @@ def test_year_alone():
|
|||
assert cli_as_dict("-year 21") == expected_args(year="21")
|
||||
|
||||
|
||||
def test_reminisce_alone():
|
||||
assert cli_as_dict("-reminisce") == expected_args(reminisce=True)
|
||||
def test_today_in_history_alone():
|
||||
assert cli_as_dict("-today-in-history") == expected_args(today_in_history=True)
|
||||
|
||||
|
||||
def test_short_alone():
|
||||
|
|
Loading…
Add table
Reference in a new issue