<?xml version="1.0"?>
<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007">
   <channel>
      <title>Field in Regex Demo</title>
      <description>You can use the contents of fields in your regex replacements; just use the ${fieldname} pattern. This works even if you use it inside a String Builder. In this demo, notice how the publication date becomes part of the title. -- http://pipes.tumblr.com/post/32153703</description>
      <link>http://pipes.yahoo.com/pipes/pipe.info?_id=JC308EEN3RGA4TkIinrL0A</link>
      <pubDate>Sun, 29 Nov 2009 01:54:56 -0800</pubDate>
      <generator>http://pipes.yahoo.com/pipes/</generator>
      <item>
         <title>[21 Apr 2008] pubDate and guid in RSS</title>
         <link>http://pipes.tumblr.com/post/32331202</link>
         <description>&lt;p&gt;&lt;img src=&quot;http://74.54.212.169/Dlqj2c1fR81dyqcbvjSLBKrO_500.png&quot; height=&quot;248&quot; width=&quot;500&quot;/&gt;&lt;/p&gt;
&lt;p&gt;When creating a custom feed from e.g. a JSON source, it’s so irritating not to have &lt;i&gt;pubDate&lt;/i&gt; or proper &lt;i&gt;guid&lt;/i&gt; fields in the output RSS. Creating &lt;i&gt;item.pubDate&lt;/i&gt; and &lt;i&gt;item.guid&lt;/i&gt; entries won’t work. Here’s how to do it.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.yahoo.com/plumber/dateguid&quot;&gt;pipes.yahoo.com/plumber/dateguid&lt;/a&gt;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://pipes.tumblr.com/post/32331202</guid>
         <pubDate>Sun, 20 Apr 2008 09:39:00 -0700</pubDate>
      </item>
      <item>
         <title>[19 Apr 2008] Relative Time</title>
         <link>http://pipes.tumblr.com/post/32192166</link>
         <description>&lt;p&gt;&lt;img src=&quot;http://74.54.212.169/Dlqj2c1fR7yscgcvFwxIH5Zm_r4_500.png&quot; height=&quot;381&quot; width=&quot;500&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Here’s a module that converts date/time strings to relative time, e.g. “less than a minute ago”, “about 3 hours ago”, “about 26 days from now”, etc. It handles past and future dates and outputs relative time from minutes to years. The &lt;i&gt;Date Input&lt;/i&gt; module is quite lax as to what constitutes a valid date, and everything is converted to UTC — make sure you test it first so there are no surprises. &lt;/p&gt;
&lt;p&gt;For a demo, please see &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.yahoo.com/plumber/reltimedemo&quot;&gt;pipes.yahoo.com/plumber/reltimedemo&lt;/a&gt;. You can see it running below:&lt;/p&gt;
&lt;hr&gt;
&lt;hr&gt;
&lt;p&gt;This module is for &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://melecio.org/&quot;&gt;Gari&lt;/a&gt;. Hi, bro! :-) &lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.yahoo.com/plumber/reltime&quot;&gt;pipes.yahoo.com/plumber/reltime&lt;/a&gt;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://pipes.tumblr.com/post/32192166</guid>
         <pubDate>Fri, 18 Apr 2008 16:03:00 -0700</pubDate>
      </item>
      <item>
         <title>[18 Apr 2008] Field(s) in Regex</title>
         <link>http://pipes.tumblr.com/post/32153703</link>
         <description>&lt;p&gt;&lt;img src=&quot;http://74.54.212.169/Dlqj2c1fR7yi2oj2uCzdm0Tc_500.png&quot; align=&quot;middle&quot; height=&quot;353&quot; width=&quot;500&quot;/&gt;&lt;/p&gt;
&lt;p&gt;To use a field as part of the replacement value in a &lt;i&gt;Regex&lt;/i&gt;, use the following: &lt;b&gt;${fieldname}. &lt;/b&gt;You can use this with a &lt;i&gt;String Builder&lt;/i&gt; as well.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.yahoo.com/plumber/fieldinregex&quot;&gt;pipes.yahoo.com/plumber/fieldinregex&lt;/a&gt;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://pipes.tumblr.com/post/32153703</guid>
         <pubDate>Fri, 18 Apr 2008 08:45:00 -0700</pubDate>
      </item>
      <item>
         <title>[18 Apr 2008] Array to string</title>
         <link>http://pipes.tumblr.com/post/32153333</link>
         <description>&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;http://74.54.212.169/Dlqj2c1fR7yhs28xYIJs240m_500.png&quot; height=&quot;249&quot; width=&quot;421&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Here’s a neat trick. Did you know that you can use the &lt;i&gt;URL Builder&lt;/i&gt; to turn array elements into a slash-delimited string? &lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.yahoo.com/plumber/a2str&quot;&gt;pipes.yahoo.com/plumber/a2str&lt;/a&gt;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://pipes.tumblr.com/post/32153333</guid>
         <pubDate>Fri, 18 Apr 2008 08:44:00 -0700</pubDate>
      </item>
      <item>
         <title>[18 Apr 2008] Tumblr Titles with Tags</title>
         <link>http://pipes.tumblr.com/post/32152064</link>
         <description>&lt;p&gt;&lt;img src=&quot;http://74.54.212.169/Dlqj2c1fR7ygz2fakbJaqzuy_r1_500.png&quot; height=&quot;466&quot; width=&quot;500&quot;/&gt;&lt;/p&gt;
&lt;p&gt;Given the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.tumblr.com/post/32153703&quot;&gt;Field in Regex&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.tumblr.com/post/32153333&quot;&gt;Array To String&lt;/a&gt; tricks, here’s a standalone tool that modifes your &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.tumblr.com/&quot;&gt;Tumblr&lt;/a&gt; feed such that the tags you assign to a post are appended to the title. You can optionally specify a regex for the tags that you want to exclude.&lt;/p&gt;
&lt;p&gt;Check it out!&lt;/p&gt;
&lt;hr&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.yahoo.com/plumber/tttags&quot;&gt;pipes.yahoo.com/plumber/tttags&lt;/a&gt;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://pipes.tumblr.com/post/32152064</guid>
         <pubDate>Fri, 18 Apr 2008 08:43:00 -0700</pubDate>
      </item>
      <item>
         <title>[15 Apr 2008] Case-insensitive regex</title>
         <link>http://pipes.tumblr.com/post/31826989</link>
         <description>&lt;p&gt;&lt;img src=&quot;http://74.54.212.169/Dlqj2c1fR7u10rcox0dAes5C_500.png&quot; align=&quot;left&quot; height=&quot;260&quot; width=&quot;250&quot;/&gt;You can specify “i” in the &lt;i&gt;Regex&lt;/i&gt; operator, but what about the &lt;i&gt;Filter&lt;/i&gt; operator and &lt;i&gt;String Regex&lt;/i&gt; module?&lt;/p&gt;
&lt;p&gt;Simple. Just prefix your regex with &lt;b&gt;(?i)&lt;/b&gt; — this makes the match case-insensitive for the remainder of the string.&lt;/p&gt;
&lt;p&gt;&lt;br clear=&quot;all&quot;/&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.yahoo.com/plumber/ciregex&quot;&gt;pipes.yahoo.com/plumber/ciregex&lt;/a&gt;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://pipes.tumblr.com/post/31826989</guid>
         <pubDate>Tue, 15 Apr 2008 06:08:00 -0700</pubDate>
      </item>
      <item>
         <title>[15 Apr 2008] Parameter reuse</title>
         <link>http://pipes.tumblr.com/post/31776804</link>
         <description>&lt;p&gt;&lt;img src=&quot;http://74.54.212.169/Dlqj2c1fR7t9m4d8LlBp9nGA_r1_500.png&quot; align=&quot;right&quot; height=&quot;194&quot; width=&quot;212&quot;/&gt;&lt;br/&gt;It may not be immediately obvious, but you can wire the output of various &lt;i&gt;Inputs&lt;/i&gt; and &lt;i&gt;Builders&lt;/i&gt; as many times as you need. &lt;/p&gt;
