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
#coding: utf-8 | |
''' | |
Editorial Macro | |
Construct a markdown URL string - sensitive to the contents of the clipboard and selected text | |
- Ask whether the clipboard is to be used - you dont know what's in there | |
- check whether it's a URL and react accordingly | |
- if an area is selected and there is also something in the clipboard then the clipboard | |
takes precedence as it's been chosen | |
''' |
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
#!/bin/bash | |
for file in test1.txt test2.jpg | |
do | |
url="omnifocus:///add?name=${file}&attachment-name=${file}&attachment=" | |
base64str=$(base64 -w 0 $file) | |
urlencstr=$(php -r "echo rawurlencode('${base64str}');") | |
url="${url}${base64str}" | |
open $url |
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
### Keybase proof | |
I hereby claim: | |
* I am stubevan on github. | |
* I am meesmees (https://keybase.io/meesmees) on keybase. | |
* I have a public key ASAu87GQNnllmdncslL8IgO2oBWPZW50H2tnCpLj-op-Ygo | |
To claim this, I am signing this object: |