[2022-05-30 Mon 13:45]
Having a fun day fiddling with the Templater plugin for Obsidian.

Here’s the template code I have at the moment, if that’s the sort of thing that interests you. Borrowed heavily from ThoughtAsylum and Red Gregory.
This is the template I invoke to create a new jot file. It prompts me for an optional topic, creates the file, and inserts a link wherever my cursor is.
With syntax highlighting, since inside the <%* ... %> it’s just JavaScript.
jot-insert.md
<%*
// Jot title is a Zettel timestamp and optional topic
const timestamp = tp.date.now("YYYYMMDDhhmm");
let title = timestamp;
const jotSubject = await tp.system.prompt("What's this jot about?");
if (jotSubject) {
title = `${title} ${jotSubject}`;
}
// Where I keep my quick jots
const targetPath = "jots";
// The template used to generate the new jot
const templateName = "_templates/jot-new";
// Create the folder object
let folder = app.vault.getAbstractFileByPath(targetPath);
// Get the template file content
let templateFile = await tp.file.find_tfile(templateName);
let rawContent = await app.vault.read(templateFile);
// Create the new file in the folder from the template (do not open it by default)
await tp.file.create_new(rawContent, title, false, folder);
// Insert a link at the current cursor position to the new file
const link = `[${title}](${title})`;
tR += link;
%>
This template sets the content of the new file. If I provided something for a. topic when invoking jot-insert.md, that will be used as the display title.
Without syntax highlighting. Markdown, YAML, and JavaScript all mixed in—can Hugo / Chroma even do that?
jot-new.md
---
<%*
const fileTitle = tp.file.title;
let pageTitle = fileTitle;
if (fileTitle.length > 12) {
pageTitle = fileTitle.slice(13);
}
-%>
title: <% pageTitle %>
created_at: <% tp.file.creation_date() %>
tags:
- jot
---
up:: <% `[${tp.file.creation_date('gggg-MM-DD')}]('gggg-MM-DD')})})})` %>
# <% pageTitle %>
<% tp.file.cursor() %>
Got the up:: link there for the Breadcrumbs. That way the jot links back to whatever day I made the jot, even if it’s a jot for some unrelated topic. “When?” is as important of a question as “what?” when I’m trying to track my thoughts.
Looks a bit like Zettelkasten, but the only thing intentionally Zettel about it is the timestamp.
Been focusing on the less outliner-oriented note systems to simplify copy and paste to / from the outside world. But that means a single page can get unwieldy if I’m not careful. Now I can link out for stuff like meeting notes and whatever to keep my daily notes from become 10,000 word walls of text.
Oh and I know I can export from Org Mode to whatever I need for pasting. I may get there. This is an incremental process. Right now I’m dealing with the fact that most of my notes are in one flavor of Markdown or another.
Activity Log
hackers.town: 2022-05-30 Mon 01:30
Today’s hyper focus level was “spent 13 hours merging notes from two PKMs into the existing notes from a third because it’s easier to copy and paste from that one.”
I was gonna play some video games but it’s 1:30 am and I realized I’m tired.
hackers.town: 2022-05-30 Mon 12:42
Having a fun day fiddling with the Obsidian Templater plugin.

hackers.town: 2022-05-30 Mon 14:09
Blurbed a little bit about using the Obsidian Templater plugin, mainly because I wanted to credit my sources for code that works as intended.
https://randomgeekery.life/posts/2022/05/1653939606/
hackers.town: 2022-05-30 Mon 15:04
Speaking of write-only notes, continuing the merge / cleanup from yesterday and found a note from January and oh that’s who they were talking about last week!
hackers.town: 2022-05-30 Mon 22:39
Pushed most of my notes into Obsidian. It makes the fewest odd assumptions about Markdown format and file organization. Easier to push into a fancier format later.
Meanwhile, the mobile client has a cool idle game where you watch the graph catch up with sync.

hackers.town: 2022-05-30 Mon 22:43
Course, merging everything means I’ll spend weeks wrestling with duplication and format issues. Ironic yay.
But I already found many useful notes I’d lost track of because quick switching meant focusing on daily surface stuff. Earnest yay!