commit ecbae264755259743fc6e501600e7c1ea60f35d8
parent c437fbd17d270491523693cb71cb0fe0fff0f27d
Author: Anders Damsgaard <andersd@riseup.net>
Date: Sun, 31 Dec 2017 13:07:00 -0500
Add functions for launching text-only news sources in torify+w3m
Diffstat:
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/links/.zshrc b/links/.zshrc
@@ -132,6 +132,19 @@ function w3mtor {
function w3mddg { torify surfraw ddg $@ }
function weather { curl 'wttr.in/?m'; }
function define { curl --silent dict://dict.org/d:$1 }
+function news {
+ local url
+ if [ $# -eq 0 ]; then
+ url="https://text.npr.org"
+ elif [ "$1" = "npr" ]; then
+ url="https://text.npr.org"
+ elif [ "$1" = "cnn" ]; then
+ url="https://lite.cnn.io/en"
+ else
+ url=$1
+ fi
+ torify w3m $url
+}
# Start emacs daemon if it is not running, then attach client
function e () {