LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement

Listen Print Subscribe to Linux Subscribe to Newsletters
Linux & Unix > Excerpts >
Living Linux

Beyond Browsing the Web

07/05/2000

In addition to viewing URLs in the standard Web browsers, there are other useful ways of getting and using Web data on Linux systems right now. Here are a few of them.

Viewing images from the Web

If you want to view an image file that's on the Web, and you know its URL, you don't have to start a Web browser to do it -- give the URL as an argument to display, part of the ImageMagick suite of imaging tools (available in the Debian imagemagick package or here).

For example, to view the image at ftp://garbo.uwasa.fi/garbo-gifs/garbo01.gif, type:

display ftp://garbo.uwasa.fi/garbo-gifs/garbo01.gif

Click the right mouse button to get a menu; from there, you can save the image to a file if you want to.

Reading text from the Web

If I want to read the text of an article that's on the Web, and I just want the text and not the Web design, I'll often grab the URL with the lynx browser using the -dump option. This dumps the text of the given URL to the standard output; then I can pipe the output to less for perusal, or use redirection to save it to a file.

For example, to peruse the text of the URL http://www.sc.edu/fitzgerald/winterd/winter.html, type:
lynx -dump http://www.sc.edu/fitzgerald/winterd/winter.html | less

It's an old Net convention for italicized words to be displayed in an etext inside underscores like _this_; use the -underscore option to output any italicized text in this manner.

By default, lynx numbers all the hyperlinks and produces a list of footnoted links at the bottom of the screen. If you don't want them, add the -nolist option, and just the pure text will be returned.

To output the pure text, with underscores, of the above URL to the file winter_dreams, type (without the line break):

lynx -dump -underscore 
 http://www.sc.edu/fitzgerald/winterd/winter.html > winter_dreams

Or pipe the output to enscript to make a nice printout of it (again, don't enter the line breaks shown here):

lynx -dump -underscore 
 http://www.sc.edu/fitzgerald/winterd/winter.html |
 enscript -B -f "Times-Roman10"

Pages: 1, 2

Next Pagearrow




Tagged Articles

Be the first to post this article to del.icio.us

Recommended for You

  1. Cover of Learning the bash Shell
    Learning the bash Shell
    Print: $34.95
    Ebook: $27.99
  2. Cover of XLIB Programming Manual, Rel. 5
    XLIB Programming Manual, Rel. 5
    Print: $34.95
  3. Cover of Pragmatic Version Control Using CVS
    Pragmatic Version Control Using CVS
    Print: $29.95
  4. Cover of Linux System Programming
    Linux System Programming
    Print: $49.99
    Ebook: $39.99

Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2010, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com