Skip to content
offware-appsPublic

About

Fetch web pages, PDFs and feeds into a folder any e-reader reads offline

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

ink-drop

Web pages, PDFs and feeds, fetched into one folder that any e-reader reads offline.

ink-drop is a set of small command-line stages. Each one does a single job and hands its result to the next through a plain folder, whose shape is the folder contract. The finished folder is the library: sync it to a Boox, a Kobo or any tablet with whatever already syncs there, Syncthing, WebDAV or a USB cable. Reading needs no network.

The French Wikipedia article on electronic paper, on the left as the web serves it and on the right as the EPUB the three stages made from it. Both are headless Chromium at 600×800, the EPUB page in greyscale with a serif stylesheet standing in for an e-ink reader's. Text CC BY-SA 4.0, photo in the public domain.

The Wikipedia page with its menus, tabs and language picker, beside the EPUB holding only the title, the source link, the photo and the article text

Each stage reads one line at a time on stdin, a URL for ink-fetch and ink-feed and an item path for the others, and prints the paths it wrote. -to sets the folder it writes to: ink-fetch, ink-feed and ink-readable default to ink-drop/<stage> under the user cache folder, and ink-epub needs it.

TL;DR

# 1. Build every stage
go build -o bin/ ./cmd/...
# 2. Turn one article into an EPUB in the library
echo https://example.org/post | bin/ink-fetch | bin/ink-readable | bin/ink-epub -to ~/Books
# 3. Turn the new posts of one site's feed into an EPUB digest
echo https://go.dev/blog/ | bin/ink-feed | bin/ink-epub -to ~/Books

ink-feed takes a feed's address or a site's: given a page, it follows the first feed the page names in a link tag. Nothing fetches feeds on its own: docs/schedule.md sets up an hourly run that the user enables.

Stages

Stage Job State
ink-fetch Downloads each URL into the work folder Built
ink-readable Strips each HTML item down to its article Built
ink-epub Packs each HTML item into an EPUB in the library Built
ink-feed Turns each RSS or Atom feed into one digest item Built
ink-mirror Crawls one site into a single HTML item Not built

A PDF needs no conversion: ink-readable passes it through and ink-epub copies it into the library. ink-fetch inlines a page's images, so every later stage runs offline.

Rules

ink-drop is a tool block under article VIII of the Offware constitution: it runs outside any app and feeds one through plain files. constitution.md checks it against every article.

License

AGPL-3.0.

About

Fetch web pages, PDFs and feeds into a folder any e-reader reads offline

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages