From 6bcf4a658dc804a399fcc56b2befb1bc62b4ff56 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 27 Oct 2025 03:03:50 +0000 Subject: [PATCH 1/2] Add blog-to-newsletter.html tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This tool replicates the functionality of the Observable notebook at https://observablehq.com/@simonw/blog-to-newsletter Features: - Fetches blog entries, TILs, blogmarks, quotations, and notes from Datasette - Configurable date range (1-30 days) - Filters out previously sent content from Substack RSS feed - Drag-and-drop reordering of featured stories - Truncates content at cutoff markers - Generates newsletter HTML with table of contents - Copy-to-clipboard for full newsletter and extras only - Live preview of newsletter output 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- blog-to-newsletter.html | 767 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 767 insertions(+) create mode 100644 blog-to-newsletter.html diff --git a/blog-to-newsletter.html b/blog-to-newsletter.html new file mode 100644 index 0000000..9501ce0 --- /dev/null +++ b/blog-to-newsletter.html @@ -0,0 +1,767 @@ + + + + + + Blog to Newsletter + + + + + +
+

Blog to Newsletter

+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+ + + +
+ + + + + + +
+

Newsletter Preview

+
+
Click "Fetch Content" to begin
+
+
+
+ + + + From 8b34d91c997b23b65f0cb0a8251e47b652cd0bc5 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 27 Oct 2025 05:22:04 +0000 Subject: [PATCH 2/2] Fix 404 error in TIL data fetching MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change table name from til_til to til - Use simonwillisonblog.json database instead of non-existent tils.json - TIL table is in the simonwillisonblog database, not a separate database 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- blog-to-newsletter.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blog-to-newsletter.html b/blog-to-newsletter.html index 9501ce0..bd225b5 100644 --- a/blog-to-newsletter.html +++ b/blog-to-newsletter.html @@ -432,7 +432,7 @@

Newsletter Preview

const tilsQuery = ` select topic, slug, title, url, created, body - from til_til + from til where created >= '${sinceStr}' order by created desc `; @@ -449,7 +449,7 @@

Newsletter Preview

executeQuery(baseUrl + '/simonwillisonblog.json', entriesQuery), executeQuery(baseUrl + '/simonwillisonblog.json', blogmarksQuery), executeQuery(baseUrl + '/simonwillisonblog.json', quotationsQuery), - executeQuery(baseUrl + '/tils.json', tilsQuery), + executeQuery(baseUrl + '/simonwillisonblog.json', tilsQuery), executeQuery(baseUrl + '/simonwillisonblog.json', notesQuery) ]);