comparison after5.rb @ 10:b2f1a9482975 draft

RCS-revision 1.11 date: 2004/02/08 15:43:59; author: yuuji; state: Exp; lines: +5 -4 Do not canonify notify_list file name to avoid error on old format file.
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 08 Feb 2004 15:43:59 +0859
parents fbe1de450bd7
children 84d3608bb529
comparison
equal deleted inserted replaced
9:fbe1de450bd7 10:b2f1a9482975
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.10 2004/01/20 17:21:36 yuuji Exp $ 5 # $Id: after5.rb,v 1.11 2004/02/08 15:43:59 yuuji Exp $
6 # Last modified Wed Jan 21 02:19:14 2004 on firestorm 6 # Last modified Mon Feb 9 00:33:48 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
649 gomifiles = [] 649 gomifiles = []
650 ntl = {} 650 ntl = {}
651 return ntl unless test(?d, @crondir) 651 return ntl unless test(?d, @crondir)
652 Dir.foreach(@crondir){|datedir| 652 Dir.foreach(@crondir){|datedir|
653 next unless /(\d\d\d\d+)-(\d+)-(\d+)-(\d\d\d\d)/ =~ datedir 653 next unless /(\d\d\d\d+)-(\d+)-(\d+)-(\d\d\d\d)/ =~ datedir
654 datedir = sprintf("%04d-%02d-%02d-%04d", 654 ##datedir = sprintf("%04d-%02d-%02d-%04d",
655 $1.to_i, $2.to_i, $3.to_i, $4.to_i) 655 ## $1.to_i, $2.to_i, $3.to_i, $4.to_i)
656 datedir.untaint
656 dd = File.join(@crondir, datedir) 657 dd = File.join(@crondir, datedir)
657 next unless test(?d, dd) 658 next unless test(?d, dd)
658 y, m, d, hm = $1.to_i, $2.to_i, $3.to_i, $4.to_i 659 y, m, d, hm = $1.to_i, $2.to_i, $3.to_i, $4.to_i
659 hh = hm/100 % 60 660 hh = hm/100 % 60
660 mm = (hm%100) % 60 661 mm = (hm%100) % 60

yatex.org