home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / ipl / progs / link2url.icn < prev    next >
Text File  |  2000-07-29  |  837b  |  35 lines

  1. ############################################################################
  2. #
  3. #    File:     link2url.icn
  4. #
  5. #    Subject:  Program to convert links to URLs
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     September 1, 1998
  10. #
  11. ############################################################################
  12. #
  13. #  This file is in the public domain.
  14. #
  15. ############################################################################
  16. #
  17. #  This program takes HTML links from standard input, strips off the
  18. #  tags and related material, and write the resulting URLs to standard
  19. #  output.
  20. #
  21. ############################################################################
  22.  
  23. procedure main()
  24.    local line
  25.  
  26.    while line := read() do {
  27.       line ? {
  28.          tab(find("<A" | "<a"))
  29.          tab(upto('"') + 1)
  30.          write(tab(upto('"')))
  31.          }
  32.       }
  33.  
  34. end
  35.