Sections:
|
Pipes 概覽 Overview
Yahoo! Pipes 可以幫你「處理」資料,轉化為另一份 XML 輸出。輸入的資料來源可以是 Atom、RSS、RDF、XML 或 JSON。
Yahoo! Pipes 沒辦法將「不提供上述資料來源」的網站「變」出資料來源,這時請用 Dapper.net
可以接 text object 的欄位,都一定可以接 rss object 之外的所有 object。 (因為其他 Object 必定有 text 屬性值)
資料來源 Sources
Fetch FeedThis module retrieves one or more Atom, RDF, or RSS feeds from the URL(s) entered in the input box. To add additional sources click on the '+' icon. To delete sources click on the Trash icon. Sources Example: Using the Fetch Feed Module取得資料來源:可擷取一個以上的 Atom、RDF 或 RSS。 Fetch DataThis module retrieves any XML or JSON file and tries to extract a list of elements using the provided path parameter. Sources Example: Using the Fetch Data Module取得資料:擷取一個以上的 XML 或 JSON 資料。 FlickrThis module searches Flickr for images using the supplied parameters. Users can refine the search by entering keywords, the number of desired results, and a location. The string in the input boxes can be entered manually or piped in from a User Input module. Sources Example: Using the Flickr Module搜尋 Flickr 相片:設定關鍵字、搜尋數目(及地點資訊)後傳回搜尋結果。範例中的「near」用數字 10010 代表、是郵遞區號。 Google BaseThis module searches Google Base data using the supplied parameters. Users can refine the search by entering keywords, what they are looking for, and restricting the results to a geographic range. You can enter a string in the input box or pipe it in from a User Input module. Sources Example: Using the Google Base Module搜尋 Google Base:傳回 Google Base 搜尋結果。 Yahoo! LocalThis module searches Yahoo! Local using the supplied parameters. Users can refine the search by entering keywords and restricting the results to a geographic range. The string in the input boxes can be entered manually or piped in from a User Input module. Sources Example: Using the Yahoo! Local Module搜尋 Yahoo! Local:傳回搜尋結果 Yahoo! SearchThis module searches the web using keywords. Users can refine the search by restricting it to specific URL sources. To add additional source restrictions click on the + icon. To delete sources click on the Trash icon. The string in the input boxes can be entered manually or piped in from a User Input module. Sources Example: Using the Yahoo! Search Module搜尋 Yahoo!:傳回搜尋結果 Web ServiceThis module posts XML or JSON to an outside REST web service and tries to parse the results. Sources Example: Using the Web Service Module使用 Web Service:將 XML 或 JSON 試圖丟到其他 REST web service 中,然後嘗試解析傳回值。 使用者自行輸入 User Inputs
Date InputThis module accepts user-defined date strings. These values can be piped in to date input fields in another module. This module can also be used to let users provide their own input on the Pipe's run page. User Inputs Example: Using the Date Input Module輸入日期:將使用者輸入的日期化為日期物件輸出,可供其他輸入欄位使用。 Location InputThis module accepts user-defined location strings. These values can be piped in to other modules or pipes that accept a location as input. This module can also be used to let users enter their own location data on a Pipes run page. User Inputs Example: Using the Location Input Module輸入地點:將使用者輸入的地點轉為 Location Object Number InputThis module accepts user-defined numeric strings. These values can be piped in to other modules or pipes that accept numeric input. This module can also be used to let users enter their own numeric data on a Pipes run page. User Inputs Example: Using the Number Input Module輸入數字:將使用者輸入的數字轉為 Number Object Text InputThis module accepts user defined text strings. These values can be piped in to other modules or pipes that accept text input. This module can also be used to let users enter their own text data on a Pipes run page. User Inputs Example: Using the Text Input Module輸入文字:讓使用者輸入文字 URL InputThis module accepts user-defined URLs. These values can be piped in to other modules or pipes that accept URLs as input. This module can also be used to let users enter their own URLs on a Pipes run page. User Inputs Example: Using the URL Input Module輸入 URL:讓使用者輸入 URL 操作與運算 Operators
Content AnalysisThis module analyzes the text within each feed item. It will try to find significant words or phrases and add a sub-element called "y:content_analysis" containing the results of the analysis. Operators Example: Using the Content Analysis Module分析內容:分析內容中的關鍵字,將分析結果設定為 y:content_analysis。 (感覺很不確定,應該是找「相關」物品才會用到。) CountThis module counts the number of items in a feed. The result is a typed number that you can pipe into a numeric input field within another module. Operators Example: Using the Count Module計算項目個數:可將項目總數化為數字。 FilterThis module can Block or Permit items that match the defined rules. After connecting an input source, the Title pulldown menu dynamically updates to provide additional criteria. The text in the input box can be entered manually or piped in from a Text input module. To add additional rules click on the + icon. To delete sources click on the Trash icon. Operators Example: Using the Filter Module篩選:設定篩選條件,只有符合條件的 item 才加以/不予輸出 For Each AnnotateThis module constructs a loop that runs the sub-module, or pipe, once for each item in the feed. The output result will be appended to the original item using the defined attribute name. After connecting an input source any pulldown menus in a sub-module will dynamically update to provide additional criteria. You can choose which values to pass to the sub-module as parameters, or you can pipe them in from other modules. Operators Example: Using the For Each Annotate Module加註:執行其內的純資料來源子組件,然後讓執行結果傳回值依設定名稱「加」到目前的項目中。每個項目會跑一次,可以傳入某些值當子組件的參數。 For Each ReplaceThis module will run an enclosed sub-module or pipe one time for each item in the feed. The output will replace the original item. After connecting an input source, any pulldown menus in a sub-module will dynamically update to provide additional criteria. You can choose which values to pass to the sub-module as parameters, or you can pipe them in from other modules. Operators Example: Using the For Each Replace Module取代:執行其內的純資料來源子組件,然後讓執行結果傳回值替代目前的項目。每個項目會跑一次,可以傳入某些值當子組件的參數。如果選用「All Items」且子組件傳出的 RSS Object 項目多過兩個,那麼最後輸出的總項目數應該就會增加。(參考範例) Location ExtractorThis module analyzes text within each feed item and attempts to identify addresses, location names or popular map service URLs. If the extractor finds geodata in the feed, it will annotate each item with a "y:location" sub-element containing that item's latitude and longitude. Operators Example: Using the Location Extractor Module分析地點:分析項目中的文字,若找到地點資訊則新增「y:location」、在其中放進 Location Object。 RegexApply Perl-like regular expressions to item attributes. Operators Example: Using the Regex Module規則運算式:將 RSS Object 中的屬性值依規則運算式調整 RenameThis module lets you rename or copy item attributes. Operators Example: Using the Rename Module更名:更動或複製項目屬性名稱 SplitThis module splits a feed into two identical copies. Operators Example: Using the Split Module複製:輸出兩個與來源一樣的 RSS Object SortThis module sorts items in ascending or descending order matching the defined rules. After connecting an input source, the Title pulldown menu dynamically updates to provide additional criteria. To add additional rules click on the + icon. To delete sources click on the Trash icon. Operators Example: Using the Sort Module排序:依所選條件為資料排序 BabelFishThis module automatically translates items from one language into another. Select the language combination you desire from the pulldown menu. Operators Example: Using the BabelFish Module翻譯:翻譯整個 RSS Object TruncateThis module limits the number of items that passes through it. You can enter a number manually or pipe it in from a Number Input module. Operator Example: Using the Truncate Module擷取:限制 RSS 輸出的項目數 UnionThis module merges two feeds together. Operators Example: Using the Union Module聯集:將多個 RSS Object 合而為一 UniqueThis module combines items containing identical strings. After connecting an input source, the Title pulldown menu dynamically updates to provide additional criteria. A count of duplicate items will be added as a y:repeat_count element. Operators Example: Using the Unique Module僅取其一:依設定,僅取相同屬性值項目的第一筆予以輸出。 其他網址 URL
URLBuilderThis module builds URLs in either traditional or Web 2.0 style query-string format from a series of input fields. If a URL is composed of a series of field-value pairs in the query string, just paste it into the Base input box. The module will automatically parse out the key/value pairs. To build a Web 2.0-style address, enter the Base URL followed by each directory path element on a new line. You can connect the output of the URLBuilder to the input box of a Fetch module. You can pipe in values for any input box from a User Input module, making the URL configurable. URL Example: Using the URLBuilder Module建立 URL:依規則建立 URL 物件 其他文字 Text
String ConcatenateThis module joins multiple item attributes into a single string. Enter the name of each field you want to join together, one per line. You can enter the text in the input boxes manually or pipe it in from an appropriate User Input module. To add additional rules click on the + icon. To delete sources click on the Trash icon. String Example: Using the String Concatenate Module結合字串:將輸入的各項數值結合為一個字串輸出 其他日期 Datatime
Date FormatterThis module will format a datetime value piped in from another module as a string. It also accepts these parameters. Date Example: Using the Date Formatter Module日期格式:將日期物件依設定格式化為字串輸出 Date BuilderThis modules creates a date object from a string value. It understands most common date formats and also relative date formats such as yesterday and 2 days ago. 日期:將字串化為日期物件 其他地點 Location
Location BuilderThis modules creates a location object from a string value. It understands most common address formats including zipcodes and many major airport codes. 建立地點:依設定輸出地點物件。 其他數字 Number
Simple MathThis modules performs simple arithmatic, such as addition and subtraction. 運算:加、減、乘、除、取餘數、次方 |