Created
September 12, 2021 13:22
-
-
Save umutbasal/9855d79bfe8c238b409152a205e10b83 to your computer and use it in GitHub Desktop.
Download links as readable texts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
files=$(ls | grep "txt") | |
for file in $files; | |
do | |
links=$(cat ${file}) | |
for link in $links; | |
do | |
folder=${file//\.txt/} | |
saveName=$(echo $link | sed -e 's/http.*\///g') | |
readable $link | w3m -T text/html -dump > "$folder/$saveName.txt" | |
echo "$folder/$saveName" | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
requires readability-cli and w3m