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 comment
  • 4 years later...

Thanks for this script, but it seems like it no longer works for the latest version of Kindle on Mac (1.26.1)... I imagine something may have changed in the last four years.

 

If someone has an updated script, it would be much appreciated.

Link to comment

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 comment
  • 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 comment
  • 1 year later...
  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...