For those who like the Roam/daily journal automation, here's a python script for NVUltra
If this ain't useful, lemme know and I'll delete it. It just checks for journal file for today, creating it if necessary, and opens it with an x-url. There's probably a prettier way, but oh well.
I call it using a Shortcut/Siri → "Hey Siri, Journal"
Loving NVUltra!
#!/usr/bin/env python3import osimport datetimeimport webbrowser# Get the current date and format it in ISO 8601 formattoday = datetime.date.today().isoformat()# Set the directory path where the file will be checked and createddirectory = "/Users/user-name-here/Documents/notebook-name-here/JOURNAL"# Set the file name with today's date in ISO 8601 formatfilename = f"{today}.md"# a function to open the journal file, launching NVUltra if necessarydef launch():url = "x-nvultra://open?notebook=" + directory + "¬e=" + filenamewebbrowser.open(url)# Check if the file exists in the directoryif os.path.exists(os.path.join(directory, filename)):launch()else:# Create the file with today's date in ISO 8601 format, and a single heading as its contentwith open(os.path.join(directory, filename), "w") as f:f.write(today)f.write('\n\n# Journal\n')launch()
cheers,
Rob
0
-
Always happy to see how people are integrating nvUltra into their workflows!
0
Please sign in to leave a comment.
Comments
1 comment