From 61bb4d4d9eeb448eb7ef835d379d64ea27413931 Mon Sep 17 00:00:00 2001 From: dylan Date: Mon, 29 Dec 2025 19:30:19 +0000 Subject: [PATCH 1/2] updated README to include details on new image handling --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index d2e666b..9ac8d16 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ Demo: [dylan.omg.lol/now](https://dylan.omg.lol/now) Fetches content from RSS feeds, JSON feeds, and different services (Letterboxd, Trakt, Last.fm, Steam, Hardcover, etc.) and updates HTML or markdown links on your Now page. Supports optional images and videos for services that provide them (These are... iffy so if something breaks it's probably this). Runs every 3 hours via Forgejo Actions, only updating your page when changes are detected. +Images are matched using a `data-service` attribute on the img tag, which allows them to be updated repeatedly even after the initial replacement. + ### Example Your Now page links will be automatically updated from this: @@ -54,6 +56,7 @@ For local development, copy `.env.example` to `.env` with your credentials. ```html I wrote this: blog I watched this: letterboxd + I listened to: lastfm ``` @@ -161,6 +164,15 @@ Many services support optional images and videos: Control image inclusion with the `showImage` flag in your service config. Images are returned separately from text so you can control placement on your Now page. +To use images, your img tags must include a `data-service` attribute matching the service `id` from services.js. For example: + +```html + + +``` + +The `src` attribute can start with a placeholder (like `letterboxd-image`) or an existing URL - the updater will replace it either way as long as the `data-service` attribute is present. + ## Available Services All handlers now use a config object with consistent parameters. The `feedType` in services.js maps to these handlers. From 185014493c071b9f6dfdd14a51b7b8a837f4037d Mon Sep 17 00:00:00 2001 From: dylan Date: Mon, 29 Dec 2025 19:30:31 +0000 Subject: [PATCH 2/2] updated image tags --- now-page-template.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/now-page-template.md b/now-page-template.md index e7d75a9..eed971c 100644 --- a/now-page-template.md +++ b/now-page-template.md @@ -3,12 +3,12 @@
I listened to this
lastfm
-
I watched this episode
trakt-episode
-
I watched this movie
trakt-movie
-
I rated this
letterboxd
-
I'm reading this
hardcover
-
I played this
steam
-
I shared this photo
some.pics
+
I watched this episode
trakt-episode
+
I watched this movie
trakt-movie
+
I rated this
letterboxd
+
I'm reading this
hardcover
+
I played this
steam
+
I shared this photo
some.pics
I wrote this
weblog
I pushed some (bad) code
source.tube