[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/calibre f0324a9d21 06/10: Move calibre-parse-timestamp
|
From: |
ELPA Syncer |
|
Subject: |
[elpa] externals/calibre f0324a9d21 06/10: Move calibre-parse-timestamp to calibre-db |
|
Date: |
Thu, 18 May 2023 12:57:32 -0400 (EDT) |
branch: externals/calibre
commit f0324a9d21cd512bba26f06d73b367581e14e26c
Author: Kjartan Óli Ágústsson <kjartanoli@disroot.org>
Commit: Kjartan Óli Ágústsson <kjartanoli@disroot.org>
Move calibre-parse-timestamp to calibre-db
* calibre-book.el (calibre-parse-timestamp): Rename to
calibredb--parse-timestamp.
* calibre-db.el (calibre-db--parse-timestamp): Rename from
calibre-parse-timestamp.
(calibre-db--make-book): Call calibre-db--parse-timestamp.
---
calibre-book.el | 4 ----
calibre-db.el | 11 ++++++++---
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/calibre-book.el b/calibre-book.el
index 4746e6890a..c83885fbba 100644
--- a/calibre-book.el
+++ b/calibre-book.el
@@ -28,10 +28,6 @@
(require 'eieio)
(require 'parse-time)
-(defun calibre-parse-timestamp (timestamp)
- "Return a Lisp timestamp from TIMESTAMP.
-TIMESTAMP is a string of the form YYYY-MM-DD HH:MM:SS.xxxxxx+00:00."
- (parse-iso8601-time-string (string-replace " " "T" timestamp)))
(defclass calibre-book ()
((id :initarg :id
diff --git a/calibre-db.el b/calibre-db.el
index 26ba2d1809..d5b76c720d 100644
--- a/calibre-db.el
+++ b/calibre-db.el
@@ -28,6 +28,11 @@
(require 'calibre-book)
(require 'calibre-util)
+(defun calibre-db--parse-timestamp (timestamp)
+ "Return a Lisp timestamp from TIMESTAMP.
+TIMESTAMP is a string of the form YYYY-MM-DD HH:MM:SS.xxxxxx+00:00."
+ (parse-iso8601-time-string (string-replace " " "T" timestamp)))
+
(defun calibre-db--make-book (entry)
"Create a `calibre-book' from ENTRY.
ENTRY is a list of the form:
@@ -39,13 +44,13 @@ ENTRY is a list of the form:
:publisher (calibre-db--get-book-publisher id)
:series series
:series-index series-index
- :timestamp (calibre-parse-timestamp timestamp)
- :pubdate (calibre-parse-timestamp pubdate)
- :last-modified (calibre-parse-timestamp last-modified)
:tags (calibre-db--get-book-tags id)
:formats (calibre-db--get-book-formats id)
:path path
:file-name (calibre-db--get-book-file-name id))))
+ :timestamp (calibre-db--parse-timestamp timestamp)
+ :pubdate (calibre-db--parse-timestamp pubdate)
+ :last-modified (calibre-db--parse-timestamp
last-modified)
(defun calibre-db--get-book-authors (id)
"Return a list of authors for the book identified by ID."
- [elpa] externals/calibre updated (e283a2c928 -> ba5fa17e31), ELPA Syncer, 2023/05/18
- [elpa] externals/calibre f0324a9d21 06/10: Move calibre-parse-timestamp to calibre-db,
ELPA Syncer <=
- [elpa] externals/calibre b237fd2e5e 05/10: Allow searching by title, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 512b5a1197 02/10: Add mode line indicator when updating library, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre c07fa7d0f3 04/10: Require exact matching in calibre-cli search, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre cc66ec42bf 08/10: Remove seemingly unnecessary require, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre c6d0201342 09/10: Capture calibredb output, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 47ae488aed 07/10: Drop EIEIO in favor of custom editing solution, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre ba5fa17e31 10/10: Update copyright headers, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre 524ce0353e 01/10: Fix docstring, ELPA Syncer, 2023/05/18
- [elpa] externals/calibre f096edd1d3 03/10: Return list instead of list of lists, ELPA Syncer, 2023/05/18