Safari has a "Reader Mode" which removes everything from a website with an article but the text. Does anyone know of an open source library which provides the same functionality? Or, do you think it would be difficult to implement?
Tap the Reader View icon in the top left of Safari. Select Website Settings from the dropdown menu. Turn on the toggle for Use Reader Automatically and press Done. The webpage will now automatically switch to Reader View every time you open it.
In the Safari app on your Mac, click the Reader button at the left end of the Smart Search field. The button appears only if the web page has an article that Reader can show. To stop using Reader, click the Reader button again or press Esc.
The Reader mode, built into Apple's Safari browser since 2010 and available on macOS and iOS, strips away web advertisements and the page's navigational design to present an article's text and basic images in a clean and uncluttered format.
You can use Safari Reader to view a webpage article in one page, formatted for easy reading, and presented without ads, navigation, or other distracting items. You can adjust font, font size, and background color for Reader.
Safari's reader mode is based upon Arc90's Readability(the original, not current, one), which is Apache-licensed. Here's a PHP port of it. Some more searching will probably turn up various other languages. (You didn't really specify where you were asking about implementing.)
I'm aware of the licencing issue about my post might raise here, but it's Apple and their policies are philosophically contestable. So, for the common good & research :
Safari JS reader source: https://github.com/amumu/safari-reader-js
How to get the latest version from Safari is explained in the README.
If you really want an open source Version, user the other posts, they're all good.
Cheers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With