Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/osascript
- on readFile(unixPath)
- set foo to (open for access (POSIX file unixPath))
- set txt to (read foo for (get eof foo))
- close access foo
- return txt
- end readFile
- on run argv
- set unixPath to item 1 of argv
- do shell script "sed 's/$/<br>/' '" & unixPath & "' > /tmp/tmp"
- set bodytext to readFile("/tmp/tmp")
- do shell script "rm -f /tmp/tmp"
- tell application "Notes"
- tell account "iCloud"
- make new note at folder "Notes" with properties {name:unixPath, body:bodytext}
- end tell
- end tell
- end run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement