mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-02 06:56:12 +02:00
Add new -today-in-history
, -month
, -day
, and -year
search filters (#1145)
* Introduce -reminisce, -month, -day, and -year * Update expected_args in parse_args tests * Add check before creating compare_d * Misc changes * Implement testing for -month, -day, -year, and -reminisce * Compress tests into one Scenario Outline * Fix failing tests by updating dates_similar journal * Create 'we set current date and time to' step * Use time.parse in reminisce * Update dates_similar journal * Make 'Searching in a journal' test shorter * Lint * Implement reminiscing test * Add combination tests * Finalize tests * Finalize pytests * Simplify reminisce tests * Change reminsice help (since it also shows today's entries) * Re-do tests; use various tests * Remove old test data * Better scenario description * Standardize format for compare_d * Rename -reminisce to -today-in-history
This commit is contained in:
parent
18058c74e5
commit
f0e8fa2060
6 changed files with 184 additions and 0 deletions
24
jrnl/args.py
24
jrnl/args.py
|
@ -176,6 +176,30 @@ def parse_args(args=[]):
|
|||
reading.add_argument(
|
||||
"-on", dest="on_date", metavar="DATE", help="Show entries on this date"
|
||||
)
|
||||
reading.add_argument(
|
||||
"-today-in-history",
|
||||
dest="today_in_history",
|
||||
action="store_true",
|
||||
help="Show entries of today over the years",
|
||||
)
|
||||
reading.add_argument(
|
||||
"-month",
|
||||
dest="month",
|
||||
metavar="DATE",
|
||||
help="Show entries on this month of any year",
|
||||
)
|
||||
reading.add_argument(
|
||||
"-day",
|
||||
dest="day",
|
||||
metavar="DATE",
|
||||
help="Show entries on this day of any month",
|
||||
)
|
||||
reading.add_argument(
|
||||
"-year",
|
||||
dest="year",
|
||||
metavar="DATE",
|
||||
help="Show entries of a specific year",
|
||||
)
|
||||
reading.add_argument(
|
||||
"-from",
|
||||
dest="start_date",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue