User Tools

Site Tools


webjumps

What are webjumps?

Why type in a full url or go through a search engine's web page when you could just type a few characters and your search? A webjump simply elides the extra step.

surfraw -- shell users' revolutionary front rage against the web

In the spirit of UNIX, surfraw is a text tool which does one thing, and one thing only: it parses text provided by the user and transforms it into a search by your choice of several popular engines. For example, `surfraw google uzbl browser' will link you to a google search for the terms `uzbl' and `browser'.

bind \sr<Surfraw:>_ = sh 'echo "set uri = $(surfraw -print %s)" > $4'
bind \gg<Google:>_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' google
bind \google<Google:>_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' google
bind \glucky<Google Lucky:>_ = sh 'echo "set uri = $(surfraw -print $8 -l %s)" > $4' google
bind \gi<Google Image:>_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google images
bind \gimage<Google Image:>_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google images
bind \glinux<Google Linux:>_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google linux
bind \gbsd<Google BSD:>_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google bsd
bind \gusa_ = sh 'echo "set uri = $(surfraw -print $8 -search=$9 %s)" > $4' google unclesam
bind \wiki<Wikipedia:>_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' wikipedia
bind \imdb<IMBD:>_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' imdb
bind \aur<AUR:>_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' aur
bind \freshmeat<Freshmeat:>_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' freshmeat
bind \weather<Weather:>_ = sh 'echo "set uri = $(surfraw -print $8 %s)" > $4' weather

The following code is the same as the above, except each of these spawns a new uzbl process rather than opening the url in the current window.

bind 'sr _ = sh 'surfraw -g %s'
bind 'gg _ = sh 'surfraw -g $8 %s' google
bind 'google _ = sh 'surfraw -g $8 %s' google
bind 'glucky _ = sh 'surfraw -g $8 -l %s' google
bind 'gi _ = sh 'surfraw -g $8 -search=$9 %s' google images
bind 'gimage _ = sh 'surfraw -g $8 -search=$9 %s' google images
bind 'glinux _ = sh 'surfraw -g $8 -search=$9 %s' google linux
bind 'gbsd _ = sh 'surfraw -g $8 -search=$9 %s' google bsd
bind 'gusa _ = sh 'surfraw -g $8 -search=$9 %s' google unclesam
bind 'wiki _ = sh 'surfraw -g $8 %s' wikipedia
bind 'imdb _ = sh 'surfraw -g $8 %s' imdb
bind 'aur _ = sh 'surfraw -g $8 %s' aur
bind 'freshmeat _ = sh 'surfraw -g $8 %s' freshmeat
bind 'weather _ = sh 'surfraw -g $8 %s' weather
bind \yt _ = set uri = http://www.youtube.com/results?search_type=&search_query=%s&ag=f # youtube

Skip typing the .com/.net/.org (ie “ao uzbl” to get “http://uzbl.org”):

@cbind ac<.com:>_      = uri http://%s.com
@cbind an<.net:>_      = uri http://%s.net
@cbind ao<.org:>_      = uri http://%s.org

dissertation help

webjumps.txt · Last modified: 2016/08/31 14:10 (external edit)