subhamX / notion-easy-export

📘 Notion easy export converts your notion documents & databases into an ebook.
https://www.npmjs.com/package/notion-easy-export
Apache License 2.0
62 stars 4 forks source link

ePub support and workflow to automate moving content to Kindle #4

Open furqansafdar opened 1 year ago

furqansafdar commented 1 year ago

Excellent project, looking forward to seeing ePub support

The idea is similar as you mentioned in the Readme to automate the workflow moving the content from Notion to Kindle automatically. Any idea or article how this workflow can be implemented?

subhamX commented 1 year ago

Hi @furqansafdar; Thank you for the kind words. 🤗

  1. ePUB support: Strictly speaking it should be easy, but it requires a lot of manual testing to ensure that all notion blocks gets into the export in the desired format. (I've been procrastinating this feature a lot. Let me work on it 🤞).
  2. Automating to move the content from Notion to Kindle: There are many ways, I had a simple (custom) github action workflow to run everyday (at say, 1700 hrs) and perform the following actions: a. Use this notion-to-ebook package to get the pdf of the desired document. b. Now send an email (you can use sendgrid), to send the email to your kindle device.

Let me know if anything was unclear. Or if you want me to have the workflow setup in a public repository. 🙌

furqansafdar commented 1 year ago

Excellent, It would be really good to see ePUB support being added.

For the workflow, let me try that out myself and if i couldn't do it, I'll discuss it with you again. Btw, don't we require to change the token value for each run?

There was however another objective I was thinking about of syncing Notion content to OneNote for example for offline viewing. I know for sure that markdown content cannot easily fit or formatted well in OneNote but atleast it would allow contents accessibility in offline scenarios. Do you have any idea if this can be achieved?

subhamX commented 1 year ago

Btw, don't we require to change the token value for each run?

Usually websites don't let the token expire if it's being used regularly. I feel the same for Notion too. The last time I worked on it, the same auth token worked fine for more than 2 months. (After which I killed the workflow, as stopped using kindle. Nothing against kindle, it was just that I was done with the interviews. 🙂).

syncing Notion content to OneNote

That's interesting. We should be able to create the page using the HTML content in onenote. (Ref: https://learn.microsoft.com/en-us/graph/onenote-create-page). So we can do this one-way sync (from notion to onenote) by setting it as a workflow step. :)

furqansafdar commented 1 year ago

Sounds awesome, so formatting will not be an issue and yes one-way sync is fine as long as we can update the same page instead of creating new ones in OneNote.

CyrilNb commented 1 year ago

Hello, just wanted to say that I would love the ePub support feature!

furqansafdar commented 1 year ago

Any plans to enhance for one-way sync to OneNote as we discussed earlier?

subhamX commented 1 year ago

Hi. @furqansafdar, this package was never meant for that purpose. But you can setup a workflow (using GitHub action), use this package for auth, downloading relevant assets, etc and then get the one-way sync. https://github.com/subhamX/notion-to-ebook/issues/4#issuecomment-1365782434 shares on bit more on how to do it.

Give it a shot. If it doesn't work then, I can help you with it. Although, I don't have enough bandwidth because of my full-time work. 🥲

furqansafdar commented 1 year ago

Hi @subhamX,

Unable to setup workflow correctly to move contents to Kindle after many attempts as being new to GitHub Actions. Would you please provide the setup details placing it in a public repository if convinent for you?

subhamX commented 1 year ago

My apologies for the late reply. The task sounds interesting, but I don't think I currently have the bandwidth. Still, I will give it a shot this or the next weekend (no promises though 😥).

furqansafdar commented 1 year ago

Take your time, I have started to take up the idea further by learning TS. Anyhow, I am using VS Code now and trying to inspect the HTTP traffic through Fiddler but somehow it is not logging the traffic there even after setting the proxy to http://localhost:8888 in the VS Code for troubleshooting. Would you be able to tell how you normally do this inspection?

subhamX commented 1 year ago

Anyhow, I am using VS Code now and trying to inspect the HTTP traffic through Fiddler but somehow it is not logging the traffic there even after setting the proxy to http://localhost:8888/ in the VS Code for troubleshooting. Would you be able to tell how you normally do this inspection?

I usually do not use any such apps. Network tab in the browser is my goto tool. I do have the burp suite though, it comes handy in certain situations.

furqansafdar commented 5 months ago

My apologies for the late reply. The task sounds interesting, but I don't think I currently have the bandwidth. Still, I will give it a shot this or the next weekend (no promises though 😥).

Kept waiting for you on this, hope you have aquired some bandwidth to help me on setting up this :) Eariler I tried myself but couldn't succeed in setting up auto syncing notion pages to Kindle and therefore I forgot to follow up.

subhamX commented 4 months ago

Thank you for your patience. Unfortunately, my bandwidth hasn't quite expanded for side projects as much as I'd hoped. Still, let me try to get the root cause of the problem.

Let's keep ePub support out of discussion for now. What's the problem you're facing? notion-easy-export tool should be able to give you a pdf, and now all we need to do is to send an email with something like AWS SES.