From 2756f1ff80a4bcd9e7efe528ee410440029bb63c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20K=C3=B6hring?= Date: Sun, 21 Jul 2024 13:31:25 +0200 Subject: [PATCH] add bookmarks via deno script --- bookmarks.ts | 64 +++++++++++++++++++ content/bookmarks.json | 1 + content/bookmarks.md | 40 +++++++++++- content/projects.md | 8 ++- layouts/templates/base.html | 1 + static/style.css | 3 +- .../index.html | 1 + .../blog/2017-04-09-the-magic-0xc2/index.html | 1 + .../index.html | 1 + .../index.html | 1 + .../index.html | 1 + .../blog/2019-05-03-freddy-vs-json/index.html | 1 + .../index.html | 1 + zig-out/blog/index.html | 1 + zig-out/bookmarks/index.html | 5 +- zig-out/cv/index.html | 1 + zig-out/index.html | 1 + zig-out/now/index.html | 1 + zig-out/projects/index.html | 3 +- zig-out/setup/index.html | 1 + zig-out/stack/index.html | 1 + zig-out/style.css | 3 +- zig-out/til/2021-08-31/index.html | 1 + zig-out/til/2021-09-03/index.html | 1 + zig-out/til/2021-09-04/index.html | 1 + zig-out/til/2021-09-05/index.html | 1 + zig-out/til/2022-02-22/index.html | 1 + zig-out/til/2022-03-22/index.html | 1 + zig-out/til/2022-03-28/index.html | 1 + zig-out/til/2022-04-25/index.html | 1 + zig-out/til/2022-06-15/index.html | 1 + zig-out/til/2024-05-11/index.html | 1 + zig-out/til/2024-05-12/index.html | 1 + zig-out/til/2024-05-13/index.html | 1 + zig-out/til/index.html | 1 + 35 files changed, 146 insertions(+), 8 deletions(-) create mode 100644 bookmarks.ts create mode 100644 content/bookmarks.json diff --git a/bookmarks.ts b/bookmarks.ts new file mode 100644 index 0000000..55e3869 --- /dev/null +++ b/bookmarks.ts @@ -0,0 +1,64 @@ +type Bookmark = { + id: number + url: string + title: string + description: string + notes: string + website_title: string | null + website_description: string | null + web_archive_snapshot_url: string | null + is_archived: boolean + unread: boolean + shared: boolean + tag_names: string[] + date_added: string + date_modified: string +} + +type Response = { + count: number + next: string | null + previous: string | null + results: T[] +} + +const bookmarksRaw: string = await Deno.readTextFile('./content/bookmarks.json') +const bookmarksResponse = JSON.parse(bookmarksRaw) as Response +const bookmarkList = bookmarksResponse.results + +const templatePrefix = `--- +{ +.title = "Bookmarks", +.date = @date("2024-07-16T00:00:00"), +.author = "koehr", +.draft = false, +.layout = "page.html", +.description = "Websites that inspired me, that I think are worth reading, useful and I don't want to forget about.", +.tags = [], +} +--- + +> Check out [The Bukmark Club](https://bukmark.club/) to find more pages featuring a curated collection of bookmarks and/or links to other websites. + +This page is intended to be generated as part of the build step in the future, but it is not there, yet. Instead it is generated by a small, manually run helper script, therefore the bookmarks might not be fully up to date. For a fully up-to-date version, please refer to my [public bookmark list](https://url.koehr.ing/bookmarks/shared). + +--- + +` + +const URL = 'https://url.koehr.ing/bookmarks/shared' + +const bookmarksMd = bookmarkList.map(bookmark => { + const { url, title: maybeTitle, description, tag_names: tags, notes } = bookmark + + const title = maybeTitle?.length > 0 ? maybeTitle : url + const tagList = tags.map(tag => `[#${tag}](${URL}?q=%23${tag})`).join(' ') + + return `* [${title}](${url})${description ? ` - ${description}` : ''} + ${tagList}${notes ? `\n\n ${notes}` : ''} +` +}) + +console.log(templatePrefix + bookmarksMd.join('\n')) + +export {} diff --git a/content/bookmarks.json b/content/bookmarks.json new file mode 100644 index 0000000..dbba7ff --- /dev/null +++ b/content/bookmarks.json @@ -0,0 +1 @@ +{"count":10,"next":null,"previous":null,"results":[{"id":213,"url":"https://www.scientificamerican.com/article/do-insects-feel-joy-and-pain/","title":"Do Insects Feel Joy and Pain?","description":"Insects have surprisingly rich inner lives—a revelation that has wide-ranging ethical implications","notes":"Insects appear to experience both pleasure and pain. In other words, it now looks like at least some species of insects—and maybe all of them—are sentient.","website_title":"","website_description":"","web_archive_snapshot_url":"","is_archived":false,"unread":false,"shared":true,"tag_names":["science","ethics","insects"],"date_added":"2024-07-21T11:16:15.701685Z","date_modified":"2024-07-21T11:19:25.778691Z"},{"id":211,"url":"https://www.brightball.com/articles/story-points-are-pointless-measure-queues","title":"","description":"","notes":"","website_title":null,"website_description":null,"web_archive_snapshot_url":"","is_archived":false,"unread":false,"shared":true,"tag_names":["agile","management","scrum"],"date_added":"2024-07-17T08:02:07.010251Z","date_modified":"2024-07-17T08:02:07.010259Z"},{"id":210,"url":"https://ktema.org/articles/the-overengineered-resume/","title":"","description":"","notes":"","website_title":null,"website_description":null,"web_archive_snapshot_url":"","is_archived":false,"unread":true,"shared":true,"tag_names":["dev","goodexample","cv","resume"],"date_added":"2024-07-15T12:38:46.453529Z","date_modified":"2024-07-15T12:38:46.453537Z"},{"id":209,"url":"https://cohere.com/blog/llm-parameters-best-outputs-language-ai","title":"LLM Parameters Demystified: Getting The Best Outputs from Language AI","description":"When using Language AI to generate content, there are many options to control the outputs. Let's take a look at them in this post.","notes":"","website_title":null,"website_description":null,"web_archive_snapshot_url":"","is_archived":false,"unread":false,"shared":true,"tag_names":["LLM"],"date_added":"2024-06-16T11:12:40Z","date_modified":"2024-06-16T11:12:40Z"},{"id":204,"url":"https://itch.io/queue/c/1304214/scifi-trpg-tools?game_id=1415404","title":"Vintage Star System generator","description":"","notes":"","website_title":null,"website_description":null,"web_archive_snapshot_url":"","is_archived":false,"unread":false,"shared":true,"tag_names":["generator","TTRPG","SciFi","mothership","StarSystem","vintage"],"date_added":"2023-06-21T07:38:12Z","date_modified":"2023-06-21T07:38:12Z"},{"id":195,"url":"https://math.stackexchange.com/questions/49034/is-infinity-an-odd-or-even-number","title":"parity - Is infinity an odd or even number? - Mathematics Stack Exchange","description":"","notes":"","website_title":null,"website_description":null,"web_archive_snapshot_url":"","is_archived":false,"unread":false,"shared":true,"tag_names":["math","infinity"],"date_added":"2023-05-02T14:54:57Z","date_modified":"2023-05-02T14:54:57Z"},{"id":192,"url":"https://www.piskelapp.com/","title":"Piskel - Free online sprite editor","description":"Piskel, free online sprite editor. A simple web-based tool for Spriting and Pixel art. Create pixel art, game sprites and animated GIFs. Free and open-source.","notes":"","website_title":null,"website_description":null,"web_archive_snapshot_url":"","is_archived":false,"unread":false,"shared":true,"tag_names":["graphics","editor","pixelart"],"date_added":"2023-04-20T15:26:52Z","date_modified":"2023-04-20T15:26:52Z"},{"id":191,"url":"https://github.com/MichaelMure/git-bug","title":"GitHub - MichaelMure/git-bug: Distributed, offline-first bug tracker embedded in git, with bridges","description":"Distributed, offline-first bug tracker embedded in git, with bridges - GitHub - MichaelMure/git-bug: Distributed, offline-first bug tracker embedded in git, with bridges","notes":"","website_title":null,"website_description":null,"web_archive_snapshot_url":"","is_archived":false,"unread":false,"shared":true,"tag_names":["dev","git"],"date_added":"2023-04-20T15:00:57Z","date_modified":"2023-04-20T15:00:57Z"},{"id":182,"url":"https://conversiontools.io/","title":"Conversion Tools - Online File Converter for JSON, XML, Excel, PDF, and other formats","description":"Convert documents, PDF, images, and other files online between different formats. Secured service. User account. Conversion options. REST API and libraries.","notes":"","website_title":null,"website_description":null,"web_archive_snapshot_url":"","is_archived":false,"unread":false,"shared":true,"tag_names":["webapp","file","free","conversion"],"date_added":"2022-05-12T10:02:00Z","date_modified":"2022-05-12T10:02:00Z"},{"id":180,"url":"https://rarebooksleuth.com/collections/science-fiction","title":"Science Fiction & Fantasy\n– The Rare Book Sleuth","description":"","notes":"","website_title":null,"website_description":null,"web_archive_snapshot_url":"","is_archived":false,"unread":false,"shared":true,"tag_names":["books","SciFi","antique"],"date_added":"2022-04-14T22:12:43Z","date_modified":"2022-04-14T22:12:43Z"}]} \ No newline at end of file diff --git a/content/bookmarks.md b/content/bookmarks.md index 6de29ae..d6338da 100644 --- a/content/bookmarks.md +++ b/content/bookmarks.md @@ -5,11 +5,47 @@ .author = "koehr", .draft = false, .layout = "page.html", -.description = "Websites that inspired me, that I think are worth reading, that are useful and I don't want to forget about.", +.description = "Websites that inspired me, that I think are worth reading, useful and I don't want to forget about.", .tags = [], } --- > Check out [The Bukmark Club](https://bukmark.club/) to find more pages featuring a curated collection of bookmarks and/or links to other websites. -This page is generated as part of the build step and might not be fully up to date. For this, please refer to my [public bookmark list](https://url.koehr.ing/bookmarks/shared). +This page is intended to be generated as part of the build step in the future, but it is not there, yet. Instead it is generated by a small, manually run helper script, therefore the bookmarks might not be fully up to date. For a fully up-to-date version, please refer to my [public bookmark list](https://url.koehr.ing/bookmarks/shared). + +--- + +* [Do Insects Feel Joy and Pain?](https://www.scientificamerican.com/article/do-insects-feel-joy-and-pain/) - Insects have surprisingly rich inner lives—a revelation that has wide-ranging ethical implications + [#science](https://url.koehr.ing/bookmarks/shared?q=%23science) [#ethics](https://url.koehr.ing/bookmarks/shared?q=%23ethics) [#insects](https://url.koehr.ing/bookmarks/shared?q=%23insects) + + Insects appear to experience both pleasure and pain. In other words, it now looks like at least some species of insects—and maybe all of them—are sentient. + +* [https://www.brightball.com/articles/story-points-are-pointless-measure-queues](https://www.brightball.com/articles/story-points-are-pointless-measure-queues) + [#agile](https://url.koehr.ing/bookmarks/shared?q=%23agile) [#management](https://url.koehr.ing/bookmarks/shared?q=%23management) [#scrum](https://url.koehr.ing/bookmarks/shared?q=%23scrum) + +* [https://ktema.org/articles/the-overengineered-resume/](https://ktema.org/articles/the-overengineered-resume/) + [#dev](https://url.koehr.ing/bookmarks/shared?q=%23dev) [#goodexample](https://url.koehr.ing/bookmarks/shared?q=%23goodexample) [#cv](https://url.koehr.ing/bookmarks/shared?q=%23cv) [#resume](https://url.koehr.ing/bookmarks/shared?q=%23resume) + +* [LLM Parameters Demystified: Getting The Best Outputs from Language AI](https://cohere.com/blog/llm-parameters-best-outputs-language-ai) - When using Language AI to generate content, there are many options to control the outputs. Let's take a look at them in this post. + [#LLM](https://url.koehr.ing/bookmarks/shared?q=%23LLM) + +* [Vintage Star System generator](https://itch.io/queue/c/1304214/scifi-trpg-tools?game_id=1415404) + [#generator](https://url.koehr.ing/bookmarks/shared?q=%23generator) [#TTRPG](https://url.koehr.ing/bookmarks/shared?q=%23TTRPG) [#SciFi](https://url.koehr.ing/bookmarks/shared?q=%23SciFi) [#mothership](https://url.koehr.ing/bookmarks/shared?q=%23mothership) [#StarSystem](https://url.koehr.ing/bookmarks/shared?q=%23StarSystem) [#vintage](https://url.koehr.ing/bookmarks/shared?q=%23vintage) + +* [parity - Is infinity an odd or even number? - Mathematics Stack Exchange](https://math.stackexchange.com/questions/49034/is-infinity-an-odd-or-even-number) + [#math](https://url.koehr.ing/bookmarks/shared?q=%23math) [#infinity](https://url.koehr.ing/bookmarks/shared?q=%23infinity) + +* [Piskel - Free online sprite editor](https://www.piskelapp.com/) - Piskel, free online sprite editor. A simple web-based tool for Spriting and Pixel art. Create pixel art, game sprites and animated GIFs. Free and open-source. + [#graphics](https://url.koehr.ing/bookmarks/shared?q=%23graphics) [#editor](https://url.koehr.ing/bookmarks/shared?q=%23editor) [#pixelart](https://url.koehr.ing/bookmarks/shared?q=%23pixelart) + +* [GitHub - MichaelMure/git-bug: Distributed, offline-first bug tracker embedded in git, with bridges](https://github.com/MichaelMure/git-bug) - Distributed, offline-first bug tracker embedded in git, with bridges - GitHub - MichaelMure/git-bug: Distributed, offline-first bug tracker embedded in git, with bridges + [#dev](https://url.koehr.ing/bookmarks/shared?q=%23dev) [#git](https://url.koehr.ing/bookmarks/shared?q=%23git) + +* [Conversion Tools - Online File Converter for JSON, XML, Excel, PDF, and other formats](https://conversiontools.io/) - Convert documents, PDF, images, and other files online between different formats. Secured service. User account. Conversion options. REST API and libraries. + [#webapp](https://url.koehr.ing/bookmarks/shared?q=%23webapp) [#file](https://url.koehr.ing/bookmarks/shared?q=%23file) [#free](https://url.koehr.ing/bookmarks/shared?q=%23free) [#conversion](https://url.koehr.ing/bookmarks/shared?q=%23conversion) + +* [Science Fiction & Fantasy +– The Rare Book Sleuth](https://rarebooksleuth.com/collections/science-fiction) + [#books](https://url.koehr.ing/bookmarks/shared?q=%23books) [#SciFi](https://url.koehr.ing/bookmarks/shared?q=%23SciFi) [#antique](https://url.koehr.ing/bookmarks/shared?q=%23antique) + diff --git a/content/projects.md b/content/projects.md index f70dcb4..f68e2ae 100644 --- a/content/projects.md +++ b/content/projects.md @@ -57,9 +57,15 @@ Just for the sake of completeness and to motivate myself to keep track of it, he > With lots of work comes lots of opportunity for productive procrastination +**tl;dr:** + +I use [zine-ssg](https://zine-ssg.io) to statically build my homepage after every change. I intend to extend it with automated fetching of [bookmarks](/bookmarks). + +**The long version:** + Not too long ago, .ing TLDs became available, that allowed me to finally have my full name as a "cool" domain name: `koehr.ing`. Other domains I have are `nkoehring.de` (boring), `koehr.in` (confusing) and `k0r.in` (nerdy). `koehri.ng` wouldn't be possible due to domain registars policies or pricing (Nigeria used to have the british model, like allowing only net.ng, com.ng, and so on. Later they allowed more, but the price would be pretty high). -Why am I writing all this? Because the new domain name made me think about my homepage as a professional. I wanted to have something, that showcases my skills while not being the usual boring homepage. This is how [the interactive homepage experiment](https://cli.koehr.ing) began; a terminal like website, written from scratch. Having this, I now also needed to change my old homepage to somehow feature my new shiny experiment. But my old homepage is white and not very responsive; two very good reasons (for me), to change it. So I also started writing a completely new homepage, using [vss](https://github.com/vssio/vss). Pretty soon I realised, it is by far not mature enough for my needs, so I started building workarounds to suit my needs, so I don't get stuck in the rabbit hole of choosing frameworks over finishing the page. My plan is, to finish the page and its content and then, when there is time, move it on top of something more sophisticated, like good ol' [Zola](https://www.getzola.org/). +Why am I writing all this? Because the new domain name made me think about my homepage as a professional. I wanted to have something, that showcases my skills while not being the usual boring homepage. This is how [the interactive homepage experiment](https://cli.koehr.ing) began; a terminal like website, written from scratch. Having this, I now also needed to change my old homepage to somehow feature my new shiny experiment. But my old homepage is white and not very responsive; two very good reasons (for me), to change it. So I also started writing a completely new homepage, using [vss](https://github.com/vssio/vss). Pretty soon I realised, it is by far not mature enough for my needs, so I started building workarounds to suit my needs, so I don't get stuck in the rabbit hole of choosing frameworks over finishing the page. My plan was, to finish the page and its content and then, when there is time, move it on top of something more sophisticated, like good ol' [Zola](https://www.getzola.org/). Eventually I found [zine-ssg](https://zine-ssg.io), which now builds my homepage for me. ### New Server diff --git a/layouts/templates/base.html b/layouts/templates/base.html index 6cd59a3..6fa2cfc 100644 --- a/layouts/templates/base.html +++ b/layouts/templates/base.html @@ -81,6 +81,7 @@
  • /cv
  • /stack
  • /setup
  • +
  • /links