# HG changeset patch # User KAMURA Sota # Date 1328612900 -32400 # Node ID 6c763cb4ea401977a61119f186a3bcc9919040cb # Parent f1a06832e7de23c769b118331c0b8d7aecd07b13 change path on xsotter_mail.rb diff -r f1a06832e7de -r 6c763cb4ea40 xsotter_class.rb --- a/xsotter_class.rb Tue Feb 07 17:40:51 2012 +0900 +++ b/xsotter_class.rb Tue Feb 07 20:08:20 2012 +0900 @@ -10,7 +10,7 @@ class Xsotter def initialize (token_path) - @path = File.expand_path(token_path) + p @path = File.expand_path(token_path) # @path = File.expand_path("~") + "/.xsotter_token" @login = false @kcode = "-e" diff -r f1a06832e7de -r 6c763cb4ea40 xsotter_mail.rb --- a/xsotter_mail.rb Tue Feb 07 17:40:51 2012 +0900 +++ b/xsotter_mail.rb Tue Feb 07 20:08:20 2012 +0900 @@ -1,25 +1,27 @@ -#! /usr/bin/env ruby +#!/home/irhome/c109/c109047/sun4v/ruby/bin/ruby +# #! /usr/bin/env ruby # -*- coding: euc-jp -*- require '/home/irhome/c109/c109047/xsotter/xsotter_class' -=begin + sender = ENV['SENDER'] rcpt = ENV['RECIPIENT'] -body = ""#Array.new +body = "" #Array.new if sender == nil || rcpt === nil exit 0 elsif/.*@.*/ !~ sender exit 0 end + while line = gets f=1 if /^$/=~line if f ==1 body += line end end -STDERR.puts NKF.nkf('-e', body) +body = NKF.nkf('-e', body) com=["-T", body] -=end -com=["-T", "post test"] -xsotter=Xsotter.new("~/xsotter/c109047_token") + +#com=["-T", "test"] +xsotter=Xsotter.new("/home/irhome/c109/c109047/xsotter/c109047_token") xsotter.comand(com)