-
Notifications
You must be signed in to change notification settings - Fork 0
/
epfl-sciper-list
executable file
·123 lines (74 loc) · 2.32 KB
/
epfl-sciper-list
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Long;
use Pod::Usage;
use Carp qw/croak/;
use English qw/-no_match_vars/;
use EPFL::Sciper::List qw/retrieveSciper toJson toTsv/;
=head1 NAME
epfl-sciper-list
=head1 DESCRIPTION
Get a list of all public active sciper from EPFL
=head1 VERSION
Version 1.02
=head1 USAGE
epfl-sciper-list --help
epfl-sciper-list --output=json > sciper.json
epfl-sciper-list --output=tsv > sciper.tsv
=head1 OPTIONS
=over 2
=item --output=tsv|json
Output format in TSV or Json.
=back
=cut
our $VERSION = '1.02';
my ( $help, $output );
GetOptions(
'output=s' => \$output,
'help' => \$help,
) || pod2usage(2);
if ($help) {
pod2usage(1);
exit 0;
}
my @listPersons = retrieveSciper();
if ( $output eq 'json' ) {
print toJson(@listPersons) or croak "Couldn't write: $OS_ERROR";
}
else {
print toTsv(@listPersons) or croak "Couldn't write: $OS_ERROR";
}
=head1 AUTHOR
William Belle, C<< <william.belle at gmail.com> >>
=head1 BUGS AND LIMITATIONS
Please report any bugs or feature requests here L<https://github.com/innovativeinnovation/epfl-sciper-list/issues>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc epfl-sciper-list
You can also look for information at:
=over 4
=item * AnnoCPAN: Annotated CPAN documentation
L<http://annocpan.org/dist/EPFL-Sciper-List>
=item * CPAN Ratings
L<http://cpanratings.perl.org/d/EPFL-Sciper-List>
=item * Search CPAN
L<http://search.cpan.org/dist/EPFL-Sciper-List/>
=back
=head1 LICENSE AND COPYRIGHT
Original work Copyright ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE,
Switzerland, VPSI, 2017-2018.
Modified work Copyright William Belle, 2018-2019.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
L<http://www.apache.org/licenses/LICENSE-2.0>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=cut
1;