Documention for: countweb.r
Created by: btiffin
on: 28-Apr-2007
Format: html
Downloaded on: 17-Jun-2026

Usage document for %countweb.r

1. Introduction to %countweb.r
2. countweb At a Glance
3. Configuring %countweb.r
4. What you can learn
4.1. Easy web page reader
4.2. find/tail
4.3. set-words
5. Credits

1. Introduction to %countweb.r

This library script is an example for scanning web pages. It scans a list of sites and counts the occurances of a string.

2. countweb At a Glance

 >> system/options/quiet: true
 >> do %countweb.r
 47 http://www.rebol.com
 15 http://www.sassenrath.com
 0 http://www.amiga.org
 0 http://www.cnn.com
 
Counted the times the string REBOL occured in the listed site's home pages.

3. Configuring %countweb.r

Change the string to look for in the string: variable
Change the sites to scan in the sites: block

4. What you can learn

4.1. Easy web page reader

What other language do you know that can read in a web page with read http://sitename.com

4.2. find/tail

This example show how easy it can be to scan through a page of text with the line

 while [page: find/tail page string] [count: count + 1]
 

4.3. set-words

That same line shows off REBOL assignment, or set-word in REBOL speak.

5. Credits