comparison lib/Slideshow/Util.pm @ 36:74859abd87cc

update cli tool
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Mon, 07 May 2018 12:59:27 +0900
parents 952136cc268f
children
comparison
equal deleted inserted replaced
35:0d0c8ed9adb4 36:74859abd87cc
44 return { build_point=> $path}; 44 return { build_point=> $path};
45 } else { 45 } else {
46 return { build => "recent"}; 46 return { build => "recent"};
47 } 47 }
48 48
49
50 } elsif ( $arg eq "build-open"){ 49 } elsif ( $arg eq "build-open"){
51 return { build_open => 1}; 50 return { build_open => 1};
52 51
53 } elsif ( $arg eq "open"){ 52 } elsif ( $arg eq "open"){
54 return { open => 1}; 53 return { open => 1};
91 my $date = shift @{ [sort { $b->stat->mtime <=> $a->stat->mtime } $root_dir->children]}; 90 my $date = shift @{ [sort { $b->stat->mtime <=> $a->stat->mtime } $root_dir->children]};
92 91
93 return $date; 92 return $date;
94 } 93 }
95 94
96 95 # sub zip {
97 96 # my $recently = _search_recently(shift);
97 # my $t = localtime;
98 #
99 # my ($y,$m,$d) = ($t->strftime('%Y'), $t->strftime('%m'), $t->strftime('%d'));
100 # my $zip = $root_dir->child($y .'/'. $m .'/'. $d .'/'.'zip.txt')->touchpath;
101 #
102 # $t -= ONE_WEEK;
103 #
104 # for(1..7){
105 # my ($y,$m,$d) = ($t->strftime('%Y'), $t->strftime('%m'), $t->strftime('%d'));
106 # my $memo = $root_dir->child($y .'/'. $m .'/'. $d .'/'.'memo.txt')->touchpath;
107 # $zip->append($memo->slurp);
108 # }
109 # }
110 #
98 sub build_recently { 111 sub build_recently {
99 my $recently = _search_recently(shift); 112 my $recently = _search_recently(shift);
100 _build($recently); 113 _build($recently);
101 } 114 }
102 115