Skip to content

Commit

Permalink
Allow summary to take from and to
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceWarne committed Nov 19, 2023
1 parent c2b91c5 commit 9884bd2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions finito.el
Original file line number Diff line number Diff line change
Expand Up @@ -949,11 +949,16 @@ sPlease input a unique identifier (used in place of an isbn):")
finito-keyword-search-buffer-init-instance)))))))

;;;###autoload
(defun finito-summary ()
"Open a summary buffer of reading highlights in the past year."
(defun finito-summary (&optional from to)
"Open a summary buffer of reading highlights in the past year.
If either FROM or TO are specified, use these dates instead of the default of
the past year.
Example: `(let ((finito-montage-image-columns 16)) (finito-summary \"2021-01-01\" \"2099-01-01\"))'."
(interactive)
(-let (((from . to) (finito--get-summary-from-to)))
(finito-summary-in-period from to)))
(-let (((default-from . default-to) (finito--get-summary-from-to)))
(finito-summary-in-period (or from default-from) (or to default-to))))

;;;###autoload
(defun finito-summary-in-period (&optional from to)
Expand Down

0 comments on commit 9884bd2

Please sign in to comment.