Jump to content

Paste text from Kindle for Mac without full citation


dfay

Recommended Posts

The Kindle for Mac program allows you to copy text from most Kindle books, but it automatically adds the full citation info. to the clipboard.  For example, if you copy this sentence:

 

"I was never part of their awareness in the first place."

 
You'll get
 
"I was never part of their awareness in the first place.
 
Nagle, Robin (2013-03-19). Picking Up: On the Streets and Behind the Trucks with the Sanitation Workers of New York City (p. 16). Farrar, Straus and Giroux. Kindle Edition."
 
on your clipboard.
 
This workflow consists of a hotkey trigger and a short Applescript which cleans the clipboard so that it just consists of the copied passage and the page number, in parentheses.  So for the example above, the output would be:
 
'I was never part of their awareness in the first place.' (16)
 
 
As always, you'll need to set the hotkey.
 
updated 2019-06-02 to work with Kindle 1.26.1
Edited by dfay
Link to post
  • 4 years later...

Change the Run NSAppleScript content to

 

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

That fixed it for me. 

Link to post
  • 4 weeks later...
  • 3 months later...

For this to work for me I had to modify the script as follows;

The only downside is if there are brackets in the book, it won't bring the page number in correctly.

 

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 {"(",")"}
	set bits to every text item of q
	set pageNumber to item 2 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

 

Edited by bevankay
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...