[SOLVED] Idea : Reader Mode #559
Replies: 6 comments 22 replies
-
Hello. Well, why not. You mean something like readablity? |
Beta Was this translation helpful? Give feedback.
-
Is it like Firefox's built-in Reader view? Which allows to simplify/clean the page's content, and to customize text to some extent (line height, column width, font, colour mode). If so, I'm not sure if it would fit in RSS reader, to be honest; in RSS Guard it's the work for "skin". For it to work properly, it would need keep state between all articles, otherwise it doesn't make sense if user would be obliged to toggle and tune the Reader view for each article. That is about "a general reader mode for all articles". As to "include in the internal browser", I think it would make some sense if it can be done. Here is an example of Reader view for this page https://www.w3schools.com/html/html_editors.asp |
Beta Was this translation helpful? Give feedback.
-
@F3000 Pls, reply. One more comment: The "reader mode" is not just about "stylling" of the article. AFAIK Readability.js also has some magic which removes "non-article" parts of website, transforms the actual "article" to be layouted better etc. When the HTML data is parsed with Readability, it returns pure HTML-formatted text, AFAIK stripped from custom CSS classes/formatting so this data can be for example displayed using style from active skin, and this would make sense to have implemented if I decide to implement "reader" mode. Also, note there are many "readability" libraries based on Node.js:
Also, there are many libs written in Python, but I would prefer perhaps Node.js (?) because RSS Guard already uses AdBlock component based on Node.js library, I would like to avoid add dependencies on other runtimes etc. It seems that mozilla's readability is probably the best OSS solution on the market tho. |
Beta Was this translation helpful? Give feedback.
-
Btw: Here is simple node.js script to run readable on HTML content. var rd = require('@mozilla/readability');
var fs = require('fs');
var jsd = require('jsdom');
var iconvlite = require('iconv-lite');
//var mrc = require('@postlight/mercury-parser');
var data = fs.readFileSync(0);
var encData = iconvlite.decode(data, "win-1250"); // utf-8 should be used, win-1250 just for my testing
var doc = new jsd.JSDOM(encData);
var article = new rd.Readability(doc.window.document).parse();
console.log(article['content']); Can be called like Something like this would essentially work on RSS Guard with not great amount of coding. |
Beta Was this translation helpful? Give feedback.
-
Yes. When article from feed is displayed, then yes, formatting is just better to be done by skin as it stands now, but when user clicks "URL" or just loads any other website in internal browser, then "readability.js" could be indeed useful, it could be even subsequently styled with skin's css. I still has this in my mind, did not forget about it. |
Beta Was this translation helpful? Give feedback.
-
OK, I reimplemented Node.js integration in RSS Guard which is now de-facto automatic. If node/npm binaries are detected (on Linux they are installed to At this point, the only opt-in node.js package needed is RSS Guard now by default installs packages in a local scope, to a OS-derived subfolder in RSS Guard's |
Beta Was this translation helpful? Give feedback.
-
Wouldn't it make sense to include in the internal browser a reading mode like chrome/safari ?
Or a general reader mode for all articles
Beta Was this translation helpful? Give feedback.
All reactions