Store web articles as plain text. No more 'saved as' HTML (aka cURL:d) or 'printed as PDF', just extracted content in markdown, without all annoying markup that isn't content.
Store web articles as plain text. No more ‘saved as’ HTML (aka cURL:d) or
‘printed as PDF’, just extracted content in markdown, without all annoying markup.
python cleader.py http://iamnearlythere.com/what_i_want_from_an_api/ | wc -c
python cleader.py --save http://iamnearlythere.com/what_i_want_from_an_api/
creates the file ‘what_i_want_from_an_interface.md’
python cleader.py http://iamnearlythere.com/what_i_want_from_an_api/ | markdown_py > what_i_want_from_an_api.html
This example requires ‘pip install markdown’ and is almost what html2text
does, but, again, cutting away all the cruft that’s not the main article’s content.
echo 'function save() { python cleader.py "$1" --save=~/favorites }' >> ~/.bashrc && . ~/bashrc
After that setup, this CLI call:
save http://iamnearlythere.com/what_i_want_from_an_api/
would create ~/favorites/what_i_want_from_an_interface.md for you
to keep around forever and ever.
ls -t1 ~/favorites | head -n 5
grep -ic css ~/favorites/* | head -n 5
head -n 10 ~/favorites/* | less
Read or post issues at https://github.com/chelmertz/cleader
Email [email protected]