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

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.




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

Search: