本当は怖いHPC

HPC屋の趣味&実益ブログ

del.icio.usに登録したブックマークをあとからGmailで検索したかったので、Plaggerに添付されているatode.yamlを改造して送るようにしました。この設定ファイルは、「後で読む」ためにメールで送るっていう趣旨だけど、すべて無条件で送るように変更しています。

普通に Plagger のインストールは済ませてあったんだけど、Net::SMTP::TLSが無かったのでインストール。

Checking for OpenSSL-0.9.6j or 0.9.7b or newer...
I could not find your OpenSSL in `INSTALLDIRS=site'
Please provide OpenSSL-0.9.6j or
OpenSSL-0.9.7b installation directory (get from
 http://www.openssl.org/ if you don't have it; please note that
 SSLeay is no longer supported, see README) (C-c to abort):

といわれてインストール出来なかったので少々ハマりました。

結局、debianだったので

$ sudo apt-get install libio-socket-ssl-perl
$ cpan Net::SMTP::TLS

で解決。

ところで、添付されている状態のexamples/atode.yamlだと、送られてくるメール内の画像がリンク切れになってしまいます。なので、Filter::ResolveRelativeLinkと、Filter::EntryFullTextの順番を入れ替え。意味あるのかは知らないけれど…

というわけで、ブックマークの中から全文検索ができるようになって幸せです。

# Bookmark web pages "to read later" on del.icio.us
# Send HTML emails out of those bookmarks to your inbox

global:
  # Set timezone to Tokyo
  timezone: Asia/Tokyo

plugins:
  # Add del.icio.us bookmarks tagged "toread"
  - module: Subscription::Config
    config:
      feed:
        - http://del.icio.us/rss/k.fukuda/

  # Upgrade entry body to fulltext. Even if upgrade fails, store the whole HTML
  - module: Filter::EntryFullText
    config:
      store_html_on_failure: 1

  # Resolve relative links in the entry body
  - module: Filter::ResolveRelativeLink

  # Deduplicate entries using URL + datetime as a key
  - module: Filter::Rule
    rule:
      module: Deduped

  # Break each entry as a feed so Gmail will send you emails per entry
  - module: Filter::BreakEntriesToFeeds

  # Finally send emails to your Gmail account using localhost SMTP server
  - module: Publish::Gmail
    config:
      mailto: xxxxxxxxxxxxx+plagger@gmail.com
      mailfrom: xxxxxxxxxxxxx+plagger@gmail.com
      mailroute:
        via: smtp_tls
        host: smtp.gmail.com:587
        username: xxxxxxxxxxxxxxx@gmail.com
        password: xxxxxxxxxxxxxxx
【広告】