Mercurial > hg > Members > anatofuz > slides
annotate slide-cr @ 31:686b1eaf6e90
auto-Update generated slides by script
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 27 Apr 2018 15:56:54 +0900 |
parents | 952136cc268f |
children | 2eac67c0d7da 74859abd87cc |
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"); |
21
952136cc268f
upgrade directory separate
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
17
diff
changeset
|
28 } elsif ($flags->{memo}) { |
952136cc268f
upgrade directory separate
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
17
diff
changeset
|
29 edit_memo("slides"); |
13
967fe50f1ef4
add open and edit mode
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
12
diff
changeset
|
30 } elsif ( $flags->{edit}) { |
967fe50f1ef4
add open and edit mode
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
12
diff
changeset
|
31 edit_slide("slides"); |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
32 } else { |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
33 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
|
34 } |
4
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
35 |
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
36 |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
37 sub help { |
15
80767afba59c
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
38 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
|
39 } |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
40 |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
41 |
15
80767afba59c
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
42 __END__ |