遅くなりましたが、リニューアル対応の改訂版です。
ただし、リスニング編の解説と解答の<解説>の部分がうまくレイアウトできずに
読みにくくなってしまっています。
きれいに表示されるようにできる方法があれば教えていただけると助かります。
config-yahoo-toeic.yaml
global:
plugin_path:
- C:\Perl\site\lib\Plagger\Plugin
assets_path: C:\Perl\site\lib\Plagger\assets
timezone: Asia/Tokyo
log:
level: info
cache:
base: C:\plagger
plugins:
- module: Subscription::Config
config:
feed:
- url: http://stepup.yahoo.co.jp/shikaku/toeic/index.html
- url: http://stepup.yahoo.co.jp/shikaku/toeic/today_question.html?ttype=l&diff=0
- url: http://stepup.yahoo.co.jp/shikaku/toeic/today_question.html?ttype=r&diff=0
- module: Filter::EntryFullText
- module: Filter::BreakEntriesToFeeds
- module: Publish::Gmail
config:
mailto: example+toeic@gmail.com
mailfrom: example@gmail.com
mailroute:
via: smtp_tls
host: smtp.gmail.com:587
username: example@gmail.com
password: Gmail_PASSWORD
Filter-EntryFullText\yahoo-toeic.yaml
# Yahoo TOEIC daily
author: Shigefumi
custom_feed_handle: http://stepup\.yahoo\.co\.jp/shikaku/toeic/index\.html
custom_feed_follow_link: today_question.html\?ttype=[lr]\&diff=0
handle: http://stepup\.yahoo\.co\.jp/shikaku/toeic/today_question\.html\?ttype=[lr]\&diff=0
extract: <td bgColor="#dddddd" width=100%><b>(.*?)\n<td width=1% bgcolor="#dddddd" align="right" nowrap>.*?(TOEIC の Part.*?)<tr>\n<td><b>
extract_capture: title body
extract_after_hook: |
$data->{title} =~ s!</b>!!g;
Filter-EntryFullText\yahoo-toeic-answer.yaml
# Yahoo TOEIC daily (answer)
author: Shigefumi
custom_feed_handle: http://stepup\.yahoo\.co\.jp/shikaku/toeic/today_question\.html\?ttype=[lr]\&diff=0
custom_feed_follow_link: today_answer\.html\?ttype=[lr]\&diff=0\&a=A
handle: http://stepup\.yahoo\.co\.jp/shikaku/toeic/today_answer\.html\?ttype=[lr]\&diff=0\&a=A
extract: (今日の問題 解説と解答.*?編)).*?(?:</td>\n<td><font size=4><b>あなたの解答A、|</td>\n<td><font size=4><b>)(.*?)<hr>
extract_capture: title body
extract_after_hook: |
$data->{title} =~ s!</[bB]>!!g;
これで1日1回実行すれば、以下のように Gmailに4通送られてきます。

メールの件名については、
以前の記事
と同様に、entryタイトルが件名になるように BreakEntriesToFeeds を変更しています。
[2006年 8/27 追記]
Changeset 1143
以降の BreakEntriesToFeeds であれば、メールの件名をフィードのタイトルではなく、
エントリのタイトルにするのに config:use_entry_title が使えます。
config-yahoo-toeic.yamlの BreakEntriesToFeeds の部分は、以下のようにしました。
- module: Filter::BreakEntriesToFeeds
config:
use_entry_title: 1
[追記ここまで]
送られてくるメールの内容は、TOEICデイリーミニテストの内容ほぼそのままです。
解答へのリンク(A,B,C,D)は省略しています。
リスニング問題のオーディオ以外は Gmail内で完結できます。
ということで、毎日英語にふれるようにがんばっていきます。










