page2pdf

Read-later with send2kindle

Apart from securing noodle cup lid, I use Kindle for read-later. You could already find lots of good tools for read-later, like ‘Instapaper’, ‘Pocket’, ‘Send to Kindle’ from Amazon, etc. Pity that they could not perfectly meet my requirements, especially these points:

So, I created send2kindle. With send2kindle, if there’s a web page I would like to read later with Kindle, what I need to do is to type the following command in my terminal. Once related Github Action job’s done and Kindle’s synced, the web page would appear, as a PDF, on my Kindle, ready for reading.

$ s2k <url>

Here’s what happened after I entered with $ s2k https://gniquyij.github.io

kindle

In brief, my enter triggered a Github Action job using cURL which is triggered when the ‘types’ of repository_dispatch is ‘send2kindle’.

2 setups beforehand:

  1. Fork page2pdf. Include your email, email password, kindle email as secrets. Secret names need to be EMAIL, EMAIL_PASSWORD, and KINDLE_EMAIL. Your Github Action job would refer to them by these names. github-secrets

  2. Clone page2pdf

    $ git clone https://github.com/gniquyij/page2pdf.git
    

    Update ./exmaples/send2kindle/init with your Github username, Github personal access token, and page2pdf path. Then

    $ cd page2pdf
    $ cd ./exmaples/send2kindle/
    $ cat init >> $HOME/.bash_profile
    

    Notice that your Github personal access token should be able to access repo and workflow. Below is mine. github-personal-access-token

That’s it! Hope it helpful to you and please do not hesitate to contact me if any comments/questions/ideas.

© 2018-2020 by YUQING JI
About | Blog | Email | Github | 中文