GrazrScript Demo: Overview

| Displaying multiple feeds >

GrazrScript is a programming language for feeds that runs within the Grazr feed widget. Grazr is a Javascript based widget that is available free of charge for personal and commercial use. GrazrScript is currently in beta test, and is available within all copies of Grazr on public websites.

The power of the URL

GrazrScript is based on a simple principle. There are now thousands, perhaps hundreds of thousands of feeds available on the Internet that are based on user queries. These appear within search engines, media sharing sites, job sites, government agencies, etc. The one thing they all have in common is that a user query is placed within a URL, and the results are sent back as a standard feed or OPML file. For example, the following URL will get a feed of Google News items based on a search for "video":

http://news.google.com/news?q=video&output=rss

If you change the URL to place another word after "q=", you can search for anything you want. Of course, changing URLs by hand and then reading raw feeds is not the best user interface.

GrazrScript allows you to harness the power of all of these feeds, and publish them on any Web page using the Grazr Widget. This displays a easy to use form and a rich user interface for reading the results.

Simple XML language

Here is the GrazrScript program for this example:

http://docs.grazr.com/demo/wl/news.xml

<?xml version="1.0" encoding="UTF-8"?>
<opml version="2.0" xmlns:grazr="http://docs.grazr.com/script/spec/1.0">
<head>
<title>News Search</title>
</head>
<body>
<grazr:form name="newsform">
News Search <input type="text" name="subject" />
<input type="submit" value="Enter" />
</grazr:form>

<grazr:formtemplate name="newsform"
file="http://news.google.com/news?q=%subject%&amp;output=rss" />

<grazr:formresult text="Google News:" name="newsform" />

</body>
</opml>

As you can see, GrazrScript is an XML based language. It is also a namespace extension of OPML 2.0.

There are three sections to a GrazrScript program:

  • The form contains standard XHTML form tags
  • The template section contains URLs into which the form fields are substituted.
  • The result node marks the location where the result of processing the template is placed
The three sections are related through the name attribute. You can have any number of forms with their matching template and result in a single program, and they may be nested within any OPML outline.

Easy install

The Grazr Widget is embedded in Web pages with a short HTML snippet:

<div style="height:300px;width:300px;">
<script defer="defer" type="text/javascript"
src="http://grazr.com/gzloader.js?view=o&amp;toolbar=off&amp;file=http://docs.grazr.com/demo/wl/news.xml">
</script>
</div>

Free for all

Grazr and GrazrScript may be used on any personal and commercial website free of charge. In addition, GrazrScript's copyright permits anyone to implement the language within their own tools for both personal and commercial uses.

| Displaying multiple feeds >

[ Overview ]
Displaying multiple feeds
Sample forms
Combining applications
Cloning applications
Future directions
Learning more


© Copyright 2006, Grazr Corp.