Pipes Plumbing

In any endeavor, it's important to know your tools. Next, we'll examine one of the modules in depth.

We used the Filter module earlier, and while it worked well in our simple example, it has features we can explore further.

First, look at the title bar of the module (see Figure 12).

Figure 12. 

You know about the connector "dot" at the center top of the title bar; that's for connecting the filter to an RSS source. But what about the three buttons on the right? The question mark button displays help information about the filter module, shown in the Yahoo! Pipes Help section at the bottom left of the Editor page.

The middle button is for minimizing the module, but not in the way you might expect. Instead of minimizing the module window entirely, it collapses the window to just its title bar. Some Pipes can become very complex, and since Yahoo! Pipes is an entirely graphical language, each new module eats up screen real estate. The minimize button unclutters the Pipes canvas. When collapsed, the middle button becomes a plus sign. Pressing this button re-expands the module window. There are also option buttons at the upper left of the Editor to "expand all" and "collapse all"—these provide a one-click method for uncluttering and recluttering the Pipes canvas.

The final button (the red "x") deletes the module. There's currently no undo function in Yahoo! Pipes, and there's no confirmation before deletion—the module is just deleted.

Look inside the Filter module (Figure 13).

Figure 13. 

Some modules allow you to define rules (the Filter module), or regular expressions (the Regex module), or feed URLs (the Fetch Feed module). When one or more of something can be defined, you'll see a "plus" button next to a label (the "Rules" label in Filter). In Filter, you start with one rule, and clicking "plus" adds a second rule. You add more rules in the same way. To delete a rule, just click the rule's "x" button.

Finally, notice that each Filter rule has a text entry field, and to its right is a connector "dot" similar to the dots found at the top and bottom of the module. This dot lets you connect a module to the entry field. Instead of hardcoding the data into the field, you pipe the data in from another module.

To see what type of data an entry field accepts, move your mouse over the dot. A hovering label appears, showing the data type (or types) the field accepts. See Figure 14.

Figure 14. 

You connect a module to a field entry connector using the same drag-and-drop technique used in module-to-module connections (see Figure 15).

Figure 15. 

And to detach a connection, click on one connection end. When the scissors icon appears, just click on them to delete the connection (see Figure 16).

Figure 16. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.156.140