omnivore-app / omnivore

Omnivore is a complete, open source read-it-later solution for people who like reading.
https://omnivore.app
GNU Affero General Public License v3.0
12.35k stars 623 forks source link

Send to Kindle #2142

Open I7T5 opened 1 year ago

I7T5 commented 1 year ago

Same feature as with Instapaper. But it would be better if, Omnivore could convert docs to cleaner format and having the option to send either a compilations or a specific doc (with or without cover image) to Kindle.

jacksonh commented 1 year ago

yeah good feature, definitely a lot we could do here by converting to epub on the backend

kebot commented 1 year ago

Would like to help here, format the html with https://www.npmjs.com/package/sanitize-html and then put it into https://www.npmjs.com/package/epub-gen-memory will do the basic work. I have written a script with graphql api to do that for my own use.

The next question will be which article should be send to Kindle and when to send?

Here's setting from Instapaper:

image
jacksonh commented 1 year ago

hey @kebot our content should already have sanitize-html run on it, do you want to share your script here and we can discuss how to add it to Omnivore?

kebot commented 1 year ago

@jacksonh You can fill in the OMNIVORE_API_KEY and run the script with Deno

deno run -A gen-epub.ts

https://gist.github.com/kebot/90de9c41742cacf371368d85870c4a75

jacksonh commented 1 year ago

oh thank you, somehow i missed this reply. Going to test it out.

jacksonh commented 1 year ago

Nice, tested this script out a bit and it works quite well. I really like the idea of chapters. Going to see how i can integrate this into our backend

shsprivate commented 1 year ago

@jacksonh @kebot this looks amazing! I'm going to try it out as well! You guys do great work.

linnabraham commented 1 year ago

@jacksonh You can fill in the OMNIVORE_API_KEY and run the script with Deno

deno run -A gen-epub.ts

https://gist.github.com/kebot/90de9c41742cacf371368d85870c4a75

Thanks. This code works and pulls down my unread articles. But it only pulls down 5 articles or so. Where is this limit hardcoded? How can I ask it to download all of my unread?

corsair20141 commented 1 year ago

Is this feature going to be added to Omnivore? Would love to switch from Instapaper to Omnivore for the Obsidian integration and the ability to send individual articles to kindle instead of combined multiple articles per day

agrmohit commented 1 year ago

@linnabraham It looks like the number of articles is an optional paramenter not included in the script. By default it downloads 10 articles for me. You can modify it as shown to download more.

diff --git a/gen-epub.ts b/gen-epub.ts
index e1ec1b2..a0ce6b6 100644
--- a/gen-epub.ts
+++ b/gen-epub.ts
@@ -15,7 +15,7 @@ const graphQLClient = new GraphQLClient(OMNIVORE_ENDPOINT, {
 async function getUnreadArticles() {
   const query = gql`
     {
-      articles {
+      articles(first: 100) {
         ... on ArticlesSuccess {
           edges {
             cursor
linnabraham commented 1 year ago

@agrmohit Thank you...So far so good.. Does images work for you? Except for that the book is coming out to be very nice.

agrmohit commented 1 year ago

The sanitize-html npm package filters out images by default. I have enabled images and made some other change in my fork if you are interested.

ment4list commented 9 months ago

Just wanted to quickly chime in to say I've been using Omnivore for a while now and wanted to add this Send to Kindle feature for myself. I've recently discovered ScriptKit and love it!

(First I thought the script from @kebot would be a perfect fit for Val.town but, unfortunately, the generated epub can't be saved and thus I can't attach it via mail. Maybe there is a way..)

Regardless, using ScriptKit I can trigger it manually or on a schedule! Everything's working and the generated epub gets saved! Just need to figure out the send to email part.

Thanks for Omnivore and thanks for the epub script!

Edited to add gist to the ScriptKit script

kebot commented 9 months ago

Instead of send to kindle. If you have a new Kindle with the latest firmware (which supports modern web technology). I have build an alternative web client for that. You can try it on https://reink.app or repo(https://github.com/kebot/reink.app). I only tested it with my Kindle Scribe and my computer.

DanielChesters commented 7 months ago

Hello,

I actually use Wallabag and I use the EPUB export functionality often. I cannot consider migrate to Omnivore without this.

Any hope for an EPUB document export or a Send to Kindle (since Amazon support EPUB sending to Kindle by mail) functionality?

esoxjem commented 5 months ago

Hi folks! Is there any update on this?

mgaitan commented 2 weeks ago

Hey there, I developed a small Python script that generates an ebook fetching the content from Omnivore (with options to filter by dates and labels) + a GitHub Action workflow to automatically send the "last day" book to my Kindle via email: https://github.com/mgaitan/omnivook . Feel free to clone it and adapt to your needs.

It's quite simple, but it gets the job done.

mgaitan commented 1 day ago

FYI, I've made some improvements to omnivook. It’s now packaged as a proper tool and available on PyPI. It can be executed directly with uv (the most modern and secure way to manage Python-based tools that use a virtual environment in the background).

If you just want to create an EPUB of your daily readings and have uv installed, you can run:

OMNIVORE_APIKEY=<key> uvx omnivook

Additionally, the option to use Github Actions to run the tool and send the EPUB by email is still available (you need to clone the repo and configure your secrets).

I appreciate any feedback and pull requests if someone finds it useful.