Mercurial > hg > Members > anatofuz > slides
annotate slide-cr @ 15:80767afba59c
auto-Update generated slides by script
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 30 Jan 2018 19:09:40 +0900 |
parents | 967fe50f1ef4 |
children | b073867b46ba |
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 |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
13 help() if $flags->{help}; |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
14 |
4
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
15 |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
16 if ($flags->{new}){ |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
17 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
|
18 } elsif ($flags->{build}) { |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
19 build_recently("slides"); |
15
80767afba59c
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
20 } elsif ($flags->{build_open}) { |
80767afba59c
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
21 build_recently("slides"); |
80767afba59c
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
22 open_slide("slides"); |
13
967fe50f1ef4
add open and edit mode
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
12
diff
changeset
|
23 } elsif ( $flags->{open}) { |
967fe50f1ef4
add open and edit mode
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
12
diff
changeset
|
24 open_slide("slides"); |
967fe50f1ef4
add open and edit mode
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
12
diff
changeset
|
25 } elsif ( $flags->{edit}) { |
967fe50f1ef4
add open and edit mode
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
12
diff
changeset
|
26 edit_slide("slides"); |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
27 } else { |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
28 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
|
29 } |
4
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
30 |
03ab44e80533
add make script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
31 |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
32 sub help { |
15
80767afba59c
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
33 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
|
34 } |
6
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
35 |
e35e9779078a
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
36 |
15
80767afba59c
auto-Update generated slides by script
Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
37 __END__ |