mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 22:16:07 +01:00
Simplify books
This commit is contained in:
parent
9afb94536e
commit
02f5443a3e
28 changed files with 49 additions and 53 deletions
|
@ -4,8 +4,8 @@ emoji: 🎨
|
|||
summary: Making things look good for fun.
|
||||
---
|
||||
|
||||
{{< openlibrary "9781914236105" >}}
|
||||
{{< book "9781914236105" >}}
|
||||
|
||||
I love making things. Recently bought a mini book at the Tate in Liverpool called [Art is the thing nobody asked you to do](https://roughtradebooks.com/products/art-is-the-thing-nobody-asked-you-to-do-babak-ganjei), and without even picking it up I felt a connection with that description of art. I _do_ love creating things, but often its the unnecessary things, the expressive and intriguing ones, that I enjoy the most.
|
||||
I love making things. I recently bought a mini book at the Tate in Liverpool called [Art is the thing nobody asked you to do](https://roughtradebooks.com/products/art-is-the-thing-nobody-asked-you-to-do-babak-ganjei), and without even picking it up I felt a connection with that description of art. I _do_ love creating things, but often its the unnecessary things, the expressive and intriguing ones, that I enjoy the most.
|
||||
|
||||
I look forward to reading that book, and to this section of the memex growing quickly!
|
||||
|
|
|
@ -7,4 +7,4 @@ tags:
|
|||
|
||||
> \[They] flock, beckoned by adventure \[…] it calls to those who care more for living than for their lives.
|
||||
|
||||
From {{< openlibrary "9781534430990" false >}}.
|
||||
From {{< book "9781534430990" false >}}.
|
||||
|
|
|
@ -5,6 +5,6 @@ tags:
|
|||
- quote
|
||||
---
|
||||
|
||||
What a beautiful quote from {{< openlibrary "9781786699602" false >}}:
|
||||
What a beautiful quote from {{< book "9781786699602" false >}}:
|
||||
|
||||
> \[…] greeting even our dearest with abbreviations like ‘Good morning’ when the true thought in our breast is ‘Every day you step into my life, you make it brighter, and if you left the world, something in me would starve for you forever, as when some barrier rises to shade a plant, which still has light enough to grow some but will never again taste the unbroken sun.’
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
---
|
||||
date: "2011-01-20T07:40:11Z"
|
||||
tags:
|
||||
- imported
|
||||
- from-twitter
|
||||
---
|
||||
|
||||
{{< openlibrary "OL34954380W" >}}
|
||||
|
||||
Marked as to-read: The Old Man and the Sea by Ernest Hemingway
|
|
@ -1,11 +0,0 @@
|
|||
---
|
||||
date: "2011-03-08T18:38:06Z"
|
||||
tags:
|
||||
- imported
|
||||
- from-twitter
|
||||
- reading
|
||||
---
|
||||
|
||||
{{< openlibrary "OL5703422W" >}}
|
||||
|
||||
I'm [reading](/tags/reading) Jonathan Strange & Mr Norrell by Susanna Clarke
|
|
@ -30,7 +30,7 @@ sitemap:
|
|||
|
||||
{{< emoji "📖" >}}I'm only a few pages into [Cheap Complex Devices](https://openlibrary.org/books/OL8797982M/Cheap_Complex_Devices) and already loving it. Even the foreword has me thinking meta: should I trust the editor of the book when he says "skip the rest of the foreword", given that the editor is a character?? It's definitely not a book for sleepy bedtime reading!
|
||||
|
||||
{{< openlibrary "OL49368138M" >}}
|
||||
{{< book "/books/OL49368138M" >}}
|
||||
|
||||
{{< emoji "🎧" >}}A few days ago I pulled out [Kitty Cat Kill Sat](https://openlibrary.org/works/OL36523390W/Kitty_Cat_Kill_Sat) on Audible as something relaxing to listen to with house chores and travel — what a win! It's fun, playful, _gripping_ and lighthearted without being frivolous. I'm absolutely steaming through it!
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/610034736
|
||||
---
|
||||
|
||||
{{< openlibrary "9781400077809" >}}
|
||||
{{< book "9781400077809" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/604252422
|
||||
---
|
||||
|
||||
{{< openlibrary "9780441014156" >}}
|
||||
{{< book "9780441014156" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/111896935
|
||||
---
|
||||
|
||||
{{< openlibrary "9781852424800" >}}
|
||||
{{< book "9781852424800" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/202287308
|
||||
---
|
||||
|
||||
{{< openlibrary "9780307887436" >}}
|
||||
{{< book "9780307887436" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/316204375
|
||||
---
|
||||
|
||||
{{< openlibrary "9781857231380" >}}
|
||||
{{< book "9781857231380" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/695460156
|
||||
---
|
||||
|
||||
{{< openlibrary "9780142004036" >}}
|
||||
{{< book "9780142004036" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/687343966
|
||||
---
|
||||
|
||||
{{< openlibrary "9780142001806" >}}
|
||||
{{< book "9780142001806" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/2569740480
|
||||
---
|
||||
|
||||
{{< openlibrary "9781509835171" >}}
|
||||
{{< book "9781509835171" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/604255023
|
||||
---
|
||||
|
||||
{{< openlibrary "9780765333513" >}}
|
||||
{{< book "9780765333513" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/566131190
|
||||
---
|
||||
|
||||
{{< openlibrary "9781841499390" >}}
|
||||
{{< book "9781841499390" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/604253366
|
||||
---
|
||||
|
||||
{{< openlibrary "9780316098120" >}}
|
||||
{{< book "9780316098120" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/808658340
|
||||
---
|
||||
|
||||
{{< openlibrary "9780062266767" >}}
|
||||
{{< book "9780062266767" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/687343274
|
||||
---
|
||||
|
||||
{{< openlibrary "9780812993295" >}}
|
||||
{{< book "9780812993295" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/224218792
|
||||
---
|
||||
|
||||
{{< openlibrary "9780140125054" >}}
|
||||
{{< book "9780140125054" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/698555776
|
||||
---
|
||||
|
||||
{{< openlibrary "9781782391210" >}}
|
||||
{{< book "9781782391210" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/808640102
|
||||
---
|
||||
|
||||
{{< openlibrary "/books/OL49208407M" >}}
|
||||
{{< book "/books/OL49208407M" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/879236135
|
||||
---
|
||||
|
||||
{{< openlibrary "9781847670243" >}}
|
||||
{{< book "9781847670243" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -13,7 +13,7 @@ syndications:
|
|||
- https://www.goodreads.com/review/show/111897239
|
||||
---
|
||||
|
||||
{{< openlibrary "9780451162335" >}}
|
||||
{{< book "9780451162335" >}}
|
||||
|
||||
{{% importnote 2023-07-27 %}}
|
||||
Back when I wrote Goodreads reviews, I tried to keep them short & sweet — which makes them seem a little out of place here on this blog!
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
{{/* Swap out unsupported list types */}}
|
||||
{{- $content := $content | replaceRE `\n- (.+?)` "\n* $1" -}}
|
||||
{{- $content := $content | replaceRE `\n(\d+). (.+?)` "\n* $2" -}}
|
||||
{{- $content := $content | replaceRE `\n(\d+)\. (.+?)` "\n* $2" -}}
|
||||
{{/* Remove footnote references */}}
|
||||
{{- $content := $content | replaceRE `\[\^(.+?)\]:?` "" -}}
|
||||
{{/* Swap out forced newlines */}}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{{- $path := .Page.Path -}}
|
||||
{{- $path := .path -}}
|
||||
{{- $isbn := "" -}}
|
||||
{{- $key := "" -}}
|
||||
{{- $showCover := ne (.Get 1) false -}}
|
||||
{{- $showCover := ne .showcover false -}}
|
||||
{{- $book := dict -}}
|
||||
|
||||
{{- with .Get 0 -}}
|
||||
{{- with .id -}}
|
||||
{{- if eq (len .) 13 -}}
|
||||
{{- $isbn = . -}}
|
||||
{{- else -}}
|
||||
|
@ -23,7 +24,7 @@
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- warnf "Failed to fetch ISBN data from OpenLibrary: %s" $isbn -}}
|
||||
{{- errorf "Failed to fetch ISBN data from OpenLibrary: %s" $isbn -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
@ -45,6 +46,8 @@
|
|||
{{- $authorObj := .Content | transform.Unmarshal -}}
|
||||
{{- if eq $authorObj.status "ok" -}}
|
||||
{{- $authors = $authors | append (dict "name" $authorObj.result.name "url" (printf "https://openlibrary.org%s" $authorObj.result.key)) -}}
|
||||
{{- else -}}
|
||||
{{- errorf "OpenLibrary response was %s while fetching author data: %s" $authorObj.status .key -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
|
@ -69,11 +72,13 @@
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $book := dict "title" $bookObj.result.title "authors" $authors "url" (printf "https://openlibrary.org%s" $key) "cover" $cover -}}
|
||||
{{- partial "book.html" $book -}}
|
||||
{{- $book = dict "title" $bookObj.result.title "authors" $authors "url" (printf "https://openlibrary.org%s" $key) "cover" $cover -}}
|
||||
{{- else -}}
|
||||
{{- errorf "OpenLibrary response was %s while fetching: %s" $bookObj $key -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- warnf "Failed to fetch Book data data from OpenLibrary: %s" $key -}}
|
||||
{{- errorf "Failed to fetch Book data data from OpenLibrary: %s" $key -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- return $book -}}
|
8
layouts/shortcodes/book.gmi
Normal file
8
layouts/shortcodes/book.gmi
Normal file
|
@ -0,0 +1,8 @@
|
|||
{{- if ne (.Get 1) false -}}
|
||||
{{- $book := partial "openlibrary.obj" (dict "path" .Page.Path "id" (.Get 0)) -}}
|
||||
{{- with $book -}}
|
||||
{{- if .cover }}
|
||||
=> {{ .cover.RelPermalink }} 📖 {{ .title }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
|
@ -12,7 +12,10 @@
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if .cover -}}
|
||||
{{- $showCover := ne (.Get 1) false -}}
|
||||
{{- $book := partial "openlibrary.obj" (dict "path" .Page.Path "id" (.Get 0)) -}}
|
||||
{{- with $book -}}
|
||||
{{- if and $showCover .cover -}}
|
||||
<figure class="book">
|
||||
<a href="{{ .url }}" target="_blank" title="Open book details">
|
||||
{{- $title := .title -}}
|
||||
|
@ -30,3 +33,4 @@
|
|||
<a href="{{ .url }}" target="_blank" title="Open book details">{{ .title }}</a>
|
||||
{{- partial "partials/author-list.html" .authors -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
Loading…
Reference in a new issue