Hacker News new | ask | show | jobs
by aplorbust 3034 days ago
Maybe try something like this, if adblocker is failing

    1. curl -o 1.htm http://www.electronicdesign.com/embedded-revolution/ryzen-boards-reign-embedded-world-2018

    2. sed -i '/<p>/,/<\/p>/!d' 1.htm

    3. firefox file:///1.htm
1 comments

What is the purpose of the sed?
Specifically, it modifies the file in place (-i), Matches lines between paragraph tags(/PatternStart/,/PatternEnd/), Then, doesn't delete those lines matching the pattern range (!d), which has the effect of deleting all other lines outside the pattern range when passed the in-place argument.
Being partially sed stupid myself (or just plain stupid), I think its supposed to pull only the text between paragraph tags and save that to an htm file; then launch firefox and display that file, giving you only the pertinent text of the article (sans ads)
Remove Javascript and links to Javascript files that load ads, etc.

Preserve only the desired content: text describing the boards, links to manufacturers websites, links to images.

Looks like it is deleting everything not contained in paragraph tags.