Multi-Search3
Showing posts with label TimeSavers. Show all posts
Showing posts with label TimeSavers. Show all posts

Five Quick Suggestions For No-Nonsense, Superfast Text Browsing!



Sick and tired of image and multimedia overload in everyday browsing and want to skip images for a while but need to read the text at the same time? Travelling and stuck with low bandwidth? Researching reference sites and need text browsing by choice? There may be a hundred and one reasons, but let us set out to find a few easy ways for text browsing.

1.GOOGLE SEARCH PAGE


Select [CACHED OPTION] from the pulldown menu at the end of the second line of every search page result and then click on [TEXT-ONLY VERSION] to view the text-only version of the page. If you know the address of the website, you can first type cache:www.website.com and then select the [TEXT-ONLY VERSION] from the top-right.

2.CHROMIUM 12.0[LINUX]

Chromium


Select [DO NOT SHOW ANY IMAGES] radio button from the SETTINGS wrench with the tool tip "customize and control chromium"->[PREFERENCES]->[UNDER THE HOOD]->[PRIVACY]->[CONTENT SETTINGS]->[IMAGES].

3.FIREFOX 13.0[LINUX]

FireFox
Uncheck the [LOAD IMAGES AUTOMATICALLY] checkbox on the [CONTENT] panel from [EDIT] Menu->[PREFERENCES].

4.OPERA 11.60[LINUX]

Opera

Select [NO IMAGES] from the [IMAGES] pulldown menu from the [Opera] button on the top left->[SETTINGS]->[PREFERENCES]->[WEB PAGES] tab.

NOTE: Differences in browsers, browser versions and the Operating systems mentioned above and the others that aren't, may mean slightly different changes in locations and labels.

5.LYNX[Linux/Win and others]

Lynx

Okay, having the newer browsers covered, let us spend the rest of the article
with the CLI[command line interface] of the slightly older Lynx Text Browser to
get to the text or html versions of a web page and also get lists of links within
the same page.

DOWNLOAD THE LYNX BROWSER


First download the lynx browser from http://lynx.browser.org. Lynx 2.8.7 runs
on Un*x, MacOS, VMS, Windows 95/98/NT, DOS386+. I use it with Puppy Lucid 5.1 Linux on my Toshiba Satellite laptop. Once we have downloaded and installed the Lynx browser, we can browse the text version of the websites on the web with the default program or we can also use the CLI to get things done from the commandline like we do in this article. Once we have the address of the web page, we can use the -base, -dump, -listonly and -nonumbers options of the lynx CLI to get things going. I am using the geany text editor on my linux system to view the results of the lynx command for this article. Use a text editor , location and filenames of your choice.

TYPICAL USES OF THE LYNX COMMAND

cd /tmp

USAGE1: Get the pure html source of the webpage
lynx -source "http://www.sqlhtm.com/About.htm">lynx.txt; geany lynx.txt

USAGE2: Get the text of the webpage with numbered links, no images[image tags only]
and lists of reference and hidden links at the bottom
lynx -dump "http://www.sqlhtm.com/About.htm">lynx.txt; geany lynx.txt

USAGE3: Get the lists of links in the webpage only[no text or images]:
lynx -dump -listonly "http://www.sqlhtm.com/About.htm">lynx.txt; geany lynx.txt

USAGE4: Get the lists of links only without link numbering and without text:
lynx -dump -listonly -nonumbers "http://www.sqlhtm.com/About.htm">lynx.txt; geany lynx.txt

USAGE5: Get the text of page and the links at the bottom but disable the link numbering
lynx -dump -nonumbers "http://www.sqlhtm.com/About.htm">lynx.txt; geany lynx.txt

USAGE6: Get the text, link lists at bottom with numbers from webpage with no images[only image tags]
lynx -dump -base "http://www.sqlhtm.com/About.htm" >lynx.txt; geany lynx.txt

USAGE7: Get the text with no images[only image tags] and no lists of links at the bottom:
lynx -dump -base "http://www.sqlhtm.com/About.htm"|sed 'References/,$d' >lynx.txt; geany lynx.txt
[sed note: valid as on may2013]

GETTING LINKS FROM GOOGLE SERP[Search Engine Results Page] FOR THE LYNX CLI USAGE SUCH AS ABOVE



CASE1: CLEAN LINK ON THE SECOND LINE BELOW THE TITLE LINE

If we have a good link with a clean format such as http://www.sqlhtm.com/About.htm, we'll have absolutely no problems but if we're going to depend on google search for links, we might get lucky or unlucky depending on what the SERP[search engine results page] deigns to provide us. Look at the image above and consider the two cases below. First we have some results with a clean web address on the second line of the result below the top title line such as the one below. We can grab this just like it is and use it without changes.

EXAMPLE

Sed Command in Unix and Linux Examples
www.folkstalk.com/2012/01/sed-command-in-unix-examples.html‎


CASE2: MESSY LINK TO CLEAN UP FOR LYNX CLI USAGE

While an address such as the one above is what we want, oftentimes we run out of luck and end up having to rightclick on the title and select the [copy link
address] option to get a really messy google-formatted link with characters that
need to be cleaned up so the link is acceptable to the lynx command line deity.
To do this, we need to delete a portion at the beginning of the messy address,
delete another at the end, and also replace the code [%3A] with colon [:] and [%2F] with forward slash [/] in the reminder of the address.

EXAMPLE

Linux / Unix: sed Command Print Only Matching Lines - nixCraft
www.cyberciti.biz/.../unix-linux-sed-print-only-matching-lines-comman...‎


Do you notice the three dots from hell leading to nowhere in the middle and also at the end? This is no good. So we'll rightclick on the top title link and select the [copy link address] option to get an equally-lousy-if-not-worse address below.

http://www.google.co.in/url?sa=t&rct=j&q=Sed+Command+in+Unix+and+Linux+Examples&source=web&cd=5&cad=rja&ved=0CE8QFjAE&url=http%3A%2F%2Fwww.cyberciti.biz%2Ffaq%2Funix-linux-sed-print-only-matching-lines-command%2F&ei=_IOHUdT3IILqrQfiu4CgDg&usg=AFQjCNEpchgcEfzvOIjMDj0bLJhdPyrSig&sig2=UFZgetDwLrizo9LQ0Km5jQ

Lynx CLI hates this address, throws an error message! Deciphering this address
is not rocket science but everyone can only have so much patience for things of
this sort, don't you agree? Let us keep moving and finish cleaning up this scary
mess as much as we can.

1.Delete from the beginning all the way upto [URL=].
ie. Delete this from the beginning [http://www.google.co.in/url?sa=t&rct=j&q=Sed+Command+in+Unix+and+Linux+Examples&source=web&cd=5&cad=rja&ved=0CE8QFjAE&url=]

2.Delete everything from &ei till the end of line.
ie. Delete this at the end of the address:
[&ei=_IOHUdT3IILqrQfiu4CgDg&usg=AFQjCNEpchgcEfzvOIjMDj0bLJhdPyrSig&sig2=UFZgetDwLrizo9LQ0Km5jQ]


3.Replace [%3A] with [:] and [%2F] with forward slash[/] in the leftover address.
In this step, we start with address [http%3A%2F%2Fwww.cyberciti.biz%2Ffaq%2Funix-linux-sed-print-only-matching-lines-command%2F] and
end up with the address[http://www.cyberciti.biz/faq/unix-linux-sed-print-only-matching-lines-command]

There, we got what we needed, a really clean lynx CLI-acceptable address!
Using this address in any of the several ways above, we can get what we want - the html or text version of the page with or without the links on the page!

REDIRECTS

If the link we are using is a redirect, then we may not get the text of the
page at once, but only an alternate link in the output of the lynx command. We need to run the same lynx command again with this redirect link and then we will get the required text source of the page.

FINAL WORD

While a picture may be worth a thousand words, it is nice to be able to be content with words for a change, at least once in a while, at least considering the useless, bloated, unhealthy or harmful images on the net! But dude, I know where you are headed right after reading this - right back to your G+s, pinterests and tumblrs, but really can't blame you. Who'd want to stay with text only other than those stuck with dial-up or slow internet?

Why You Should Always Grep Carefully If Your Search String Has ">" In It.





It's Better "Quoted" Than "Naught"ed!


Behold the mighty little ">" symbol in a Unix/Linux grep command. If not quoted, it will empty the file being searched.

EASY EMPTY

If you've been on the Unix/Linux platforms for a while, I am sure that you'll remember this good old technique to empty files.
>test.log
This command nulls out the test.log file and is usually used to empty fat old error files and log files.

THE DANGER OF UNQUOTED ">" WITHIN A GREP COMMAND

While the command above is perfectly fine, accidents do happen especially if and when we are dumb, careless or in a big hurry! That's why we better watch out for the greater than symbol [">"]  used carelessly in a grep command. If it is not quoted, it empties the file. Makes it 0 bytes. Zero. Zilch. Nada. Naught. Nothing! What a nightmare! There's no way out except with a backup. It doesn't matter it is a 1KB file or 1GB. There is nothing left in the file so you can try the "string" command or similar. How dangerous!





EXAMPLE

Let us prove this with an example. Look at the image above. We have a test file called hworld1.log and we are going to search for a string "echo hello >" within the file. First look at the file itself.

$cat hworld1.log 
#!/bin/sh
#Beware the greater than symbol in a grep command. Always quote it!
touch hello.log
echo hello>hello.log
echo world>>hello.log
ls -l hello.log
exit

CORRECT USAGE OF THE GREP COMMAND

To search for the string "echo hello >" within the hworld1.log file, type
$grep "echo hello >" hworld1.log
and everything is fine. Check the image above.

DANGER! INCORRECT USAGE


Suppose you are in a hurry to go out and you accidentally forget to quote your > symbol in your grep command. Now it is not part of the search string you intend it to be anymore. The grep command looks for part of the search string [echo] in the wrong place [non-existent hello file] and the input file [hworld1.log] is overwritten  with null instead!  Never try

$grep echo hello > hworld1.log
or else the hworld1.log file is nulled out! Check the image above.

BACKUPS ARE NOT LUXURY-THEY ARE AN ABSOLUTE NECESSITY

It's always top priority to back up anything worthwhile on the pc/laptop regularly. Even with backups, it's never safe to use ">" in a grep command without quotes carelessly! Remember the tiny, little ">" can make a tiny 1KB file or a 1GB monster file empty in a second!

REQUIREMENTS

Tested on Puppy Lucid 510. Puppy Linux allows both single and double quotes within the grep command. Check with your Unix/Linux platform for details on how things work with regard to single or double quotes.

Open Any Number Of Tabs Without Typing. Here's The Oneliner Shell Script!

Chromium/Firefox/Opera

Puppy Linux Lucid 5.1.0



I Suddenly Tripped On A New Idea!

You know what, I suddenly tripped on an idea to start a whole bunch of sites in a whole bunch of tabs - all at once - using a shell script! Really amazing!

What You May Be Missing

Are you one of the power users? Maximize your productivity by automating repetitive typing! We usually start the browsers manually, and type the addresses every time manually or use bookmarks to open sites-even those sites we can't stop visiting every single day of our lives such as the email sites, the ISPs, the social sites, the movie/tv sites and the devotional sites!

Even if you used a shell script, you may not be opening more than one tab at a time!

Even if some browsers such as the Chromium-browser give you the option to open a bunch of tabs when you open a new tab in the second session after exiting with a bunch of sites in the first, other browsers may not have that feature!

Tiny Oneliner. One-Click Wonder!

Wouldn't it be great to be able to start a bunch of sites in several tabs "at the press of a button" all at once by using a shell script? It is right here. It works in Chromium, Opera and Firefox on Puppy Lucid Linux5.1.0 and it should work with other browsers in other distros too!

The Simple Oneliner Script

multi-tabbed-chromium.sh

/usr/bin/chromium-browser  \
"file:///your-favorite-local-file.html" \
"https://yahoo.com" \
"http://blogger.com" \
"http://twitter.com/thatsgoodbusybe" &

The Steps

  • Copy the oneliner script above and paste it to a script
  • Replace the links with your links
  • Run the command below once to change the script to executable 
chmod 755 multi-tabbed-chromium.sh
  • Type 
./multi-tabbed-chromium.sh   
or click on it from rox or some other file manager to run it!
Now whenever you want to start the "must visit daily" sites, however many, just click on that script to open all sites all at once! Stop wasteful typing every time you get on the net for every site you visit! Start the worry-free one-click fast start with the shell script! Every time!!!

NOTE 1: Browsers And OS's

Works fine on Chromium, Firefox and Opera on Puppy Lucid Linux5.1.0. Change the executable browser name for each browser you want to use. Should work as is or with minimum changes with other browsers and other distros too.

Tip: Use the "which browsername" command [eg. which opera] or a similar command to find the location of the executable. Some browsers may keep executables in locations other than /usr/bin.

NOTE 2: Max Number Of Open Tabs

Number of max open tabs depends on your browser and your OS.


BlogCollage


Blog Collage - Top Random Posts In No Particular Order

Mouseover the images for title and comments