Skip to content

Commit

Permalink
Merge branch 'main' into revert-remove-summary
Browse files Browse the repository at this point in the history
* main:
  Update dependencies (#184)
  • Loading branch information
katydecorah committed Dec 31, 2024
2 parents d8e039a + f84f461 commit f8a5af7
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 132 deletions.
24 changes: 24 additions & 0 deletions _data/read.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,5 +458,29 @@
"Fiction"
],
"format": "audiobook"
},
{
"identifier": "9781888363432",
"identifiers": {
"isbn": "9781888363432"
},
"dateAdded": "2024-12-31",
"status": "want to read",
"rating": "unrated",
"title": "I who have never known men",
"authors": [
"Jacqueline Harpman"
],
"publishedDate": "1997",
"description": "A work of fantasy, I Who Have Never Known Men is the haunting and unforgettable account of a near future on a barren earth where women are kept in underground cages guarded by uniformed groups of men. It is narrated by the youngest of the women, the only one with no memory of what the world was like before the cages, who must teach herself, without books or sexual contact, the essential human emotions of longing, loving, learning, companionship, and dying.",
"pageCount": 206,
"format": "book",
"categories": [
"Fiction, fantasy, general",
"New York Times reviewed"
],
"thumbnail": "https://covers.openlibrary.org/b/id/936140-L.jpg",
"language": "en",
"link": "https://openlibrary.org/books/OL998749M"
}
]
18 changes: 15 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48588,7 +48588,7 @@ function extractMetaTags(body, options) {
if (script.attribs.type && script.attribs.type === 'application/ld+json') {
if (!ogObject.jsonLD)
ogObject.jsonLD = [];
let scriptText = $(script).text();
let scriptText = $(script).text().trim();
if (scriptText) {
scriptText = scriptText.replace(/(\r\n|\n|\r)/gm, ''); // remove newlines
scriptText = (0, utils_1.unescapeScriptText)(scriptText);
Expand Down Expand Up @@ -118213,7 +118213,7 @@ var follow_redirects = __nccwpck_require__(1573);
// EXTERNAL MODULE: external "zlib"
var external_zlib_ = __nccwpck_require__(43106);
;// CONCATENATED MODULE: ./node_modules/axios/lib/env/data.js
const VERSION = "1.7.8";
const VERSION = "1.7.9";
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseProtocol.js


Expand Down Expand Up @@ -121385,7 +121385,7 @@ async function open_library_standardize(book, isbn) {
const standardBook = {
title: book.title,
authors,
description,
description: handleDescription(description),
pageCount: book.number_of_pages,
format: "book",
categories: subjects,
Expand All @@ -121403,6 +121403,18 @@ async function open_library_standardize(book, isbn) {
return standardBook;
}

/**
* Handles the description of the book.
* @param {string|object} description - The description of the book.
* @returns {string} - The processed description.
*/
function handleDescription(description) {
if (typeof description === "string") {
return description;
}
return description.value;
}

/**
* Retrieves the author names from OpenLibrary.
* @param {{key: string}[]} rawAuthors - List of author keys.
Expand Down
Loading

0 comments on commit f8a5af7

Please sign in to comment.