Changing rss feed in Daily Journal - Markdown

HI - First time I’ve tried to modify a template, so I’m probably misunderstanding how it all works. However, I have changed the script - by opening the templates folder, then show package contents, navigating to main.scpt and changing the line in the getNews() function to:

set getNewsSource to download markup from “feed://theguardian.com/uk/rss”

it was previously set to download from nytimes.

However, when I create a new journal, from the menu, it is still created with rss feeds from the NY times.

I can only guess that from the menu I’m triggering the script from some other location - as the one shown in the template location has definitely been changed to get the feed from the Guardian.

Does anyone have any suggestion on what I might be doing wrong?

Did you restart the app? The old script might be still cached. Please note that it’s recommended to customize copies of included scripts/templates to avoid loss of your changes in case of future updates.

Hi - yes, I’ve restarted the app multiple times. Following your suggestion, I made a copy of “Daily Journal - Markdown.templatescriptd” and called it “Alister’s Daily Journal - Markdown.templatescriptd”

I confirmed that the feed in this renamed copy was set to the Guardian’s not the NY times. As before, I deleted the previous journal file for today that had been created - to force the script to create a new one. Having done that, I shut down DTP3 and rebooted my Mac.

I got the same result - it created a journal file with feeds from the NY Times, not the Guardian. Very strange

Some background info - I am on an M1 MacBook Air, running Ventura. I have confirmed that the Guardian RSS feed works by setting it up as a feed in a separate DTP3 database - the feed comes in fine.

Please post the customized source.

Alister’s Daily Journal — Markdown.templatescriptd.zip (27.8 KB)

I’ve zipped the whole thing and attached it here.

Running the script from Script Editor uses the Guardian feed.

After this, quitting and relaunching DEVONthink, the Guardian feed is continuing to be used.

Try that @asibbald

Fantastic. Thanks very much. It works perfectly now. I guess there must be layers upon layers of caching going on…

You’re welcome.

I didn’t see any useful result from using DEVONthink 3 > Empty Cache before I ran the script in Script Editor. I also didn’t see any AS property that could be involved.

Our fearless tech leader @cgrunenberg would have to comment further on why this worked, if he has an idea. :slight_smile:

Scripts (including the ones of templates) are cached, that would explain why it works in the Script Editor if the template was already used since launching DEVONthink.