Skip to content

Commit

Permalink
Fix some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyanming committed Jul 7, 2024
1 parent a54c552 commit a38821e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion calibredb-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@


(defgroup calibredb nil
"calibredb group"
"Calibredb group."
:group 'calibredb)

(defcustom calibredb-db-dir nil
Expand Down
6 changes: 4 additions & 2 deletions calibredb-search.el
Original file line number Diff line number Diff line change
Expand Up @@ -781,8 +781,7 @@ ebook record will be shown.
(calibredb-search-update-buffer))

(defun calibredb-search-update-buffer (&optional page)
"Update the calibredb-search buffer listing to match the database.
When FORCE is non-nil, redraw even when the database hasn't changed."
"Update the calibredb-search buffer listing to match the database with PAGE."
(interactive)
(with-current-buffer (calibredb-search-buffer)
(let* ((inhibit-read-only t)
Expand Down Expand Up @@ -810,6 +809,7 @@ When FORCE is non-nil, redraw even when the database hasn't changed."
entries)))

(defun calibredb-search-more-data (page)
"Render candidates with PAGE."
(let ((inhibit-read-only t))
(setq calibredb-search-current-page page)
(beginning-of-line)
Expand All @@ -818,6 +818,7 @@ When FORCE is non-nil, redraw even when the database hasn't changed."


(defun calibredb-search-next-page ()
"Render next calibredb page."
(interactive)
(if (< calibredb-search-current-page calibredb-search-pages)
(progn
Expand All @@ -826,6 +827,7 @@ When FORCE is non-nil, redraw even when the database hasn't changed."
(message "Last page.")))

(defun calibredb-search-previous-page ()
"Render previous calibredb page."
(interactive)
(if (> calibredb-search-current-page 1)
(progn
Expand Down
8 changes: 5 additions & 3 deletions calibredb-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ Argument TITLE prompts to input the title.
Optional argument ISBN prompts to input the isbn."
(let* ((fetch-cover (cond ((string= calibredb-fetch-covers "yes") t)
((string= calibredb-fetch-covers "no") nil)
(t (yes-or-no-p "Fetch cover?: "))))
(t (yes-or-no-p "Fetch cover? "))))
(results (calibredb-fetch-metadata-from-sources author title ids isbn fetch-cover)))
(cond (results
(when fetch-cover (calibredb-select-and-set-cover))
Expand Down Expand Up @@ -947,7 +947,8 @@ With universal ARG \\[universal-argument] use title as initial value."

;; convert ebooks
(defmacro calibredb-convert (type)
"Macro of function calibredb-convert-to-TYPE."
"Macro of function calibredb-convert-to-TYPE.
Argument TYPE ebook type."
`(defun ,(intern (format "calibredb-convert-to-%s" type)) (&optional candidate)
,(format "TODO: Convert the slected CANDIDATE to %s." type)
(interactive)
Expand Down Expand Up @@ -1046,7 +1047,8 @@ With universal ARG \\[universal-argument] use title as initial value."
)))

(defmacro calibredb-all (field)
"Macro of function calibredb-all-FIELD."
"Macro of function calibredb-all-FIELD.
Argument FIELD table name in database."
`(defun ,(intern (format "calibredb-all-%s" field)) ()
,(format "Get all %s and return as a list." field)
(seq-uniq
Expand Down

0 comments on commit a38821e

Please sign in to comment.