Prev / Next

2004-11-14 / postdiary.rb

http://tdiary-users.sourceforge.jp/cgi-bin/wiki.cgi?posttdiary%2Erb

使うかどうかはわからないけど,
tDiary をメールで更新する postdiary.rb を入れてみる.

ためしに携帯からのメールを procmail で postdiary.rb に渡してみると
(subject: メールでの更新テスト,本文: テスト,--use-subject つき),

  メールでの更新テストテスト


となって,subject がセクションのタイトルにならない.

rd style 使ってるからかと思いあたり,
postdiary.rb を書き換え.

  diff -u bin/posttdiary.rb~ bin/posttdiary.rb
  --- bin/posttdiary.rb~  2004-11-14 02:22:13.000000000 +0900
  +++ bin/posttdiary.rb   2004-11-14 02:52:26.000000000 +0900
  @@ -200,7 +200,7 @@
          end
          if use_subject then
                  title = ''
  -               @body = "#{subject}\n#{@body}"
  +               @body = "= #{subject}\n#{@body}"
          else
                  title = subject
          end


style を指定するオプションをつけたほうがいいのか?

comments powered by Disqus