RRRS
mayokara氏謹製の http://feedgen.appjet.net で遊んでみた。
- マクロスF○×△
- http://feedgen.appjet.net/?url=http%3A%2F%2Fwww.animate.tv%2Fdigital%2Fweb_radio%2Fdetail_104.html&re=main_title2%22%3E%3Cp%3E(%5B%5Cs%5CS%5D*%3F)%3C%2Fp%5B%5Cs%5CS%5D%2B%3F%3Ctd+class%3D%22main_txt1%5B%5E%3E%5D*%3E(%5B%5Cs%5CS%5D*%3F)%3C%2Ftable&title=1&description=2&feedtitle=%E3%81%95%E3%82%88%E3%81%AA%E3%82%89%E7%B5%B6%E6%9C%9B%E6%94%BE%E9%80%81&feeddescription=powered+by+feedgen.appjet.net&language=ja
- http://feedgen.appjet.net/?url=http%3A%2F%2Fwww.animate.tv%2Fdigital%2Fweb_radio%2Fdetail_140.html&re=%3D%22main_title2%5B%5E%3C%5D%2B%3Cp%3E(.%2B%3F)%3C%2Fp%3E%5B%5Cs%5CS%5D%2B%3Fmain_txt1%5B%5E%3E%5D*%3E(%5B%5Cs%5CS%5D%2B%3F%3C%2Ftable%3E)&title=1&description=2&feedtitle=%E7%B5%B6%E5%AF%BE%E5%8F%AF%E6%86%90%E6%94%BE%E9%80%81%E5%B1%80&feeddescription=powered+by+feedgen.appjet.net&language=ja
単純なフィード生成ならPipesでPageFetchするより遙かに使いやすい。
変にタグをいじられたりもしないし。
+
バグを見つけたのでパッチを。
--- feedgen.js 2008-09-23 17:02:48.789108300 +0900 +++ feed9en.js 2008-09-23 18:18:10.659308300 +0900 @@ -59,17 +59,18 @@ link: h(p.url), description: h(p.feeddescription || (res.data.match(/<meta[^<]+name=(["'])description\1[^<]+content=(["'])([\s\S]+?)\2[^<]*>/i) || {})[3] || ""), language: h(p.language || (res.data.match(/<html[^<]+lang=(["'])([\s\S]+?)\1[^<]*>/i) || {})[2] || ""), - date: h(res.headers["Last-Modified"][0] || res.headers["Date"][0]), + date: h((res.headers["Last-Modified"] || {})[0] || (res.headers["Date"] || {})[0]), self: h("http://" + appjet.appName + "." + appjet.mainDomain + request.path + "?" + request.query), }; var re = new RegExp(p.re, "mg"), items = [], m; +var [t, d] = [p.title, p.description].map(function(x){ return (x || "").split(" ") }); while (m = re.exec(res.data)) { var guid = md5(m[0]); items.push({ - title: h(m[p.title]), + title: h([m[x] || x for each(x in t)].join('')), link: h(channel.link + "#" + guid), guid: guid, - description: m[p.description], + description: [m[x] || x for each(x in d)].join(''), }); } if (items.length > MAX_ITEMS_COUNT) items = items.slice(0, MAX_ITEMS_COUNT);
ついでに title/description の自由度を向上。
++
しかしRRRSってなんやねん。RRSSならまだ分かった。
+++
採用していただいた。
前後に空白を入れなければ素の数字も使えるのでほぼ不自由無し。