![]() |
#1 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Apr 2013
Device: Kindle Paperwhite
|
![]()
After inspecting the code of the Send to Kindle extension I discovered that it generates complete EPUB files and uploads them to S3 for further processing.
Therefore, the code can be modified to download the file to disk instead of uploading it to the cloud. This modification may prove useful for individuals who sideload their ebooks but still want to utilize the extension for web articles, etc., particularly considering the unresolved Amazon bug that wipes out sideloaded ebooks upon connecting to the network. To implement this modification, follow these steps: 1. Locate the extension code on your system. For example, on my system, it resides in: Code:
C:\Users\<Profile>\AppData\Local\Google\Chrome\User Data\Default\Extensions\cgdjpilhipecahhcilnafpblkieebhea 3. Remove the original extension from your browser. 4. In the copied folder, locate the manifest.json file and remove the "differential_fingerprint" key. Save the file. 5. Next, find the file named s2k-worker.js. Open it and search for the function called "sendWorkflow". Right after the "try {" statement, add the following lines: Code:
const dataURI = `data:application/octet-stream;base64,${documentMetadata.epubString}`; chrome.downloads.download({ url: dataURI, filename: 'download.epub' }); Code:
throw new Error(); You can now use the extension as before. When you click "Send," you will be prompted to save the EPUB file. |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,639
Karma: 26963509
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
|
Why not just use one of the extensions that converts (web articles etc) to ePub directly?
|
![]() |
![]() |
![]() |
#3 |
Fool
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 407
Karma: 3557934
Join Date: Feb 2003
Device: Kindle: Voyage,PW1,KOA, Kobo: Clara Colour, Nook GLP, Pocketbook verse
|
That's cool.
It would be nice if there is a way to have Calibre send epubs to Kindle using Send to Kindle, instead of email. Do you think that you've learned enough about the Send to Kindle extension that there is a way to do that? |
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,639
Karma: 26963509
Join Date: Apr 2009
Location: USA
Device: iPhone 15PM, Kindle Scribe, iPad mini 6, PocketBook InkPad Color 3
|
Quote:
OpenAudible has a way of registering with Audible: it uses an in-app web browser to login to Audible and after that it's 'trusted' to download AAX. Maybe some approach like that would work with calibre too. OpenAudible is open source so it's there for borrowing code. |
|
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Apr 2013
Device: Kindle Paperwhite
|
|
![]() |
![]() |
![]() |
#6 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Apr 2013
Device: Kindle Paperwhite
|
Further down that "sendWorkflow" function there is code that fetches a pre-signed URL for S3 upload and then uploads the file to S3. Then I suppose it gets picked up and put in the conversion and distribution pipeline. To wire it up with Calibre it would require a plugin I guess.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Send new custom extension as a book format to device | nami | Devices | 1 | 03-07-2024 07:57 AM |
Chrome 73 and Send To Kindle extension | hius07 | Amazon Kindle | 2 | 03-15-2019 01:54 PM |
Send to Kindle iOS extension not working | twowheels | Amazon Kindle | 3 | 02-13-2019 09:50 PM |
Chrome Browser and send to Kindle extension | janrey | Amazon Kindle | 14 | 12-08-2011 02:50 PM |
Send websites / links to Kindle - extension for browser? | scenox | Kindle Developer's Corner | 0 | 12-20-2010 12:23 PM |