Claim this site
Pick a password:

JSONの構造

layout, modules, terminaldata, wires に別れてる。

layout

モジュールの位置に関するデータ。pipesのみため制御用。

terminaldata

よくわかんない。pipesGUIのパフォーマンス改善用?

modules

メインのデータ。モジュールの種類、パラメータがはいってる。

wires

モジュールをどう繋げてるかの情報。

データ型

pipesにはデータ型がある。

このデータ型で表されるデータはJSONではオブジェクトになってる。


{
  type: text|module|...
  value: (optional)
  subkey: (optional)
  terminal: (optional)
}

typeは常にデータのタイプを表す。

データの値が何から得られるかはvalue, subkey, terminalで示される。

1.value 文字列なんかのimmediateのときはvalueにimmediateが入ってる。

2.subkey データがitemの要素だったりするときはsubkeyにitemの要素を示す文字列(item.descriptionとか)が入っている。

3.terminal ほかのモジュールの出力結果の場合(StringBuilderの出力をregexのパターンとして入れているときとか)はterminalで繋がっているterminalのidが入っている。

wires

modules

たくさん種類がある。

共通

type

モジュールの種類を表す識別子。リストされてる名前と微妙に違ったりすることがあるので注意。

id

モジュールのid.

conf

モジュールごとに異なる設定情報。

FirebugでajaxCallをフックすればsaveしたときにデータがみられる。


 __o__ajaxCall = window.ajaxCall;
window.ajaxCall = function (u, json) {
  var p  = decodeURIComponent(json.def);
  var s = eval("(" + p+")")
  console.log(s)
  return __o__ajaxCall.apply(this, arguments );
}

もしくはロードされたときのresponseをとるのが速い。 http://pipes.yahoo.com/pipes/ajax.pipe.loadのレスポンスをFirebugでコピー。XHRをモニタして右クリックで"copy response body".そのままconsoleに貼るとオブジェクトができる。その中のpipe.definition

これでつくる。


clear()
var t = $x('//div[@class="docshelpmain"]/h3/a').map( function (e) {
 
var e = "###" + e.textContent.link(e.href) ;
console.log(e)
return e
}).join("\n\n")


t;
copy(t)

Source

Feed Auto-Discovery Module

Fetch CSV Module

Fetch Data Module

Fetch Feed Module

URLはひとつしかないと配列じゃなくなる。つーかそういう前提でコード書くことにして。

Fetch Site Feed Module

Flickr Module

Google Base Module

Item Builder Module

Yahoo! Local Module

Yahoo! Search Module

Fetch Page Module

Operators

Count Module

Filter Module

op: "contain", "doesnotcontain", "matches", "greater", "is", "after", "less", "before"

Location Extractor Module

Loop Module

Regex Module

Rename Module


{
  RULE : [
     field:    text
     newval:   text
     op:       text copy|rename
  ],
  ....
}

Reverse Module

Split Module

Sort Module

Sub-Element Module

Tail Module

Truncate Module

Union Module

Unique Module

Web Service Module

Strings

String Builder Module


{
  part : [
      text "string literal"
  ],
  ....
}

partがひとつしかないときは配列になってない。なんだそれー


{
  part :       text "string literal"
}

Sub String Module

Term Extractor Module

Translate Module

String Regex Module

RULEは常に配列。

String Replace Module

String Tokenizer Module

Yahoo! Shortcuts Module

Private String Module

changed April 10 delete history edit