&lt;p&gt;&lt;br clear=&quot;all&quot;/&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.yahoo.com/plumber/reuseparam&quot;&gt;pipes.yahoo.com/plumber/reuseparam&lt;/a&gt; &lt;/p&gt;</description>
         <guid isPermaLink="false">http://pipes.tumblr.com/post/31776804</guid>
         <pubDate>Mon, 14 Apr 2008 16:39:00 -0700</pubDate>
      </item>
      <item>
         <title>[14 Apr 2008] Counter (for loop)</title>
         <link>http://pipes.tumblr.com/post/31708799</link>
         <description>&lt;p&gt;&lt;img src=&quot;http://74.54.212.169/Dlqj2c1fR7sew59pZxFgecoa_r5_500.png&quot; border=&quot;0&quot; height=&quot;440&quot; width=&quot;500&quot;/&gt;&lt;/p&gt;
&lt;p&gt;A loop that counts from A to B is quite useful for the times when you need to repeat a certain operation X times.&lt;/p&gt;
&lt;p&gt;This module is similar to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.yahoo.com/pipes/pipe.info?_id=UhP6IpHM3BGVJPDHX0sBXw&quot;&gt;Mauricio Scheffer’s&lt;/a&gt;, but uses an internal string for the number source instead of pulling in a CSV file from a remote host. By default, it’s limited to a max of 1000 loops as well, but you can just add more numbers.&lt;/p&gt;
&lt;p&gt;To use this, clone it and drag into your editor from “My pipes” into a Loop where you embed your desired action. The counter is accessible as “item.i”. Note that the silly “+ 0” loop is a workaround for a bug in the &lt;i&gt;String Tokenizer&lt;/i&gt;, where it tokenizes 0 to an empty string. &lt;/p&gt;
&lt;p&gt;Here’s a &lt;i&gt;bash&lt;/i&gt; one-liner to make more numbers. Just copy and paste the values into the &lt;i&gt;String Builder&lt;/i&gt;. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;limit=2000; (for ((i=0;i &amp;lt; $limit; ++i)); do echo -n $i; if [ $i -ne (( $limit-1 )) ]; echo -n , ’ ) &amp;gt; $limit-numbers.csv&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.yahoo.com/plumber/counter&quot;&gt;pipes.yahoo.com/plumber/counter&lt;/a&gt;&lt;/p&gt;</description>
         <guid isPermaLink="false">http://pipes.tumblr.com/post/31708799</guid>
         <pubDate>Mon, 14 Apr 2008 03:01:00 -0700</pubDate>
      </item>
      <item>
         <title>[14 Apr 2008] Feed switch</title>
         <link>http://pipes.tumblr.com/post/31706745</link>
         <description>&lt;p&gt;&lt;img src=&quot;http://data.tumblr.com/Dlqj2c1fR7sceciiNCbRkkW4_500.png&quot; border=&quot;0&quot; height=&quot;337&quot; width=&quot;500&quot;/&gt; &lt;/p&gt;
&lt;p&gt;You can use this technique for any problem that requires runtime modification of the pipe output, for instance, when you use a feed with embeddable gadgets.&lt;/p&gt;
&lt;p&gt;In this example, you can exclude descriptions (excerpts) by specifying an &lt;i&gt;xd&lt;/i&gt; parameter value of 1.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://pipes.yahoo.com/plumber/feedswitch&quot;&gt;pipes.yahoo.com/plumber/feedswitch&lt;/a&gt; &lt;/p&gt;</description>
         <guid isPermaLink="false">http://pipes.tumblr.com/post/31706745</guid>
         <pubDate>Mon, 14 Apr 2008 02:29:00 -0700</pubDate>
      </item>
   </channel>
</rss>
<!-- fe10.pipes.sp1.yahoo.com uncompressed/chunked Sun Nov 29 01:54:55 PST 2009 -->
