cutting to the chase (was Re: w3m continues Edbrowse?)

Linux for blind general discussion blinux-list at redhat.com
Mon Oct 29 17:38:35 UTC 2018


I get around the excessive verbiage problem on google like this:
1. create a new shell script command in $HOME/bin/google containing this line:
lynx -useragent="Mozilla 5.0 (compatible) MSIE 10.0 Window NT 7.0" ~/bin/google.html

2.  In the $HOME/bin/google.html file place the following HTML code:
<!-- X-URL: http://www.google.com/ -->
<!-- Date: Sun, 29 Apr 2012 16:39:59 GMT -->
<BASE HREF="http://www.google.com/">
<!doctype html><html itemscope itemtype="http://schema.org/WebPage"><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><meta name="description" content="Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for."><meta name="robots" content="noodp"><meta itemprop="image" content="/images/google_favicon_128.png"><title>Google</title><script>window.google={kEI:"326dT87mJofc0QG02oCpBA",getEI:function(a){var b;while(a&&!(a.getAttribute&&(b=a.getAttribute("eid"))))a=a.parentNode;return b||google.kEI},https:function(){return window.location.protocol=="https:"},kEXPI:"17259,34955,36683,37196,37646,38099,38135,38182,38284,38355,38409,38444,38517,38578",kCSI:{e:"17259,34955,36683,37196,37646,38099,38135,38182,38284,38355,38409,38444,38517,38578",ei:"326dT87mJofc0QG02oCpBA"},authuser:0,
ml:function(){},kHL:"en",time:function(){return(new Date).getTime()},log:function(a,b,c,e){var d=new Image,h=google,i=h.lc,f=h.li,j="";d.onerror=(d.onload=(d.onabort=function(){delete i[f]}));i[f]=d;if(!c&&b.search("&ei=")==-1)j="&ei="+google.getEI(e);var g=c||"/gen_204?atyp=i&ct="+a+"&cad="+b+j+"&zx="+google.time();
var k=/^http:/i;if(k.test(g)&&google.https()){google.ml(new Error("GLMM"),false,{src:g});delete i[f];return}d.src=g;h.li=f+1},lc:[],li:0,Toolbelt:{},y:{},x:function(a,b){google.y[a.id]=[a,b];return false}};
var _gjwl=location;function _gjuc(){var e=_gjwl.href.indexOf("#");if(e>=0){var a=_gjwl.href.substring(e);if(a.indexOf("&q=")>0||a.indexOf("#q=")>=0){a=a.substring(1);if(a.indexOf("#")==-1){for(var c=0;c<a.length;){var d=c;if(a.charAt(d)=="&")++d;var b=a.indexOf("&",d);if(b==-1)b=a.length;var f=a.substring(d,b);if(f.indexOf("fp=")==0){a=a.substring(0,c)+a.substring(b,a.length);b=c}else if(f=="cad=h")return 0;c=b}_gjwl.href="/search?"+a+"&cad=h";return 1}}}return 0}function _gjp(){!(window._gjwl.hash&&
window._gjuc())&&setTimeout(_gjp,500)};
window._gjp && _gjp()</script><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}</style><style id=gstyle>body{margin:0;overflow-y:scroll}#gog{padding:3px 8px 0}td{line-height:.8em}.gac_m td{line-height:17px}form{margin-bottom:20px}body,td,a,p,.h{font-family:arial,sans-serif}.h{color:#36c;font-size:20px}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{height:25px;margin-bottom:.2em;padding:4px 5px 0 5px;vertical-align:bottom;width:496px}.gsfi,.lst{font:17px arial,sans-serif}.gsfs{font:17px arial,sans-serif}input{font-family:inherit}a.gb1,a.gb2,a.gb3,a.gb4{color:#11c !important}body{background:#fff;color:black}a{color:#11c;text-decoration:none}a:hover,a:active{text-decoration:underline}.fl a{color:#36c}a:visited{color:#551a8b}a.gb1,a.gb4{text-decoration:underline}a.gb3:hover{text-decoration:none}#ghead a.gb2:hover{color:#fff!important}td.fl a{font-size:11px}.lsb{border:1px solid;border-color:#ccc #999 #999 #ccc;height:1.85em!important;font:15px arial,sans-serif;vertical-align:top}.lsb:active{background:#ccc}.lst:focus{outline:none}#addlang a{padding:0 3px}.gac_v div{display:none}.gac_v .gac_v2,.gac_bt{display:block!important}table.gssb_c{z-index:986  }.nbcl{background:url(/images/srpr/nav_logo80.png) no-repeat ;height:px;width:px}</style><script></script></head>
<body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onload="document.f&&document.f.q.focus();document.gbqf&&document.gbqf.q.focus()" >
		<form action="/search" name=f>
			<table cellpadding=0 cellspacing=0><tr valign=top><td width=25%> </td><td align=center nowrap><input name=hl type=hidden value=en><input name=source type=hidden value=hp><input type=hidden name=ie value="ISO-8859-1"><input autocomplete=off maxlength=2048 name=q size=55 class=lst title="Google Search" value=""><br><div style="font-size:0;height:5px"></div><input name=btnG type=submit value="Google Search" class=lsb> <input name=btnI type=submit value="I'm Feeling Lucky" class=lsb></td><td nowrap class=fl width=25% align=left><font size=-2>   <a href="/advanced_search?hl=en">Advanced search</a><br>   <a href="/language_tools?hl=en">Language tools</a></font></td></tr></table><input type=hidden id=gbv name=gbv value="1">
			</form>
	</body></html>


3.  Set permissions and make sure $HOME/bin is in your PATH 
e.g.
chmod 700 $HOME/bin/google
chmod 600 $HOME/bin/google.html
in $HOME/.profile
PATH=$HOME/bin:$PATH


4. Now you can just call google, and end up with your
cursor in the search box.

For me, this means typing my search term, hitting the ENTER key twice, hitting
the A key each time lynx asks me to accept cookies, then entering /verbatim and the ENTER
key to get to the first link before the search results.

Your mileage may vary.
For example, in some configurations I need to enter /preference instead of /verbatim, to jump to the
search results, so some trial and error may be needed.


On Mon, Oct 29, 2018 at 12:23:40PM -0400, Linux for blind general discussion wrote:
> "Speaking personally, I tried loading google in w3m, but found it tedious
> reaching the page sections I sought."
> 
> This was my experience as well. This is because w3m has no header or any
> other quick navigation features that are common to most graphical desktop
> browsers. For example, I am able to go to either DuckDuckGo or Google, both
> of which land me immediately on the search box, which is what I want most
> right away, then I can enter my search and then press h to navigate through
> the search results by headings, as each result's link is a heading, and then
> if I want to read the little piece of the page that it includes, I can press
> the down arrow key to get to it, then h to move to the next result or H to
> move back to the top of that result or to previous results. Unfortunately,
> no text browser has this capability at present, not even w3m, making them
> all more tedious to navigate than the graphical browsers. That said, w3m
> would seem to be the best candidate for being modernized and made less
> tedious, because it just needs accessible Javascript and HTML5 support along
> with quick navigation keybindings that can place the cursor directly on the
> point of interest, especially since it is the only text browser that
> supports direct arrow and tab navigation right out of the box.
> Imetumwa kutoka macho yangu
> 
> _______________________________________________
> Blinux-list mailing list
> Blinux-list at redhat.com
> https://www.redhat.com/mailman/listinfo/blinux-list

-- 
Rudy Vener
Website: http://www.rudyvener.com




More information about the Blinux-list mailing list