Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
book

GitHub Action

Kindlefy

v1.3.3

Kindlefy

book

Kindlefy

Send diverse contents to your Kindle

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Kindlefy

uses: gbkel/kindlefy@v1.3.3

Learn more about this action in gbkel/kindlefy

Choose a version

icon example

Send diverse contents to your Kindle πŸ“šοΈ

typescript

πŸ“Œ Overview

That's a way to automatically sync data with your kindle, such as RSS feeds, manga, and too much more.

🎩 Getting Started

This repository is a Github Action so you can configure a cron job with Github Actions to run it and sync the contents with your kindle in the way to prefer.

Below you can see an example of a configuration yaml that syncs contents with kindle every day at midnight (be aware to pass the sender credentials as github secrets to avoid exposing it to the public):

on:
  schedule:
    - cron: '0 0 * * *'

jobs:
  kindlefy:
    runs-on: ubuntu-latest
    name: Sync kindle contents.
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Kindlefy
        uses: gbkel/kindlefy@v1.3.3
        with:
          kindle_email: 'test@kindle.com'
          sender: '[{ "type": "gmail", "email": "test@gmail.com", "password": "password" }]'
          sources: '[{ "type": "manga", "name": "One Piece" }, { "type": "rss", "url": "https://dev.to/feed" }]'
          storage: '[{ "type": "local", "githubAccessToken": "${{ secrets.GITHUB_TOKEN }}" }]'
          no_duplicated_sync: true

Sender

We recommend you to create a new email to use as a sender since some services need to disable extra auth in other to be able to send emails by smtp.

For now we have the current senders available:

Gmail

In order to use Gmail, you need to Disable Unlock Captcha, Disable Two Factor Auth, Enable Less Secure Apps Access.

{
	"type": "gmail",
	"email": "youremail@gmail.com",
	"password": "yourpassword"
}

Outlook

{
	"type": "outlook",
	"email": "youremail@outlook.com",
	"password": "yourpassword"
}

SMTP

{
	"type": "smtp",
	"email": "youremail@mail.com",
	"host": "host",
	"user": "user",
	"password": "password",
	"port": "port"
}

Source

For now we have the following sources available to import contents to kindle (the contents usually come in descending creation order):

Manga

{
	"type": "manga",
	"name": "some manga name",
	"count": 1 // Most recent chapters count
}

RSS

{
	"type": "rss",
	"url": "url"
}

Storage

In case you want to avoid duplicated sync, you can use a storage to save sync history. After adding a storage config, you need to set the 'no_duplicated_sync' environment variable to true in order to use it. Currently we have the following storages:

Local

It saves the sync history inside the repository this action is currently running on. You need to give Kindlefy a github access token in order to edit the repository, usually when we are using a Github Action, it automatically sets up a variable called 'GITHUB_TOKEN' on the build context that can be used as shown in the .yml example in the start of the readme.

{
	"type": "local",
	"githubAccessToken": "github access token"
}

πŸ•‹ Features

  • Send to Kindle by Gmail.

  • Send to Kindle by Outlook.

  • Send to Kindle by a generic SMTP Server.

  • Import Manga.

  • Import RSS Feed.

  • Import Full Medium RSS Feeds.

  • Use a database to persist sync history and avoid data duplication on kindle (such as using MongoDB, Github Repository, etc).

  • Choosing which collection to put the documents.

  • Sending more than one document per mail.

  • Using an own Docker Image (builded with the Dockerfile inside this repo) to improve action speed.

πŸ”§ Technologies

  • Typescript
  • Husky
  • Lint Staged
  • ESLint
  • Git Commit Message Linter
  • Cheerio
  • Nodemailer
  • Calibre

πŸš€ Development Environment

You just need to clone this repository inside your machine and run the following commands:

npm install
npm run dev

Obs:

  • It is needed to have Calibre installed locally.