Changeset 188
- Timestamp:
- Jan 21, 2018, 12:17:43 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/project-meta/project-meta
r186 r188 1 1 #!/usr/bin/env perl 2 2 # 3 # 2018/01/17 Gabriel Moreau 3 # 2018/01/17 Gabriel Moreau <Gabriel.Moreau(A)univ-grenoble-alpes.fr> 4 4 # 5 5 # apt-get install yamllint libyaml-syck-perl libtemplate-perl libarchive-zip-perl … … 13 13 use Cwd(); 14 14 use Template; 15 use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); 15 16 16 17 … … 53 54 ################################################################ 54 55 56 sub print_ok { 57 my ($key, $test) = @_; 58 59 printf "%-35s : %s\n", $key, $test ? 'yes' : 'no'; 60 } 61 62 ################################################################ 63 64 sub addfolder2list { 65 my ($folderdb, $folder) = @_; 66 67 $folder =~ s{/[^/]+$}{}; 68 69 return if $folder !~ m{/}; 70 71 $folderdb->{$folder}++; 72 return addfolder2list($folderdb, $folder); 73 } 74 55 75 ################################################################ 56 76 # command … … 82 102 ################################################################ 83 103 84 sub print_ok {85 my ($key, $test) = @_;86 87 printf "%-35s : %s\n", $key, $test ? 'yes' : 'no';88 }89 90 ################################################################91 92 104 sub cmd_check { 93 105 my $meta = YAML::Syck::LoadFile("PROJECT-META.yml"); … … 102 114 103 115 #print YAML::Syck::Dump($meta); 104 }105 106 ################################################################107 108 sub addfolder2list {109 my ($folderdb, $folder) = @_;110 111 $folder =~ s{/[^/]+$}{};112 113 return if $folder !~ m{/};114 115 $folderdb->{$folder}++;116 return addfolder2list($folderdb, $folder);117 116 } 118 117 … … 177 176 178 177 # Create a Zip file 179 use Archive::Zip qw( :ERROR_CODES :CONSTANTS );180 181 178 my $zip = Archive::Zip->new(); 182 179 … … 362 359 =head1 DESCRIPTION 363 360 364 C<project-meta>is a small tool to maintain a set of open data files.365 In order to help you in this task, C<project-meta> has a set of subcommand366 to generated and maintain many files .361 Project-Meta is a small tool to maintain a set of open data files. 362 In order to help you in this task, C<project-meta> command has a set of action 363 to generated and maintain many files in your dataset. 367 364 368 365 Everything is declare in the metafile F<PROJECT-META.yml>. 369 366 This YAML file must exist in your root projet folder. 370 See L< METAFILE SPECIFICATION>.367 See L</METAFILE SPECIFICATION>. 371 368 372 369 =head1 COMMANDS … … 375 372 Theses could be not well defined, not finished, not well tested... 376 373 You can read the source code and use them at your own risk 377 (like for all the Klaskcode).374 (like for all the Project-Meta code). 378 375 379 376 =head2 check … … 392 389 393 390 The licence is defined in the PROJECT-META.yml specification under the key C<public-dap/data-licence>. 394 The list of possible licence is given with the command L< list-licence>.391 The list of possible licence is given with the command L</list-licence>. 395 392 396 393 =head2 list-licence … … 417 414 418 415 419 =head1 BUG 420 421 - make-link: folder/folder 422 - make-link: support multiple doi 423 - metafile: remove prop publication/url 416 =head1 KNOWN BUGS 417 418 - not really check keys and tags before doing action! 424 419 425 420 =head1 SEE ALSO … … 436 431 The list of people below did not directly contribute to project-meta's source code 437 432 but provided me with some data, returned bugs 438 or helped me in another small task like having new ideas 433 or helped me in another small task like having new ideas, specifications... 439 434 Maybe I forgot your contribution in recent years, 440 435 please forgive me in advance and send me an e-mail to correct this.
Note: See TracChangeset
for help on using the changeset viewer.