iGMonkey is a powerful javascript framework that makes it easy to query, retrieve, manipulate, transform, and compare HTML and XML documents.
Today! To use iGMonkey, add the following line to your HTML source:
<script type="text/javascript"
src="http://www.csua.berkeley.edu/~dans/igmonkey/igmonkey.js"></script>
At its core, iGMonkey provides a flexible retrieval and rendering pipeline that manipulates a document by passing it through chains of pluggable ‘filter’ functions. iGmonkey's pipeline draws inspiration from the unix shell's pipe and redirection operators, as well as functional programming languages, such as Lisp. Familiar with the unix shell or functional programming? You'll be using iGMonkey in no time. Even if you think a unix shell is something you find on the beach, iGMonkey is easy to learn so it won't take you long to get up to speed.
iGMonkey is extensible. iGMonkey includes a number of useful filter functions you may use. Better yet, you can write your own filters to process the documents that are important to you. Best of all, iGMonkey filters facilitate reuse and remixing.
iGMonkey features helpful utility functions that simplify your code, and make your applications more robust.
openTagAllAttrsEx automagically
generates a regex that robustly matches an HTML open tag of
a given type with exactly the specified attributeshasAllAttrsEx is a predicate
that tests if a given element features exactly the
specified attributesmap, a true
generalized map
that takes an n argument function and n lists,
similar to the map found in
Scheme and
Lispforeach, beta, semantics may changeAt present, iGMonkey serves as a support library for Google Homepage API modules, but most of iGMonkey's code is not specific to the Homepage API. The retrieval phase of iGMonkey's pipeline is the one component of iGMonkey that makes direct use of the Homepage API since it uses Google's Content Proxy to fetch pages.
iGMonkey was originally developed and tested with Firefox on Mac OS X. Limited testing has been performed with Safari. It is currently untested with Opera, and Internet Explorer. Solid cross-browser support is a key goal of iGMonkey so stay tuned. If you have a success or horror story using iGMonkey on any browser, please let me know.
iGMonkey is Free Software. This software is licensed under the CC-GNU LGPL. When used as a component in Google Homepage API modules, this program is also subject to the Google Homepage API Terms and Conditions
N.B., Google has made no endorsement of iGMonkey, expressed, implied, or otherwise. I am not affiliated with or employed by Google.
Daniel
C. Silverstein. Please contact me if you would like to
contribute.
Incidentally, I am looking for full-time employment in or
around the San Francisco Bay Area. If you want to hire a smart, savvy
hack who gets
things done, let me know.
#include function.
I am aware of existing
solutions
that write <script> tags into HTML document
source, but consider them to be an unacceptable kludge.http://www.google.com/ig.
Take the ig, mix it with the monkey, and you
get iGMonkey!