[Plug-In] Create a note with a timestamp in the filename
Available at https://github.com/BrBorghi/new_note_with_timestamp
Creates a new note with timestamp and title
- The user is prompted for a title
- The filename is made from the current timestamp and the sanitized title
- A front matter is inserted at the top of the created note
NB:
- The timestamp is precise to the minute
- the front matter structure is hardcoded
I used to run shell scripts to do that. It's much easier with a plug-in.
Feel free to customize the code to your specs.
Post edited by ctietze on
Howdy, Stranger!
Comments
Looks great. With a little tweaking, I can use this in my workflow.
I've tweaked your fine plugin and installed it. Here is what the output looks like. A new note already to go.
Great job. Your commenting and documentation are great.
Will Simpson
My zettelkasten is for my ideas, not the ideas of others. I don’t want to waste my time tinkering with my ZK; I’d rather dive into the work itself. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
kestrelcreek.com
Thank you for sharing this! Looks good
Downloading your plug-in requires that the user creates a folder that matches the plug-in ID to make installing this work. I'm going to document this better.
Meanwhile, please chime in with complaints and ideas in this thread on distribution (where I also just now documented a way to maybe make this simpler):
https://forum.zettelkasten.de/discussion/3054/how-to-make-sharing-plug-in-bundle-zips-easier
Author at Zettelkasten.de • https://christiantietze.de/
I would love to give this plug-in a try, however I am having issue's downloading it ... I see that I need to change the folder or file name?
Thank you for your comments.
This project was really a toy experiment to see how easy it is to develop a plug-in that would be useful for me. And I must say, it is quite easy, once you see an example. So I documented my code so that it could serve as a decent example.
However, I did not think at all of the distribution of the plug-in. So, I will improve this part soon !
So, I uploaded the zipped plug-in as a binary asset in the release in Github. And I updated the Readme document to provide the link for download and some instructions for installation.
I am not sure that it is compliant with the official way to install a plug-in, but it works.
Always available at https://github.com/BrBorghi/new_note_with_timestamp
Correct me if I'm wrong, but if the file extension .thearchiveplugin is associated with The Archive, then double-clicking on the bundle will install it. Maybe all we need to share is the bundle, and zipping it is redundant. @ctietze could open the allowed files on the forum to include these bundles.
I discovered a bit of a problem. In my overzealousness to test this, I overwrote my customizations. I have git to rescue me, but the average user wouldn't. This points to a feature request offering the user a warning that they are about to overwrite a previously installed plugin.
Will Simpson
My zettelkasten is for my ideas, not the ideas of others. I don’t want to waste my time tinkering with my ZK; I’d rather dive into the work itself. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
kestrelcreek.com
I can see how a plugin would make it easier, but I prefer assigning this kind of job to my text expander (Keyboard Maestro) so I can do the same thing in any plain text app.
Those who discover the meaning of life find that it is written in plain text.
They might not need me; but they might. I'll let my head be just in sight; a smile as small as mine might be precisely their necessity. ~ Emily Dickinson
A double-click on
.thearchiveplugin
indeed installs it -- but since it's a folder with 2 files in it, it cannot directly be shared. It's like an.app
: a sleigh of hands where macOS pretends it's just 1 thing while in reality it's 3 (the folder with 2 files).That makes zipping (or using DMGs, like we do for apps) mandatory. Zipping is simpler in that regard.
But hosting uploaded zip files on the forum means we need to check the contents of every zip, since we're legally responsible for content distributed here. Images you can look at, identify spam, then delete. Zips we would need to download, check, and make sure that our computers don't get infected in case it's actual malware we wanted to protect you from. That's not feasible, sorry.
Author at Zettelkasten.de • https://christiantietze.de/
Thanks! Worked beautifully