This commit is contained in:
Raymundo Vásquez Ruiz
2019-12-01 19:55:19 +01:00
parent db783b92af
commit b62e260b24
460 changed files with 21878 additions and 4341 deletions

View File

@@ -0,0 +1,27 @@
on mktemp()
return do shell script "mktemp -t md"
end mktemp
try
-- set appname to name of (info for (path to frontmost application))
set tmpfile to mktemp() & ".md"
set mods to {control down, option down, shift down, command down}
tell application "System Events"
keystroke "a" using {command down}
delay 0.1
keystroke "c" using {command down}
delay 0.1
set txt to Unicode text of (the clipboard as record)
end tell
do shell script "pbpaste | ~/.cabal/bin/pandoc --from=html --to=markdown > " & quoted form of tmpfile
do shell script "echo " & (quoted form of (path to frontmost application as text)) & " > " & tmpfile & ".meta"
-- do shell script "emacsclient --eval '(setq markdown-paste-app: " & (path to frontmost application as text) & ")'"
delay 0.1
tell application "Emacs"
open (POSIX file tmpfile as string)
activate
end tell
end try