Mercurial > hg > Members > anatofuz > slides
annotate slide-cr @ 17:b073867b46ba
modofied slide-cr
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Feb 2018 18:35:24 +0900 |
parents | 80767afba59c |
children | 952136cc268f |
rev | line source |
---|---|
4
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 #!/usr/bin/env perl |
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 use strict; |
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3 use warnings; |
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 use utf8; |
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5 |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
6 use lib "lib","lib/Slideshow/local/lib/perl5"; |
4
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 |
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8 use Slideshow::Util; |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
9 use feature 'say'; |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
10 |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
11 my $flags = getopts(@ARGV); |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
12 |
17
b073867b46ba
modofied slide-cr
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
13 if ( $flags->{help} ){ |
b073867b46ba
modofied slide-cr
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
14 help(); |
b073867b46ba
modofied slide-cr
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
15 exit; |
b073867b46ba
modofied slide-cr
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
15
diff
changeset
|
16 } |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
17 |
4
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
19 if ($flags->{new}){ |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
20 new(set_template('lib/template.md'),"slides"); |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
21 } elsif ($flags->{build}) { |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
22 build_recently("slides"); |
15
80767afba59c
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
23 } elsif ($flags->{build_open}) { |
80767afba59c
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
24 build_recently("slides"); |
80767afba59c
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
25 open_slide("slides"); |
13
967fe50f1ef4
add open and edit mode
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
12
diff
changeset
|
26 } elsif ( $flags->{open}) { |
967fe50f1ef4
add open and edit mode
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
12
diff
changeset
|
27 open_slide("slides"); |
967fe50f1ef4
add open and edit mode
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
12
diff
changeset
|
28 } elsif ( $flags->{edit}) { |
967fe50f1ef4
add open and edit mode
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
12
diff
changeset
|
29 edit_slide("slides"); |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
30 } else { |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
31 build_pinpoint($flags->{build_point}); |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
32 } |
4
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
33 |
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
34 |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
35 sub help { |
15
80767afba59c
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
36 say 'slider [new build build-open open edit]'; |
4
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
37 } |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
38 |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
39 |
15
80767afba59c
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
40 __END__ |