I’ve always been hoarding hundreds of tabs in my browser, thinking that I’ll eventually get back to that article and read it at some point in the future. At some point I discovered read-it-later apps - like Pocket
and started hoarding things there instead as well. For some unknown reason I’ve always aspired to read those things I’ve saved at some later date…
It very rarely happened.
Some time passed and I decided that I’ll cut my losses and start fresh, and I started using Omnivore
- with mixed results. Well, recently it was announced it was shutting down, so my initial reaction was to look for yet another alternative. Surprise surprise.
Then I thought that none of those read-it-later apps really work for me and I should try something else.
I’ve also been using Obsidian a lot lately, and have been keeping a daily journal. I decided to try to keep track of things I would like to get back to in my journal. At first I manually copied links and pasted them in my daily note, but eventually (after the 2nd time) I got tired of this and decided to automate it.
Thanks to the great Advanced URI plugin - that’s quite easy. I can create a bookmarklet with some simple js
which would grab the page title & url, and construct an obsidian://
link. Clicking on the bookmarklet - it would open that link, which would append the title/url under a heading in my daily journal.
javascript:(function() {
const pageTitle = document.title;
const pageUrl = window.location.href;
const markdownLink = `* [ ] [${pageTitle}](${pageUrl})`;
const obsidianUri = `obsidian://advanced-uri?vault=${encodeURIComponent('Obsidian')}&daily=true&heading=Links&data=${encodeURIComponent(markdownLink)}&mode=append`;
window.location.href = obsidianUri;
})();
This works splendidly - with the “small” annoyance that it asks for permission on every page. It’s only a small annoyance the first few times, and after a couple of clicks I got majorly annoyed so I created a very basic Firefox add-on that will do the same, but will no longer ask me for permissions on every page/click.
You can find the source code here, or the add-on on mozilla.org.
So back to the read-it-later situation - has anything changed? Do I actually open any of those links again? So far I would say that it might be a small improvement over what I had before. I interact with my daily note multiple times a day - so it’s a bit of an eyesore (if nothing else) looking at a very long list of random links. Additionally I can reference relevant links with other notes.
But I think the best feature so far is that I only roll-over the last 15 (unchecked) links of my daily note to the next day, which controls the clutter and “forces” me not to have an endless list.
Here is how I use that add-on with my daily note:
# Links
<%*
async function getUncheckedLinks() {
const { folder, format } = app.plugins.getPlugin("periodic-notes").settings.daily;
const pathFormat = `[${folder}]/${format}`;
const titleFormat = format.split("/").at(-1);
const now = moment(tp.file.path(true), pathFormat);
const previousDayLink = `[[${now.clone().subtract(1, 'd').format(pathFormat)}]]`;
const fileExists = await tp.file.exists(previousDayLink);
try {
const fileContent = await tp.file.include(previousDayLink);
const lines = fileContent.split('\n');
// Filter for unchecked links under the # Links heading
const uncheckedLinks = [];
let inLinksSection = false;
lines.forEach(line => {
if (line.trim() === "# Links") {
inLinksSection = true; // Start processing under # Links
} else if (line.startsWith("#") && inLinksSection) {
inLinksSection = false; // Stop if another heading is found
} else if (inLinksSection && line.trim().startsWith("* [ ]")) {
uncheckedLinks.push(line); // Collect only unchecked items
}
});
return uncheckedLinks.length > 0 ? uncheckedLinks.slice(1).slice(-15).join("\n") : "* No unchecked links found.";
} catch (error) {
console.error(`Failed to read file ${previousDayLink}: ${error}`);
return "* Error reading previous note.";
}
}
-%>
<% await getUncheckedLinks() %>
Is it perfect? No.
Does this workflow work for you? I have no idea.
Am I going to continue using it? Absolutely no clue.