Skip to content

Commit

Permalink
Included authors in nowReading output
Browse files Browse the repository at this point in the history
  • Loading branch information
katydecorah committed Dec 16, 2023
1 parent 86d12a8 commit cbe3107
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ inputs:
description: The width of the thumbnail image (for books sourced from Google Books). The default size is 128.
outputs:
nowReading:
description: "When a new book is started this output will contain an object with the book's: title, description, thumbnail, and isbn."
description: "When a new book is started this output will contain an object with the book's: title, description, thumbnail, authors, and isbn."
8 changes: 7 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35666,7 +35666,13 @@ async function read() {
library.push(newBook);
(0,core.exportVariable)(`BookTitle`, newBook.title);
if (bookStatus === "started") {
(0,core.setOutput)("nowReading", newBook);
(0,core.setOutput)("nowReading", {
title: newBook.title,
authors: newBook.authors,
description: newBook.description,
isbn: newBook.isbn,
thumbnail: newBook.thumbnail,
});
}
if (newBook.thumbnail) {
(0,core.exportVariable)(`BookThumbOutput`, `book-${newBook.isbn}.png`);
Expand Down
3 changes: 3 additions & 0 deletions src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ describe("index", () => {
[
"nowReading",
{
"authors": [
"Raven Leilani",
],
"description": "NEW YORK TIMES BESTSELLER Winner of the 2020 Center for Fiction First Novel Prize Winner of the 2020 National Book Critics Circle's John Leonard Prize for Best First Book Winner of the 2020 Kirkus Prize for Fiction Winner of the 2021 Dylan Thomas Prize Finalist for the 2021 PEN/Hemingway Award for Best First Novel Longlisted for the 2021 Andrew Carnegie Medal for Excellence in Fiction Longlisted for the 2021 PEN/Jean Stein Book Award Longlisted for the 2021 Women's Prize for Fiction A New York Times Notable Book of the Year Named Best Book of the Year by O: the Oprah Magazine, Vanity Fair, Los Angeles Times, Town and Country, Amazon, Indigo, NPR, Harper’s Bazaar, Kirkus Reviews, Marie Claire, Good Housekeeping Sharp, comic, disruptive, and tender, Luster sees a young Black woman fall into art and someone else's open marriage. Edie is stumbling her way through her twenties—sharing a subpar apartment in Bushwick, clocking in and out of her admin job, making a series of inappropriate sexual choices. She's also, secretly, haltingly, figuring her way into life as an artist. And then she meets Eric, a digital archivist with a family in New Jersey, including an autopsist wife who has agreed to an open marriage—with rules. As if navigating the constantly shifting landscapes of contemporary sexual manners and racial politics weren't hard enough, Edie finds herself unemployed and falling into Eric's family life, his home. She becomes a hesitant friend to his wife and a de facto role model to his adopted daughter. Edie is the only Black woman who young Akila knows. Razor-sharp, darkly comic, sexually charged, socially disruptive, Luster is a portrait of a young woman trying to make sense of her life in a tumultuous era. It is also a haunting, aching description of how hard it is to believe in your own talent and the unexpected influences that bring us into ourselves along the way.",
"isbn": "9780385696005",
"thumbnail": "https://books.google.com/books/content?id=NFeTEAAAQBAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api",
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export async function read() {
if (bookStatus === "started") {
setOutput("nowReading", {
title: newBook.title,
authors: newBook.authors,
description: newBook.description,
isbn: newBook.isbn,
thumbnail: newBook.thumbnail,
Expand Down

0 comments on commit cbe3107

Please sign in to comment.