Demonstrate HN: Aid your saved articles to a Kindle

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 -p 8000 is ample for my exercise case. If you wish a public instance over the Cyber web, please setup a appropriate web server.



Set up

git clone
cd kindleServer
pip install -r requirements.txt
flask creep -h -p 8000

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


Which that you would be capable of customise some aspects within the 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

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

# Reverse the bid of the recordsdata after being sorted

# 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
# up 

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

Read More

Charlie Layers

Charlie Layers

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