2024-05-01 | 11:54:37 AM
Hi there! I just finished doing this thing using templater. It’s a fancy little plugin that uses JavaScript to output cool little strings that I can use to automate my note-taking. I know it’s probably not interesting to someone who doesn’t like to think about automation and systems and stuff like that, but I find it really cool that something like it exists. I’m starting to really think that I should’ve been a some sort of tech engineer (like a coder/programmer) instead, since I find these things really fun.
Anyway, here’s a screenshot of it — my Dailies entry template:
Here’s what it does, step by step:
- It creates a YAML-based title based on the existing file title, using
<% tp.file.title %>
. - It specifies the note as ready to be published, by default, based on the
draft
metadata (which I can change whenever I want by typing in true or false. - It formulates the file creation date using
<% tp.file.creation_date("YYYY-MM-DD" %>
, which outputs the creation date with the specific format ofYYY-MM-DD
. - It classifies a
last-modifed
metadata through<% tp.file.last_modified_date("YYYY_MM_DD hh:mm:ss A") %>
, which outputs the date the note was last modified, following a specific format:YYYY_MM_DD hh:mm:ss A
. - It outputs the date today, using
<% tp.date.now("YYYY-MM-DD") %>
. It outputs the formatYYYY-MM-DD
. - It classifies if the
type
of the note I made within my_dailies
folder is an entry, as in a Dailies entry, or not. By default, it’s classified as anentry
. - Through
<% await tp.file.move("/_dailies/" + tp.file.title) %>
, Templater sees if the file I’m currently on is within or outside the_dailies
folder, specified in"/_dailies/"
. If it’s outside, it automatically puts it within the specified directory. And lastly… <% tp.date.now("YYYY_MM-DD") %>
outputs the date now, with the formatYYYY-MM-DD
, and then appends another string with the|
character alongside<tp.date.now("hh:mm:ss A") %>
, which outputs the date now with the formathh:mm:ss: A
.
I know I might have overly complicated how I explained things, and there may be a few better terms I could use to have simplified the entire list of actions that this Templater template made, but that list shows everything that’s being done by each of those… commands? (I don’t know what they’re called). Or lines of code.
2024-05-01 | 12:54:59 PM
I really want to learn how to code again. Should I re-learn it? I have a little bit of knowledge on HTML, CSS, and JS — that’s it. But I’m gonna be honest, I don’t know that much.
2024-05-01 | 03:00:28 PM
I’m experimenting on an executable file (a .bat
file for Windows) that runs the command npx quartz sync
with a --commit
message when it commits to the Github repository of my Public Journal. I’ll try to make it work first before adding anything here. This is a test to see if the .bat
file I made is working.
It works, but I don’t exactly know how I could fiddle with the commit message such that I can manually add my custom commit message for each commit that I run using the npx quartz sync
command.
I found a handlers.js
file which supposedly holds the information that I need to change so I can do what I want to do, but again, it’s written in JS and I have very little knowledge regarding that.
2024-05-01 | 03:30:49 PM
I found something!
Even with my limited knowledge in coding, I found a way to not run VS Code anymore, open the directory of my Public Journal, and manually run
cd quartz
andnpx quartz sync
every time I want to push changes to my website. Read below to know the steps:
Here’s an image that shows me asking the Quartz Discord Community the following question:
Hello, is there a way I could automatically run
npx quartz sync
within my Obsidian vault, so I can update my GitHub repository and push updates to my website without having to open any sort of terminal whatsoever and runningcd quartz
followed bynpx quartz sync
?Sorry, I know this is a bit of a n00b question, but I’m no means a programmer and I have surface-level knowledge about HTML, CSS, JS, and coding in general, at best. Any help would be much appreciated, thank you. 🙂
I was met with crickets, but I eventually found a workaround that I think works perfectly for my needs.
I made a .bat file with these lines:
cd quartz npx quartz sync
I then utilized Flow Launcher’s Plugin Runner plugin to run the bat file using r
as my hotkey, which I would press once I open Flow Launcher through alt + space
.
So the workflow goes like this:
- Run Flow Launcher.
alt + r
- Press R.
r
- Press Enter.
enter
It’s much more efficient compared to this:
- Run VS Code.
- Open local repository.
- Type in
cd quartz
, thenenter
. - Type in
npx quartz sync
, thenenter
.
Sometimes, I would encounter issues with Quartz not being loaded into the proper directory, so I still have to type in cd quartz
, despite the directory being open in VS Code. Then I have to check, after running it, whether it’s already ran. Only then can I go to the following steps.
2024-05-01 | 11:12:46 PM
I had fun today! I wrote a lot on my public journal. Actually, it doesn’t matter that much that I wrote a lot. For me, I think the ‘having fun’ part is what’s important.
I made some major updates on my journal, including _READ-ME-FIRST and _READ-ME-NEXT, and a few revisions in pages here and there, particularly on the landing page. Hopefully I made things make sense so beginners could understand what’s going on in my public journal. Also, I still haven’t decided whether I should always capitalize the words Public Journal
or if I should just keep them as public journal
. The thing is I think my journal now has a name (kinda? 🤔) since I called it Alexander’s Thoughts in the homepage.
I’ll see, though. I think it’s better to not put a name on my journal and keep it as public journal
instead, since that doesn’t sort of put my website on a pedestal, where I look up to it, in a sense. I just want it to be on my level, like some sort of a companion for my thoughts.
I’m not gonna lie, I kinda miss writing on my other journal, Ian's Zettelkasten V2
. There are a lot of heartfelt stuff there. Makes me miss going back to it and just pouring my heart out. For now though, I think this dailies (should I capitalize or not? LOL) thing would serve as the main thing. Again, for now.
But now that I’m familiarized with Quartz, I think it really is better for me to just spend time here doing the stuff that I deem fun (writing about anything under the Sun), and putting that here. It’s also a cool little thing that could become part of my long-term commitments, so yeah. 🤷♂️