Skip to content

Instantly share code, notes, and snippets.

@umutbasal
Created September 12, 2021 13:22
Show Gist options
  • Save umutbasal/9855d79bfe8c238b409152a205e10b83 to your computer and use it in GitHub Desktop.
Save umutbasal/9855d79bfe8c238b409152a205e10b83 to your computer and use it in GitHub Desktop.
Download links as readable texts
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
@umutbasal
Copy link
Author

requires readability-cli and w3m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment