-
-
Save sfunke/217ba7f9df05fea8607df55b33c996f0 to your computer and use it in GitHub Desktop.
copying the link of apple note into clipboard - macos
This file contains hidden or 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 | |
export LC_ALL=en_US.UTF-8 | |
noteId=$(osascript -e 'tell application "Notes" | |
set noteID to «class seld» of (selection as record) | |
get noteID | |
end tell' | cut -d/ -f5 | cut -c2-) | |
echo "SELECT '['||note.ztitle1||'](applenotes:note/'||note.zidentifier||')' FROM ziccloudsyncingobject AS note WHERE note.z_pk = $noteId;" | | |
sqlite3 ~/Library/Group\ Containers/group.com.apple.notes/NoteStore.sqlite | | |
pbcopy | |
@ys-qb | |
Author |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment