Skip to content

Instantly share code, notes, and snippets.

@derickfay
Last active June 3, 2019 00:32
Show Gist options
  • Save derickfay/90dcdf00af0de326bb82 to your computer and use it in GitHub Desktop.
Save derickfay/90dcdf00af0de326bb82 to your computer and use it in GitHub Desktop.
Remove citation info. from text copied from Kindle for Mac
on alfred_script(q)
set quote to first paragraph of q
set otd to AppleScript's text item delimiters
set AppleScript's text item delimiters to {"(Kindle Locations ", ")"}
set bits to every text item of q
set pageNumber to item 3 of bits
set quote to first paragraph of q
return quoted form of quote & " (" & pageNumber & ")"
set AppleScript's text item delimiters to otd
end alfred_script
@derickfay
Copy link
Author

Updated to work with Kindle for Mac 1.26.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment