♻️ refactor booklog
Signed-off-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
parent
98bc1ba1c9
commit
51095476d6
2 changed files with 332 additions and 289 deletions
|
@ -1,444 +1,483 @@
|
||||||
[
|
{
|
||||||
|
"name": "Sid's Biblioteca",
|
||||||
|
"url": "https://kjelsrud.dev/",
|
||||||
|
"bio": "A collection of books I've read with some ratings aswell.",
|
||||||
|
"lists":[
|
||||||
{
|
{
|
||||||
"isbn": "9788822651518",
|
"name": "Currently reading",
|
||||||
"title": "One Piece: Vol.108",
|
"url": "https://kjelsrud.dev/logs/books/",
|
||||||
"date":
|
"books":[
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"title": "The Intelligent Investor (NO)",
|
||||||
"month": "05",
|
"isbn": 9788271463823,
|
||||||
"day": "19",
|
"author": "Benjamin Graham"
|
||||||
"string": "2024-05-19"
|
}
|
||||||
},
|
]
|
||||||
"my_rating": 5,
|
|
||||||
"author": "Eiichiro Oda"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"isbn": "9781974749799",
|
"name": "On the shelf",
|
||||||
"title": "One Piece: Vol.107",
|
"url": "https://kjelsrud.dev/logs/books/",
|
||||||
"date":
|
"books":[
|
||||||
|
{
|
||||||
|
"title": "Dune",
|
||||||
|
"isbn": 9780340960196,
|
||||||
|
"author": "Frank Herbert"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "The Summit of The Gods: Vol.3 - Vol.5"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Star Wars: The Tales of Kenobi"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Read",
|
||||||
|
"url": "https://kjelsrud.dev/logs/books/",
|
||||||
|
"books":[
|
||||||
|
{
|
||||||
|
"title": "One Piece: Vol.108",
|
||||||
|
"isbn": 9788822651518,
|
||||||
|
"author": "Eiichiro Oda",
|
||||||
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "19",
|
"day": "19",
|
||||||
"string": "2024-05-19"
|
"string": "2024-05-19"
|
||||||
},
|
},
|
||||||
"my_rating": 5,
|
"rating": 5
|
||||||
"author": "Eiichiro Oda"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "One Piece: Vol.107",
|
||||||
"isbn": "9781591161844",
|
"isbn": 9781974749799,
|
||||||
"title": "One Piece: Vol.3",
|
"author": "Eiichiro Oda",
|
||||||
"date":
|
"date":
|
||||||
|
{
|
||||||
|
"year": "2024",
|
||||||
|
"month": "05",
|
||||||
|
"day": "19",
|
||||||
|
"string": "2024-05-19"
|
||||||
|
},
|
||||||
|
"rating": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "One Piece: Vol.3",
|
||||||
|
"isbn": 9781591161844,
|
||||||
|
"author": "Eiichiro Oda",
|
||||||
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "12",
|
"day": "12",
|
||||||
"string": "2024-05-12"
|
"string": "2024-05-12"
|
||||||
},
|
},
|
||||||
"my_rating": 3,
|
"rating": 3
|
||||||
"author": "Eiichiro Oda"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Maskiner som tenker",
|
||||||
"isbn": "9788248932505",
|
"isbn": 9788248932505,
|
||||||
"title": "Maskiner som tenker",
|
"author": "Inga Strümke",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "11",
|
"day": "11",
|
||||||
"string": "2024-05-11"
|
"string": "2024-05-11"
|
||||||
},
|
},
|
||||||
"my_rating": 5,
|
"rating": 5
|
||||||
"author": "Inga Strümke"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Hi Score Girl 10",
|
||||||
"isbn": "9781646090259",
|
"isbn": 9781646090259,
|
||||||
"title": "Hi Score Girl 10",
|
"author": "Rensuke Oshikiri",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "10",
|
"day": "10",
|
||||||
"string": "2024-05-10"
|
"string": "2024-05-10"
|
||||||
},
|
},
|
||||||
"my_rating": 5,
|
"rating": 5
|
||||||
"author": "Rensuke Oshikiri"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Hi Score Girl 09",
|
||||||
"isbn": "9781646090242",
|
"isbn": 9781646090242,
|
||||||
"title": "Hi Score Girl 09",
|
"author": "Rensuke Oshikiri",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "10",
|
"day": "10",
|
||||||
"string": "2024-05-10"
|
"string": "2024-05-10"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "Rensuke Oshikiri"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Hi Score Girl 08",
|
||||||
"isbn": "9781646090235",
|
"isbn": 9781646090235,
|
||||||
"title": "Hi Score Girl 08",
|
"author": "Rensuke Oshikiri",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "10",
|
"day": "10",
|
||||||
"string": "2024-05-10"
|
"string": "2024-05-10"
|
||||||
},
|
},
|
||||||
"my_rating": 5,
|
"rating": 5
|
||||||
"author": "Rensuke Oshikiri"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Hi Score Girl 07",
|
||||||
"isbn": "9781646090228",
|
"isbn": 9781646090228,
|
||||||
"title": "Hi Score Girl 07",
|
"author": "Rensuke Oshikiri",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "10",
|
"day": "10",
|
||||||
"string": "2024-05-10"
|
"string": "2024-05-10"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "Rensuke Oshikiri"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "YOU HAVE TOO MUCH SHIT",
|
||||||
"isbn": "",
|
"isbn": null,
|
||||||
"title": "YOU HAVE TOO MUCH SHIT",
|
"author": "Chris Thomas",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "07",
|
"day": "07",
|
||||||
"string": "2024-05-07"
|
"string": "2024-05-07"
|
||||||
},
|
},
|
||||||
"my_rating": 3,
|
"rating": 3
|
||||||
"author": "Chris Thomas"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Hi Score Girl 06",
|
||||||
"isbn": "9781646090211",
|
"isbn": 9781646090211,
|
||||||
"title": "Hi Score Girl 06",
|
"author": "Rensuke Oshikiri",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "06",
|
"day": "06",
|
||||||
"string": "2024-05-06"
|
"string": "2024-05-06"
|
||||||
},
|
},
|
||||||
"my_rating": 5,
|
"rating": 5
|
||||||
"author": "Rensuke Oshikiri"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Hi Score Girl 05",
|
||||||
"isbn": "9781646090204",
|
"isbn": 9781646090204,
|
||||||
"title": "Hi Score Girl 05",
|
"author": "Rensuke Oshikiri",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "06",
|
"day": "06",
|
||||||
"string": "2024-05-06"
|
"string": "2024-05-06"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "Rensuke Oshikiri"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Hi Score Girl 04",
|
||||||
"isbn": "9781646090198",
|
"isbn": 9781646090198,
|
||||||
"title": "Hi Score Girl 04",
|
"author": "Rensuke Oshikiri",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "04",
|
"month": "04",
|
||||||
"day": "29",
|
"day": "29",
|
||||||
"string": "2024-04-29"
|
"string": "2024-04-29"
|
||||||
},
|
},
|
||||||
"my_rating": 3,
|
"rating": 3
|
||||||
"author": "Rensuke Oshikiri"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Hi Score Girl 03",
|
||||||
"isbn": "9781646090181",
|
"isbn": 9781646090181,
|
||||||
"title": "Hi Score Girl 03",
|
"author": "Rensuke Oshikiri",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "04",
|
"month": "04",
|
||||||
"day": "29",
|
"day": "29",
|
||||||
"string": "2024-04-29"
|
"string": "2024-04-29"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "Rensuke Oshikiri"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Hi Score Girl 02",
|
||||||
"isbn": "9781646090174",
|
"isbn": 9781646090174,
|
||||||
"title": "Hi Score Girl 02",
|
"author": "Rensuke Oshikiri",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "04",
|
"month": "04",
|
||||||
"day": "08",
|
"day": "08",
|
||||||
"string": "2024-04-08"
|
"string": "2024-04-08"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "Rensuke Oshikiri"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Hi Score Girl 01",
|
||||||
"isbn": "9781646090167",
|
"isbn": 9781646090167,
|
||||||
"title": "Hi Score Girl 01",
|
"author": "Rensuke Oshikiri",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "04",
|
"month": "04",
|
||||||
"day": "08",
|
"day": "08",
|
||||||
"string": "2024-04-08"
|
"string": "2024-04-08"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "Rensuke Oshikiri"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Neon Genesis Evangelion: Vol. 1",
|
||||||
"isbn": "9781421550794",
|
"isbn": 9781421550794,
|
||||||
"title": "Neon Genesis Evangelion: Vol. 1",
|
"author": "Yoshiyuki Sadamoto",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "04",
|
"month": "04",
|
||||||
"day": "01",
|
"day": "01",
|
||||||
"string": "2024-04-01"
|
"string": "2024-04-01"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "Yoshiyuki Sadamoto"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Invisible Women: Exposing Data Bias in a World Designed for Men",
|
||||||
"isbn": "9781784706289",
|
"isbn": 9781784706289,
|
||||||
"title": "Invisible Women: Exposing Data Bias in a World Designed for Men",
|
"author": "Caroline Criado Perez",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "03",
|
"month": "03",
|
||||||
"day": "18",
|
"day": "18",
|
||||||
"string": "2024-03-18"
|
"string": "2024-03-18"
|
||||||
},
|
},
|
||||||
"my_rating": 5,
|
"rating": 5
|
||||||
"author": "Caroline Criado Perez"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "One Piece: Vol.2",
|
||||||
"isbn": "9780575078697",
|
"isbn": 9780575078697,
|
||||||
"title": "One Piece: Vol.2",
|
"author": "Eiichiro Oda",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "03",
|
"month": "03",
|
||||||
"day": "08",
|
"day": "08",
|
||||||
"string": "2024-03-08"
|
"string": "2024-03-08"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "Eiichiro Oda"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "One Piece: Vol.1",
|
||||||
"isbn": "9781569319017",
|
"isbn": 9781569319017,
|
||||||
"title": "One Piece: Vol.1",
|
"author": "Eiichiro Oda",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "03",
|
"month": "03",
|
||||||
"day": "06",
|
"day": "06",
|
||||||
"string": "2024-03-06"
|
"string": "2024-03-06"
|
||||||
},
|
},
|
||||||
"my_rating": 5,
|
"rating": 5
|
||||||
"author": "Eiichiro Oda"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Permanent Record",
|
||||||
"isbn": "9781529035667",
|
"isbn": 9781529035667,
|
||||||
"title": "Permanent Record",
|
"author": "Edward Snowden",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "02",
|
"month": "02",
|
||||||
"day": "19",
|
"day": "19",
|
||||||
"string": "2024-02-19"
|
"string": "2024-02-19"
|
||||||
},
|
},
|
||||||
"my_rating": 5,
|
"rating": 5
|
||||||
"author": "Edward Snowden"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "The Summit of the Gods: Vol.2",
|
||||||
"isbn": "9788492444328",
|
"isbn": 9788492444328,
|
||||||
"title": "The Summit of the Gods: Vol.2",
|
"author": "Jiro Taniguchi, Yumemakura Baku",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "01",
|
"month": "01",
|
||||||
"day": "23",
|
"day": "23",
|
||||||
"string": "2024-01-23"
|
"string": "2024-01-23"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "Jiro Taniguchi, Yumemakura Baku"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Multiverses: An anthology of alternate realities",
|
||||||
"isbn": "9781803362328",
|
"isbn": 9781803362328,
|
||||||
"title": "Multiverses: An anthology of alternate realities",
|
"author": "Preston Grassmann, Alix Harrow, Ken Liu, Alastair Reynolds, Clive Barker",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "01",
|
"month": "01",
|
||||||
"day": "22",
|
"day": "22",
|
||||||
"string": "2024-01-22"
|
"string": "2024-01-22"
|
||||||
},
|
},
|
||||||
"my_rating": 3,
|
"rating": 3
|
||||||
"author": "Preston Grassmann, Alix Harrow, Ken Liu, Alastair Reynolds, Clive Barker"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Lacero",
|
||||||
"isbn": "",
|
"isbn": null,
|
||||||
"title": "Lacero",
|
"author": "Andy Weir",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2024",
|
"year": "2024",
|
||||||
"month": "01",
|
"month": "01",
|
||||||
"day": "08",
|
"day": "08",
|
||||||
"string": "2024-01-08"
|
"string": "2024-01-08"
|
||||||
},
|
},
|
||||||
"my_rating": 5,
|
"rating": 5
|
||||||
"author": "Andy Weir"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "The Summit of the Gods: Vol.1",
|
||||||
"isbn": "9788496427877",
|
"isbn": 9788496427877,
|
||||||
"title": "The Summit of the Gods: Vol.1",
|
"author": "Jiro Taniguchi, Yumemakura Baku",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2023",
|
"year": "2023",
|
||||||
"month": "12",
|
"month": "12",
|
||||||
"day": "29",
|
"day": "29",
|
||||||
"string": "2023-12-29"
|
"string": "2023-12-29"
|
||||||
},
|
},
|
||||||
"my_rating": 5,
|
"rating": 5
|
||||||
"author": "Jiro Taniguchi, Yumemakura Baku"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "A Promised Land",
|
||||||
"isbn": "9788202662721",
|
"isbn": 9788202662721,
|
||||||
"title": "A Promised Land",
|
"author": "Barack Obama",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2023",
|
"year": "2023",
|
||||||
"month": "12",
|
"month": "12",
|
||||||
"day": "28",
|
"day": "28",
|
||||||
"string": "2023-12-28"
|
"string": "2023-12-28"
|
||||||
},
|
},
|
||||||
"my_rating": 3,
|
"rating": 3
|
||||||
"author": "Barack Obama"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Mob Psycho 100: Vol. 9",
|
||||||
"isbn": "9781506727615",
|
"isbn": 9781506727615,
|
||||||
"title": "Mob Psycho 100: Vol. 9",
|
"author": "ONE",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2023",
|
"year": "2023",
|
||||||
"month": "12",
|
"month": "12",
|
||||||
"day": "12",
|
"day": "12",
|
||||||
"string": "2023-12-12"
|
"string": "2023-12-12"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "ONE"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Mob Psycho 100: Vol. 8",
|
||||||
"isbn": "9781506727608",
|
"isbn": 9781506727608,
|
||||||
"title": "Mob Psycho 100: Vol. 8",
|
"author": "ONE",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2023",
|
"year": "2023",
|
||||||
"month": "11",
|
"month": "11",
|
||||||
"day": "30",
|
"day": "30",
|
||||||
"string": "2023-11-30"
|
"string": "2023-11-30"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "ONE"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "The Art of War",
|
||||||
"isbn": "9780140455526",
|
"isbn": 9780140455526,
|
||||||
"title": "The Art of War",
|
"author": "Sun-tzu",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2023",
|
"year": "2023",
|
||||||
"month": "07",
|
"month": "07",
|
||||||
"day": "12",
|
"day": "12",
|
||||||
"string": "2023-07-12"
|
"string": "2023-07-12"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "Sun-tzu"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Mob Psycho 100: Vol. 7",
|
||||||
"isbn": "9781506727592",
|
"isbn": 9781506727592,
|
||||||
"title": "Mob Psycho 100: Vol. 7",
|
"author": "ONE",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2023",
|
"year": "2023",
|
||||||
"month": "06",
|
"month": "06",
|
||||||
"day": "16",
|
"day": "16",
|
||||||
"string": "2023-06-16"
|
"string": "2023-06-16"
|
||||||
},
|
},
|
||||||
"my_rating": 3,
|
"rating": 3
|
||||||
"author": "ONE"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Will Artificial Intelligence Outsmart Us?",
|
||||||
"isbn": "9781529392401",
|
"isbn": 9781529392401,
|
||||||
"title": "Will Artificial Intelligence Outsmart Us?",
|
"author": "Stephen Hawking",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2023",
|
"year": "2023",
|
||||||
"month": "06",
|
"month": "06",
|
||||||
"day": "13",
|
"day": "13",
|
||||||
"string": "2023-06-13"
|
"string": "2023-06-13"
|
||||||
},
|
},
|
||||||
"my_rating": 3,
|
"rating": 3
|
||||||
"author": "Stephen Hawking"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Magnus",
|
||||||
"isbn": "9788269259346",
|
"isbn": 9788269259346,
|
||||||
"title": "Magnus",
|
"author": "Magnus Midtbø, Thor Gotaas",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2023",
|
"year": "2023",
|
||||||
"month": "06",
|
"month": "06",
|
||||||
"day": "01",
|
"day": "01",
|
||||||
"string": "2023-06-01"
|
"string": "2023-06-01"
|
||||||
},
|
},
|
||||||
"my_rating": 5,
|
"rating": 5
|
||||||
"author": "Magnus Midtbø, Thor Gotaas"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Hjertet i to: Seks måneder med Karpe",
|
||||||
"isbn": "9788234713538",
|
"isbn": 9788234713538,
|
||||||
"title": "Hjertet i to: Seks måneder med Karpe",
|
"author": "Yohan Shanmugaratnam",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2023",
|
"year": "2023",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "28",
|
"day": "28",
|
||||||
"string": "2023-05-28"
|
"string": "2023-05-28"
|
||||||
},
|
},
|
||||||
"my_rating": 5,
|
"rating": 5
|
||||||
"author": "Yohan Shanmugaratnam"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "JoJo's Bizarre Adventure: Phantom Blood Vol. 1",
|
||||||
"isbn": "9781421578798",
|
"isbn": 9781421578798,
|
||||||
"title": "JoJo's Bizarre Adventure: Phantom Blood Vol. 1",
|
"author": "Araki, Hirohiko",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2023",
|
"year": "2023",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "22",
|
"day": "22",
|
||||||
"string": "2023-05-22"
|
"string": "2023-05-22"
|
||||||
},
|
},
|
||||||
"my_rating": 3,
|
"rating": 3
|
||||||
"author": "Araki, Hirohiko"
|
},
|
||||||
},
|
{
|
||||||
{
|
"title": "Steve Jobs",
|
||||||
"isbn": "9788202410445",
|
"isbn": 9788202410445,
|
||||||
"title": "Steve Jobs",
|
"author": "Walter Isaacson",
|
||||||
"date":
|
"date":
|
||||||
{
|
{
|
||||||
"year": "2023",
|
"year": "2023",
|
||||||
"month": "05",
|
"month": "05",
|
||||||
"day": "15",
|
"day": "15",
|
||||||
"string": "2023-05-15"
|
"string": "2023-05-15"
|
||||||
},
|
},
|
||||||
"my_rating": 4,
|
"rating": 4
|
||||||
"author": "Walter Isaacson"
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
}
|
|
@ -1,8 +1,26 @@
|
||||||
---
|
---
|
||||||
import SectionContainer from '../../components/SectionContainer.astro';
|
import SectionContainer from '../../components/SectionContainer.astro';
|
||||||
import books from '../../data/biblioteca.json'
|
import biblioteca from '../../data/biblioteca.json'
|
||||||
|
|
||||||
const booksByYear = books.reduce((acc:any, book) => {
|
let booksRead = [];
|
||||||
|
let booksShelf = [];
|
||||||
|
let booksReading = [];
|
||||||
|
|
||||||
|
biblioteca.lists.forEach(list => {
|
||||||
|
switch (list.name) {
|
||||||
|
case "Read":
|
||||||
|
booksRead = list.books;
|
||||||
|
break;
|
||||||
|
case "On the shelf":
|
||||||
|
booksShelf = list.books;
|
||||||
|
break;
|
||||||
|
case "Currently reading":
|
||||||
|
booksReading = list.books;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const booksByYear = booksRead.reduce((acc, book) => {
|
||||||
const year = new Date(book.date.string).getFullYear();
|
const year = new Date(book.date.string).getFullYear();
|
||||||
if (!acc[year]) {
|
if (!acc[year]) {
|
||||||
acc[year] = [];
|
acc[year] = [];
|
||||||
|
@ -11,52 +29,38 @@ const booksByYear = books.reduce((acc:any, book) => {
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
||||||
const sortedYears = Object.keys(booksByYear).sort((a:any, b:any) => b - a);
|
const sortedYears = Object.keys(booksByYear).sort((a: any, b: any) => b - a);
|
||||||
|
|
||||||
/*
|
|
||||||
function getEmojiStars(rating:any) {
|
|
||||||
let stars = '';
|
|
||||||
for (let i = 0; i < rating; i++) {
|
|
||||||
stars += '⭐';
|
|
||||||
}
|
|
||||||
return stars;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
function getHeartEmoji(rating:any) {
|
|
||||||
let heart = '';
|
|
||||||
if (rating == 5) heart = "❤️";
|
|
||||||
return heart;
|
|
||||||
}
|
|
||||||
|
|
||||||
const today = new Date();
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
<main class="flex flex-col gap-4 mt-4">
|
<main class="flex flex-col flex-1 gap-4 mt-4">
|
||||||
<h1 class="text-3xl font-extrabold">📚 ¿Dónde está la biblioteca?</h1>
|
<h1 class="text-3xl font-extrabold">📚 ¿Dónde está la biblioteca?</h1>
|
||||||
<h2 class="text-xl font-semibold">on the shelf</h2>
|
<h2 class="text-xl font-semibold">on the shelf</h2>
|
||||||
<ul class="flex flex-col text-s gap-2 text-l">
|
<ul class="flex flex-col text-s gap-2 text-l">
|
||||||
<li class="borderbottom">📚 Dune</li>
|
{booksShelf.map((book) => (
|
||||||
<li class="borderbottom">📚 The Summit of The Gods: Vol.3 - Vol.5</li>
|
<li class="borderbottom">📚 {book.title}</li>
|
||||||
<li class="borderbottom">📚 Star Wars: The Tales of Kenobi</li>
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
<h2 class="text-xl font-semibold">on the nightstand</h2>
|
|
||||||
<p class="borderbottom">📖 The Intelligent Investor (NO)</p>
|
<h2 class="text-xl font-semibold">on the nightstand</h2>
|
||||||
{sortedYears.map(year => (
|
<ul>
|
||||||
<section>
|
{booksReading.map((book) => (
|
||||||
<div class="flex items-center gap-2 text-xl font-semibold mb-2">{year}<p class="text-xs">({booksByYear[year].length} entries)</p></div>
|
<li class="borderbottom">📖 {book.title}</li>
|
||||||
<ul>
|
))}
|
||||||
{
|
</ul>
|
||||||
booksByYear[year].map((book) => (
|
|
||||||
<div class="flex justify-between mb-2 break-words gap-2 borderbottom">
|
{sortedYears.map(year => (
|
||||||
<p class="text-s">{book.title}</p>
|
<details>
|
||||||
<p>{getHeartEmoji(book.my_rating)}</p>
|
<summary class="text-xl font-semibold cursor-pointer">{year} <span class="text-xs">({booksByYear[year].length} entries)</span></summary>
|
||||||
</div>
|
<ul class="mt-2">
|
||||||
))
|
{booksByYear[year].map((book) => (
|
||||||
}
|
<div class="flex justify-between mb-2 break-words gap-2 borderbottom">
|
||||||
|
<p class="text-s">{book.title}</p>
|
||||||
|
<p>{book.rating === 5 ? "❤️" : ""}</p>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</details>
|
||||||
))
|
))}
|
||||||
}
|
</main>
|
||||||
</main>
|
|
||||||
</SectionContainer>
|
</SectionContainer>
|
||||||
|
|
Loading…
Add table
Reference in a new issue