changeset 5:f1a06832e7de

change xsotter*
author KAMURA Sota <c109047@e.koeki-u.ac.jp>
date Tue, 07 Feb 2012 17:40:51 +0900
parents 213b92c211e0
children 6c763cb4ea40
files xsotter.rb xsotter_class.rb xsotter_mail.rb
diffstat 3 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/xsotter.rb	Mon Feb 06 18:02:12 2012 +0900
+++ b/xsotter.rb	Tue Feb 07 17:40:51 2012 +0900
@@ -1,9 +1,8 @@
 #! /usr/bin/env ruby
 # -*- coding: euc-jp -*-
 require'/home/irhome/c109/c109047/xsotter/xsotter_class'
-#afdsasdfasdf
 begin 
-  xsotter = Xsotter.new("/.xsotter_token")
+  xsotter = Xsotter.new("~/.xsotter_token")
   xsotter.comand(ARGV)
 rescue =>err
   puts err
--- a/xsotter_class.rb	Mon Feb 06 18:02:12 2012 +0900
+++ b/xsotter_class.rb	Tue Feb 07 17:40:51 2012 +0900
@@ -10,7 +10,7 @@
 class Xsotter
   
   def initialize (token_path)
-    @path = File.expand_path("~") + token_path
+    @path = File.expand_path(token_path)
     # @path = File.expand_path("~") + "/.xsotter_token"
     @login = false
     @kcode = "-e"
--- a/xsotter_mail.rb	Mon Feb 06 18:02:12 2012 +0900
+++ b/xsotter_mail.rb	Tue Feb 07 17:40:51 2012 +0900
@@ -2,7 +2,7 @@
 # -*- coding: euc-jp -*-
 
 require '/home/irhome/c109/c109047/xsotter/xsotter_class'
-
+=begin
 sender = ENV['SENDER']
 rcpt = ENV['RECIPIENT']
 body = ""#Array.new
@@ -18,5 +18,8 @@
   end
 end
 STDERR.puts NKF.nkf('-e', body)
-body=["-T", body]
-Xsotter.new(body)
+com=["-T", body]
+=end
+com=["-T", "post test"]
+xsotter=Xsotter.new("~/xsotter/c109047_token")
+xsotter.comand(com)

yatex.org