Last active
October 14, 2021 16:21
-
-
Save gordonmeyer/ae28ed76addc21a42369054a32461e36 to your computer and use it in GitHub Desktop.
Clipboard HTML to MarsEdit Post (Keyboard Maestro)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<array> | |
<dict> | |
<key>Activate</key> | |
<string>Normal</string> | |
<key>CreationDate</key> | |
<real>652832276.61879897</real> | |
<key>Macros</key> | |
<array> | |
<dict> | |
<key>Actions</key> | |
<array> | |
<dict> | |
<key>MacroActionType</key> | |
<string>Comment</string> | |
<key>StyledText</key> | |
<data> | |
cnRmZAAAAAADAAAAAgAAAAcAAABU | |
WFQucnRmAQAAAC4dAgAAKwAAAAEA | |
AAAVAgAAe1xydGYxXGFuc2lcYW5z | |
aWNwZzEyNTJcY29jb2FydGYyNTgw | |
Clxjb2NvYXRleHRzY2FsaW5nMFxj | |
b2NvYXBsYXRmb3JtMHtcZm9udHRi | |
bFxmMFxmc3dpc3NcZmNoYXJzZXQw | |
IEhlbHZldGljYTt9CntcY29sb3J0 | |
Ymw7XHJlZDI1NVxncmVlbjI1NVxi | |
bHVlMjU1O1xyZWQwXGdyZWVuMFxi | |
bHVlMDt9CntcKlxleHBhbmRlZGNv | |
bG9ydGJsOztcY3NzcmdiXGMwXGMw | |
XGMwXGM4NDcwNlxjbmFtZSBjb250 | |
cm9sVGV4dENvbG9yO30KXHBhcmRc | |
dHg1NjBcdHgxMTIwXHR4MTY4MFx0 | |
eDIyNDBcdHgyODAwXHR4MzM2MFx0 | |
eDM5MjBcdHg0NDgwXHR4NTA0MFx0 | |
eDU2MDBcdHg2MTYwXHR4NjcyMFxw | |
YXJkaXJuYXR1cmFsXHBhcnRpZ2h0 | |
ZW5mYWN0b3IwCgpcZjBcZnMzMFxm | |
c21pbGxpMTUzNjQgXGNmMiB0byB1 | |
c2UgdGhpcyBjb3B5IEhUTUwgdG8g | |
dGhlIGNsaXBib2FyZC4gSXQgcGlj | |
a3Mgb3V0IHRoZSBmaXJzdCBIMSwg | |
c3RyaXBzLCBhbmQgb3BlbnMgYSBu | |
ZXcgTWFyc0VkaXQgcG9zdC4gVGhl | |
IEgxIGlzIHJlbW92ZWQgZnJvbSB0 | |
aGUgY2xpcGJvYXJkLn0BAAAAIwAA | |
AAEAAAAHAAAAVFhULnJ0ZhAAAADJ | |
EzphtgEAAAAAAAAAAAAA | |
</data> | |
<key>Title</key> | |
<string>read me</string> | |
</dict> | |
<dict> | |
<key>Action</key> | |
<string>IgnoreCaseRegEx</string> | |
<key>Captures</key> | |
<array> | |
<string></string> | |
<string>theTitle</string> | |
</array> | |
<key>MacroActionType</key> | |
<string>SearchRegEx</string> | |
<key>Search</key> | |
<string><h1>\s*(.*)<\/h1></string> | |
<key>Source</key> | |
<string>Clipboard</string> | |
</dict> | |
<dict> | |
<key>DisplayKind</key> | |
<string>Briefly</string> | |
<key>HonourFailureSettings</key> | |
<true/> | |
<key>IncludeStdErr</key> | |
<false/> | |
<key>MacroActionType</key> | |
<string>ExecuteAppleScript</string> | |
<key>Path</key> | |
<string></string> | |
<key>Text</key> | |
<string>tell application "Keyboard Maestro Engine" | |
set theTitleText to value of variable "theTitle" | |
end tell | |
tell application "MarsEdit" | |
activate | |
set foo to make new document | |
set title of foo to theTitleText | |
end tell</string> | |
<key>TimeOutAbortsMacro</key> | |
<true/> | |
<key>TrimResults</key> | |
<true/> | |
<key>TrimResultsNew</key> | |
<true/> | |
<key>UseText</key> | |
<true/> | |
</dict> | |
<dict> | |
<key>Action</key> | |
<string>IgnoreCaseRegEx</string> | |
<key>Destination</key> | |
<string>Clipboard</string> | |
<key>MacroActionType</key> | |
<string>SearchReplace</string> | |
<key>Replace</key> | |
<string></string> | |
<key>Search</key> | |
<string><h1>\s*(.*)<\/h1></string> | |
<key>Source</key> | |
<string>Clipboard</string> | |
</dict> | |
<dict> | |
<key>MacroActionType</key> | |
<string>Pause</string> | |
<key>Time</key> | |
<string>1</string> | |
<key>TimeOutAbortsMacro</key> | |
<true/> | |
</dict> | |
<dict> | |
<key>KeyCode</key> | |
<integer>48</integer> | |
<key>MacroActionType</key> | |
<string>SimulateKeystroke</string> | |
<key>Modifiers</key> | |
<integer>0</integer> | |
<key>ReleaseAll</key> | |
<false/> | |
<key>TargetApplication</key> | |
<dict/> | |
<key>TargetingType</key> | |
<string>Front</string> | |
</dict> | |
<dict> | |
<key>MacroActionType</key> | |
<string>SelectMenuItem</string> | |
<key>Menu</key> | |
<array> | |
<string>Edit</string> | |
<string>Paste HTML Source</string> | |
</array> | |
<key>TargetApplication</key> | |
<dict> | |
<key>BundleIdentifier</key> | |
<string>com.red-sweater.marsedit4</string> | |
<key>Name</key> | |
<string>MarsEdit</string> | |
<key>NewFile</key> | |
<string>/Applications/MarsEdit.app</string> | |
</dict> | |
<key>TargetingType</key> | |
<string>Specific</string> | |
</dict> | |
</array> | |
<key>CreationDate</key> | |
<real>652826277.77170599</real> | |
<key>ModificationDate</key> | |
<real>652888904.540622</real> | |
<key>Name</key> | |
<string>Clipboard HTML to MarsEdit post</string> | |
<key>Triggers</key> | |
<array> | |
<dict> | |
<key>MacroTriggerType</key> | |
<string>StatusMenu</string> | |
</dict> | |
</array> | |
<key>UID</key> | |
<string>8B362ABB-A475-4E9F-9D84-B7F69F93AF19</string> | |
</dict> | |
</array> | |
<key>Name</key> | |
<string>Ulysses</string> | |
<key>Targeting</key> | |
<dict> | |
<key>Targeting</key> | |
<string>Included</string> | |
<key>TargetingApps</key> | |
<array> | |
<dict> | |
<key>BundleIdentifier</key> | |
<string>com.ulyssesapp.mac</string> | |
<key>Name</key> | |
<string>Ulysses</string> | |
<key>NewFile</key> | |
<string>/Applications/UlyssesMac.app</string> | |
</dict> | |
<dict> | |
<key>BundleIdentifier</key> | |
<string>com.red-sweater.marsedit4</string> | |
<key>Name</key> | |
<string>MarsEdit</string> | |
<key>NewFile</key> | |
<string>/Applications/MarsEdit.app</string> | |
</dict> | |
</array> | |
</dict> | |
<key>ToggleMacroUID</key> | |
<string>C579F261-FB4D-4CCB-9E0F-3BB2FA7D205E</string> | |
<key>UID</key> | |
<string>2E09E15B-0FD0-453B-AB2A-EB4046E3E4BE</string> | |
</dict> | |
</array> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For info about this macro, see: https://www.gordonmeyer.com/2021/10/automating-ulysses-to-marsedit-hand-off.html