April 2008
9 posts
2 tags
pubDate and guid in RSS
When creating a custom feed from e.g. a JSON source, it’s so irritating not to have pubDate or proper guid fields in the output RSS. Creating item.pubDate and item.guid entries won’t work. Here’s how to do it.
pipes.yahoo.com/plumber/dateguid
3 tags
Relative Time
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 Date Input module is quite lax as to what constitutes a valid date, and everything is converted to UTC — make sure...
2 tags
Field(s) in Regex
To use a field as part of the replacement value in a Regex, use the following: ${fieldname}. You can use this with a String Builder as well.
pipes.yahoo.com/plumber/fieldinregex
2 tags
Array to string
Here’s a neat trick. Did you know that you can use the URL Builder to turn array elements into a slash-delimited string?
pipes.yahoo.com/plumber/a2str
4 tags
Tumblr Titles with Tags
Given the Field in Regex and Array To String tricks, here’s a standalone tool that modifes your Tumblr 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.
Check it out!
]]> pipes.yahoo.com/plumber/tttags
2 tags
Case-insensitive regex
You can specify “i” in the Regex operator, but what about the Filter operator and String Regex module?
Simple. Just prefix your regex with (?i) — this makes the match case-insensitive for the remainder of the string.
pipes.yahoo.com/plumber/ciregex
2 tags
Parameter reuse
It may not be immediately obvious, but you can wire the output of various Inputs and Builders as many times as you need.
pipes.yahoo.com/plumber/reuseparam
3 tags
Counter (for loop)
A loop that counts from A to B is quite useful for the times when you need to repeat a certain operation X times.
This module is similar to Mauricio Scheffer’s, 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.
To use this, clone it and...
2 tags
Feed switch
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. In this example, you can exclude descriptions (excerpts) by specifying an xd parameter value of 1. pipes.yahoo.com/plumber/feedswitch