Demonstrate HN: Aid your saved articles to a Kindle

81
Demonstrate HN: Aid your saved articles to a Kindle

I attach articles into HTML recordsdata with TagSpaces or SingleFile to read them later but I couldn’t salvage a design to wait on them effortlessly to a Kindle Paperwhite and browse them there.

This venture wait on HTML recordsdata (and some extra) saved to your pc with a UI factual for Kindle web browser. On top of that, it consist of a Read Mode (attributable to ReadabiliPy) to camouflage the text in a happy size with out need to exercise the ‘Article Mode’ in Kindle web browser.

This app does now not exercise Javascript or any database (the recordsdata themselves are the database). To wait on the file it uses Whitenoise, so it does now not need a nginx o apache server.

Disclaimer: I exercise this app handiest accessible in my LAN, working
flask creep -h 192.168.1.100 -p 8000 is ample for my exercise case. If you wish a public instance over the Cyber web, please setup a appropriate web server.

Demo


Kindleserver.Demo-2.mp4


Set up

git clone https://github.com/edgartaor/kindleServer.git
cd kindleServer
pip install -r requirements.txt
flask creep -h 0.0.0.0 -p 8000

Major: In the config.py file replace SAVED_WEBPAGES_DIR to the trail the build the HTML recordsdata are kept.

Customise

Which that you would be capable of customise some aspects within the config.py file.

# The recordsdata that are gonna be listed, 
# compatibility relies on the browser and the machine
# Veritably if a file it is now not relish minded within the browser
# this could perhaps advised to glean 
# Kindle Paperwhite at notify can glean .AZW, .PRC and .MOBI with the catch browser
# and can camouflage html and txt (pdf is now not relish minded though)
# utterly different recordsdata had now not being tested
FILE_TYPES_ALLOWED = ('html', 'txt', 'md', 'pdf', "azw3", "azw",
                        'prc', 'mobi')

# Files that are relish minded with the Read Mode
# It enhance html recordsdata and any easy text recordsdata
READ_MODE_FILES_COMPATIBLE = ('html', 'txt', 'md')

# Direction the build the webpages are saved
SAVED_WEBPAGES_DIR = "/mnt/c/Users/Edgar/Documents/Saved webpages/"

# Collection of recordsdata to camouflage per web page
PER_PAGE = 10

# SORT_BY recommendations are 
# 'CREATION'=Advent date
# 'MODIFIED'=Remaining modification date
# 'FILENAME'=Alphabetical bid
SORT_BY = 'CREATION'

# Reverse the bid of the recordsdata after being sorted
REVERSE_ORDER = Moral

# Role USE_READABILITY to Moral whereas you happen to could perhaps relish got a nodejs instance place in
# If mozilla/readability is now not found this could perhaps fallback to a pure-python parser incorporated in ReadabiliPy
# https://github.com/alan-turing-institute/ReadabiliPy#set up 
USE_READABILITY = Moral

Which that you would be capable of additionally customise the font size, font family and any aspect within the temp

Read More

Charlie Layers
WRITTEN BY

Charlie Layers

Fill your life with experiences so you always have a great story to tell