comparison after5.rb @ 5:e26bc5d3563b draft

RCS-revision 1.6 date: 2004/01/03 02:45:14; author: yuuji; state: Exp; lines: +6 -6 Do not display '=', when @params['headline']==name.
author HIROSE Yuuji <yuuji@gentei.org>
date Sat, 03 Jan 2004 02:45:14 +0859
parents b7e65c9caa23
children f4b10ab5479f
comparison
equal deleted inserted replaced
4:b7e65c9caa23 5:e26bc5d3563b
1 #!/usr/local/bin/ruby 1 #!/usr/local/bin/ruby
2 # 2 #
3 # Associative Scheduling Table - after5 3 # Associative Scheduling Table - after5
4 # (C)2003, 2004 by HIROSE Yuuji [yuuji@gentei.org] 4 # (C)2003, 2004 by HIROSE Yuuji [yuuji@gentei.org]
5 # $Id: after5.rb,v 1.5 2004/01/02 14:48:43 yuuji Exp $ 5 # $Id: after5.rb,v 1.6 2004/01/03 02:45:14 yuuji Exp $
6 # Last modified Fri Jan 2 23:42:03 2004 on firestorm 6 # Last modified Sat Jan 3 01:06:04 2004 on firestorm
7 # See http://www.gentei.org/~yuuji/software/after5/ 7 # See http://www.gentei.org/~yuuji/software/after5/
8 # このスクリプトはEUCで保存してください。 8 # このスクリプトはEUCで保存してください。
9 9
10 require 'kconv' 10 require 'kconv'
11 11
1511 sprintf "%s%s", 1511 sprintf "%s%s",
1512 time == @opt['alldaydir'] ? '' : time+":", 1512 time == @opt['alldaydir'] ? '' : time+":",
1513 if personal 1513 if personal
1514 text.split("\n") ##[0] 1514 text.split("\n") ##[0]
1515 else 1515 else
1516 nickname(who) + '=' + \ 1516 nickname(who) + \
1517 if headline == 'whole' 1517 if headline == 'whole'
1518 text 1518 '=' + text
1519 elsif headline == 'head5char' 1519 elsif headline == 'head5char'
1520 text.gsub(/\n/, '').sub(/(.{5}).*/, '\1') 1520 '=' + text.gsub(/\n/, '').sub(/(.{5}).*/, '\1')
1521 elsif headline == 'headline' 1521 elsif headline == 'headline'
1522 text.split("\n")[0] 1522 '=' + text.split("\n")[0]
1523 end.to_s 1523 end.to_s
1524 end 1524 end
1525 }.join("<br>") 1525 }.join("<br>")
1526 }.join("<br>\n") 1526 }.join("<br>\n")
1527 else 1527 else

yatex.org