diff --git a/dist/index.js b/dist/index.js index 5a8f6d1..2f8eee8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -50834,12 +50834,13 @@ function formatBooks({ bookKeyName, bookData, start, end }) { : []; const books = filterData(bookData, "dateFinished", start, end) .filter((book) => { var _a; return !((_a = book.tags) === null || _a === void 0 ? void 0 : _a.includes("hide")); }) - .map(({ title, authors, link, isbn, tags }) => { + .map(({ title, authors, link, isbn, tags, image }) => { tags = bookTags.length > 0 ? tags === null || tags === void 0 ? void 0 : tags.filter((tag) => bookTags.includes(tag)) : []; - return Object.assign({ title, authors: authors.join(", "), url: link, isbn }, ((tags === null || tags === void 0 ? void 0 : tags.length) && { tags })); + return Object.assign({ title, authors: authors.join(", "), url: link, image, + isbn }, ((tags === null || tags === void 0 ? void 0 : tags.length) && { tags })); }); return { bookYaml: dump({ [bookKeyName]: books }), diff --git a/src/format.ts b/src/format.ts index c9e31a2..5278ea4 100644 --- a/src/format.ts +++ b/src/format.ts @@ -16,7 +16,7 @@ export function formatBooks({ bookKeyName, bookData, start, end }) { const books: Book[] = filterData(bookData, "dateFinished", start, end) .filter((book) => !book.tags?.includes("hide")) - .map(({ title, authors, link, isbn, tags }) => { + .map(({ title, authors, link, isbn, tags, image }) => { tags = bookTags.length > 0 ? tags?.filter((tag) => bookTags.includes(tag)) @@ -25,6 +25,7 @@ export function formatBooks({ bookKeyName, bookData, start, end }) { title, authors: authors.join(", "), url: link, + image, isbn, ...(tags?.length && { tags }), };