Update your Now page, automatically
Find a file
2025-12-28 22:25:45 +00:00
.forgejo/workflows Update .forgejo/workflows/update.yml 2025-12-28 22:25:45 +00:00
.env.example trakt support 2025-12-17 21:53:32 -08:00
.gitignore added local development files to .gitignore and updated package.json to include preview script 2025-12-28 13:32:09 +00:00
biome.json trakt support 2025-12-17 21:53:32 -08:00
config.js fixed regex for some.pics 2025-12-28 13:08:30 +00:00
index.js updated now function to apply markdown escaping for display text based on link format 2025-12-25 20:01:41 +00:00
lefthook.yml init 2025-12-17 17:57:14 -08:00
now-page-template.md updated badge link to the now-updater repo 2025-12-26 15:06:37 +00:00
package-lock.json letterboxd support 2025-12-17 21:35:31 -08:00
package.json added local development files to .gitignore and updated package.json to include preview script 2025-12-28 13:32:09 +00:00
profile-page-template.md added profile and now page templates with updated content and links 2025-12-25 18:27:26 +00:00
README.md updated README with Last.fm usage example 2025-12-25 23:53:24 +00:00
utils.js updated getTraktMovie call in getTraktEpisodeAndMovie to include ID 2025-12-25 22:59:28 +00:00

now-updater

Automatically updates your omg.lol Now page with your latest activity.

Fork of melanie/now-updater with added support for HTML output links, Mastodon, Last.fm, and dynamic URLs.

Demo: dylan.omg.lol/now

How It Works

Fetches content from RSS feeds, JSON feeds, and different services (Letterboxd, Trakt, Mastodon, Last.fm) and updates HTML or markdown links on your Now page. Runs every 3 hours via Forgejo Actions, only updating your page when changes are detected.

Example

Your Now page links will be automatically updated from this:

HTML links (before):

<a href="https://your-blog.com">tktk</a>

Markdown links (before):

[tktk](https://your-blog.com)

to this:

HTML links (after):

<a href="https://your-blog.com/2025/12/my-latest-post">My Latest Post</a>

Markdown links (after):

[My Latest Post](https://your-blog.com/2025/12/my-latest-post)

Setup

  1. Fork this repo
  2. Enable Actions in repo settings
  3. Add Actions variables: OMGLOL_USERNAME (your omg.lol username)
  4. Add Actions secrets: OMGLOL_KEY (your API key), TRAKT_SLURM (optional, see Trakt for details)
  5. Add your sources in config.js

For local development, copy .env.example to .env with your credentials.

Basic Example

Now page template:

I wrote this: [tktk](https://your-blog.com)
I watched this: [tktk](trakt.tv/users/username)

config.js:

export const linkFormat = 'markdown'

export const items = [
  {
    id: 'blog',
    regex: htmlLinkRegex('your-blog.com'),
    getLatest: async () => getJsonFeedItemTitle('https://your-blog.com/feed.json'),
  },
  {
    id: 'letterboxd',
    regex: htmlLinkRegex('letterboxd.com/username'),
    getLatest: async () => getLetterboxdActivity('username', true), // with image
  },
  {
    id: 'trakt-movie',
    regex: htmlLinkRegex('trakt.tv/users/username'),
    getLatest: async () => getTraktMovie('username', 'your-trakt-id', false), // text only
  },
]

Configuration

Edit config.js to define your content sources. Each item needs:

  • id: identifier for logs
  • regex: pattern to match your link
  • getLatest: async function that fetches and returns latest content

Set linkFormat to 'html' or 'markdown' depending on your Now page format.

Available Functions

  • getRSSItemTitle(feedUrl) - Standard RSS feeds
  • getJsonFeedItemTitle(feedUrl, showImage) - JSON feeds
  • getLetterboxdActivity(username, showImage) - Letterboxd activity
  • getTraktEpisode(username, id, showImage) - Latest TV episode
  • getTraktMovie(username, id, showImage) - Latest movie
  • getTraktEpisodeAndMovie(username, id, showImage) - Latest episode and movie combined
  • getMastodonPost(feedUrl) - Latest non-reply Mastodon post
  • getMalojaScrobble(url) - Latest music scrobble from maloja

Notes:

  • showImage (defaults to true) controls whether images/posters are included in the output. Set it to false to show text only.
  • For Last.fm, use getRSSItemTitle('https://lfm.xiffy.nl/your-username') (via lfm.xiffy.nl)

Trakt

To get your Trakt slurm key, follow these steps:

  1. Go to your History page on Trakt: https://trakt.tv/users/your-username/history
  2. There should be an RSS feed icon on the top right of the page. Click it.
  3. The URL it shows will look something like this: https://trakt.tv/users/crankle/history.atom?slurm=your-slurm-key
  4. Copy the slurm value from the URL and add it as a secret in your Actions settings named TRAKT_SLURM.

There may be a better way to get this key, but this is how I found it.

Credits

Original project by melanie kat. Without her work, this fork would not exist.

Thank you also to xiffy for the Last.fm scrobble fetching service this uses.

Support

Did you find this useful like I did? Melanie asks that you donate to Trans Lifeline or The Trevor Project if you can. I will also add Belong To to that list.