Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

  $ curl -s 'https://www.economist.com/united-states/2022/11/24/why-its-hard-to-buy-deodorant-in-manhattan' | grep articleBody | jq -r .articleBody 2>/dev/null | fmt


Best trick on HN today.


good trick, but it really highlights how thin the article is.


As it happens, you don't need much content to convince people that petty criminals are scum and the only solution is more and meaner cops and prisons. After all, the retail lobby says so!


curl -s 'https://www.economist.com/united-states/2022/11/24/why-its-h...' | grep articleBody | jq -r .articleBody 2>/dev/null | paps --font=ETBembo | open -fa Preview


Instead of `paps`, you could also try

  ... | sed -re 's/$/\n\n/' | uniq | man -Tps -l - | ...
If you have groff, you can also have `man` go straight to PDF.


I chose paps over enscript or groff because it handles utf8. With groff you get garbage like âshrinkâ, and enscript generates "Buttons marked â\200\234call for assistanceâ\200\235".

Fun times


I'll remember this if I ever recreate my RSS to five-column-PDF-emailed-to-myself-every-morning setup. I had to do some ungood things to make BBC articles safe for LaTeX back then.


You just taught me something




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: