Mercurial > hgrepos > hgweb.cgi > xsotter
comparison xsotter_mail.rb @ 12:42e9379d8c1d default tip
gem ver up to 1.8.20 twitter ver up 2.1.1
author | KAMURA Sota <c109047@e.koeki-u.ac.jp> |
---|---|
date | Thu, 22 Mar 2012 14:06:08 +0900 |
parents | 4dcbbfa7f191 |
children |
comparison
equal
deleted
inserted
replaced
11:4dcbbfa7f191 | 12:42e9379d8c1d |
---|---|
20 else | 20 else |
21 subject = line.split(/:/)[1] if /Subject/ =~ line | 21 subject = line.split(/:/)[1] if /Subject/ =~ line |
22 end | 22 end |
23 end | 23 end |
24 | 24 |
25 | |
25 if body.split(/^-+$/e).size >= 2 | 26 if body.split(/^-+$/e).size >= 2 |
26 body = body.split(/^-+$/e) | 27 body = body.split(/^-+$/e) |
27 post = body[1] + subject + body[0] | 28 post = body[1] + subject + body[0] |
28 else | 29 else |
29 post = subject + body | 30 post = subject + body |
30 end | 31 end |
32 | |
31 post = $& if /.{140}/me=~post | 33 post = $& if /.{140}/me=~post |
32 com=["-T", NKF.nkf('-e',post)] | 34 com=["-T", NKF.nkf('-e',post)] |
33 #com=["-T", "test"] | 35 #com=["-T", "test"] |
34 xsotter=Xsotter.new("/home/irhome/c109/c109047/xsotter/c109047_token") | 36 xsotter=Xsotter.new("/home/irhome/c109/c109047/xsotter/c109047_token") |
35 xsotter.comand(com) | 37 xsotter.comand(com) |