Skip to content

Instantly share code, notes, and snippets.

@olirip
Created June 29, 2021 15:12
Show Gist options
  • Select an option

  • Save olirip/392470e6c092dc977f3bd3ee29ac735d to your computer and use it in GitHub Desktop.

Select an option

Save olirip/392470e6c092dc977f3bd3ee29ac735d to your computer and use it in GitHub Desktop.
A simple script adding the necessary header to markdown files for the Publish Static Site Generator by John Sundell
-- A simple script adding the necessary header to markdown files for the Publish Static Site Generator by John Sundell
-- IA Writer as to be open, should work with other markdown software
set formattedDate to (do shell script "date +'%Y-%m-%d %H:%M'")
set s to "---" & return & "date: " & formattedDate & return & "description: " & return & "tags: " & return & "---" & return & return & "# "
tell application "iA Writer"
activate
delay 0.2
make new document
delay 0.2
tell application "System Events" to keystroke s
end tell
-- olirip @2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment