Datestamping in MacOS
Mar. 7th, 2022 11:15 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
Okay, I finally figured out how to make a nigh-universal (~all app) keystroke command which will plop the current date stamp, in the format of my chosing, wherever the cursor is.
This was a ridiculous amount of effort.
But as of right now, I have a service in Users/$me/Library/Services/PutDate that I have mapped to the Keyboard Shortcut (in System Preferences > Keyboard > Shortcuts) shift-option-Apple-d. Works fine.
Internally, it's pretty grody. Apparently if you want a date and a time, the only way to concatenate them into the same string is by calling out to a... shell script? Or so saith this discussion on discussions.apple.com.
This other discussion on discussions.apple.com shows exactly what I want to do, but doesn't actually work in practice because of an apparently unresolveable permissions error. Apparently when it says "any such application" what it means is any application you want this to work in has to be manually granted the permission to run the script in the sys prefs, which ha ha ha, omg no.
At least doing it the other way, I get to format the date/time to my liking!