Code Monkey home page Code Monkey logo

pinboard-to-kindle's Introduction

Raspberry Pi and Kindle

Pinboard to Kindle

Calibre recipe for sending unread Pinboard bookmarks to your Kindle.

➡️ Build your personal Read Later Service using Raspberry Pi

Table of Contents

Overview

  • Leverages a headless Firefox instance and Mozilla's readability library to fetch clutter- and ad-free article pages.
    • This results in eBooks with articles that look similar to Firefox's Reader View.
    • Pages with dynamic content (e.g. a page that loads images or text via JavaScript) can be fetched correctly.
    • Most images embedded in articles are fetched as well and will be part of the generated eBook.
  • Fetches only unread Pinboard bookmarks that have the tag kindle-to (per default up to 50 bookmarks).
  • When a Pinboard bookmark was successfully fetched, the tag kindle-to is replaced with the kindle-sent tag.
  • The tags kindle-to, kindle-sent and number of maximum bookmarks to fetch can be configured in pinboard-to-kindle.recipe.

Getting Started

Prerequisites

Prerequisite Version Comment
Git Any Required for cloning this repository.
Node.js 10 or later
NPM 5 or later
Calibre >= 5.0
Firefox 68 or later
Geckodriver 0.26.0 or later

Install Prerequisites on macOS

On macOS you can use Homebrew to install all prerequisites:

brew install git node geckodriver
brew cask install calibre firefox

Install Prerequisites on Debian/Ubuntu

On Debian and Ubuntu you can run this command to install all prerequisites except Geckodriver:

sudo apt-get install git nodejs npm calibre firefox-esr

Prebuilt Geckodriver binaries for x86 and x64 architectures can be downloaded here. Copy geckodriver for example to /user/local/bin, such that the geckodriver binary is in your PATH.

Installation

Clone this repository and cd into the cloned pinboard-to-kindle directory:

git clone https://github.com/christianhans/pinboard-to-kindle.git
cd pinboard-to-kindle

Set your Pinboard API token. Copy your token from this page and replace username:A3F...HG78 below with your actual token:

echo 'PINBOARD_TOKEN="username:A3F...HG78"' >> config.env

Usage

In order to generate an eBook optimized for Kindle Paperwhite run:

eval $(egrep -v "^#" config.env | xargs) ebook-convert pinboard-to-kindle.recipe pinboard.mobi --output-profile kindle_pw3

To generate an eBook in ePub format run:

eval $(egrep -v "^#" config.env | xargs) ebook-convert pinboard-to-kindle.recipe pinboard.epub

License

Distributed under the MIT License. See LICENSE for more information.

pinboard-to-kindle's People

Contributors

christianhans avatar dependabot[bot] avatar pyrho avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pinboard-to-kindle's Issues

Multi-page support

As it looks like readability is very unlikely to get any multi-page support I've implemented a quick version for now targeting only anandtech.com. If anyone else is interested in this support could they +1 this and provide an example URL? I'd prefer to get the support semi-flexible before requesting a merge.

Node.js v18

Just a note for possible users. Right now due to a selenium bug v18 Node.js support is broken.

Support epub's as well as mobi's

For future Kindle's may as well as move to epubs but for now could produce both based on a config option. Any thoughts about changing the default given Amazon's recent change of heart?

Provide a pre-built geckodriver binary

Hey there,

Thank you for this, I've been looking for something like this for quite some time and this is perfect!

I managed to get it up and running, but building geckodriver is a pain (requires installing rust and sitting through a long compilation, especially on a Pi).

Maybe you could host a pre-built binary of geckodriver for ARM in this repo for the people that don't want to bother (: .

I guess you have one, but if needed I can upload mine.

Thanks again !

Docker image for deployment to NAS / server

It would be great to have a Docker image so that it's easier to deploy this project to a NAS or home server to run periodically.

I'd be interested in contributing that if you'd be interested in having it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.