otsune's SnakeOil RSSフィード

python -c "print''.join([chr(x) for x in 111&1101,110+~-~11,10^11*11,110+~-~11,-~101,-~11^11*11,~-110,111&11*11,11+11+10,11|~-0110,1-~11^11*11,10^11*11,-~11^11*11,110,101])"

2007-04-22

今日の日付に一致するEntryだけFilterするexpressionレシピ

| 今日の日付に一致するEntryだけFilterするexpressionレシピ - otsune's SnakeOil  を含むブックマーク はてなブックマーク - 今日の日付に一致するEntryだけFilterするexpressionレシピ - otsune's SnakeOil  今日の日付に一致するEntryだけFilterするexpressionレシピ - otsune's SnakeOil  のブックマークコメント

2007-04-21 - Muibrogの話題。

Rule: expression:で$args->{entry}->dateが今日の日付かどうかを判定すれば出来そうなのでやってみた。

  - module: CustomFeed::Manganomori

  - module: Filter::Rule
    rule:
      expression: $args->{entry}->date->ymd eq Plagger::Date->now(timezone=>'Asia/Tokyo')->ymd

  - module: Publish::Twitter
    config:
       username: xxxxxxxx
       password: xxxxxxxx

これもexpression hackっぽいので、Filter::Dateとかlib/Plagger/Rule/にRule moduleで使いやすいインターフェースの物が有ると良いのかも。

(日付指定だとfindの+nとか-nの引数を思いつくけど)

追記:

(Aheadは野良プラグインなので、以下の記述は参考情報という感じで。GitHub Pages ? File Not Found ? GitHubのあたりも参照)っていうか、Ruleのmodule見てて気がついたけど

  - module: CustomFeed::Manganomori

  - module: Filter::Rule
    rule:
      module: Ahead
      duration: 1440 # 24 hours

  - module: Publish::Twitter
    config:
       username: xxxxxxxx
       password: xxxxxxxx

で、よくね?

まぁ厳密には「日付として今日」というフィルターではないけど。