App-ManagePoolStyleRepo

 view release on metacpan or  search on metacpan

script/manage-pool-style-repo  view on Meta::CPAN


A "pool-style repo" is a term I coined to refer to a directory structure that
contains a collection of items (media files like movies, songs, or books;
software, and so on). The items are put in C<pool/> top-level subdirectory. Each
item can be a file or a directory, although to have the benefit of giving tags,
you'll need to use a directory.

If you use C<pool1/> instead of C<pool>, then the items are expected to be put
under a layer of intermediate directory like shown in the example in
L</SYNOPSIS>. And if you use C<pool2/>, the items are expected to be put under
two layers of intermediate directories, also shown in the example. You can use
one or all of C<pool>, C<pool1>, C<pool2> to put your items.

This script can then be used to create C<index> directory structure which
contains symbolic links to the items. There are C<index/by-tag>,
C<index/by-title>. These directory structure can be navigated by any filesystem
tool of your choice.

This files organization is inspired from how Debian repository works.

=head1 SUBCOMMANDS

=head2 B<list-items>

=head2 B<update-index>

=head1 OPTIONS

C<*> marks required options.

=head2 Common options

=over

=item B<--config-path>=I<s>

Set path to configuration file.

Can actually be specified multiple times to instruct application to read from
multiple configuration files (and merge them).


Can be specified multiple times.

=item B<--config-profile>=I<s>

Set configuration profile to use.

A single configuration file can contain profiles, i.e. alternative sets of
values that can be selected. For example:

 [profile=dev]
 username=foo
 pass=beaver
 
 [profile=production]
 username=bar
 pass=honey

When you specify C<--config-profile=dev>, C<username> will be set to C<foo> and
C<password> to C<beaver>. When you specify C<--config-profile=production>,
C<username> will be set to C<bar> and C<password> to C<honey>.


=item B<--debug>

Shortcut for --log-level=debug.

=item B<--format-options>=I<s>

Pass options to formatter.

=item B<--format>=I<s>

Choose output format, e.g. json, text.

Default value:

 undef

Output can be displayed in multiple formats, and a suitable default format is
chosen depending on the application and/or whether output destination is
interactive terminal (i.e. whether output is piped). This option specifically
chooses an output format.


=item B<--help>, B<-h>, B<-?>

Display help message and exit.

=item B<--json>

Equivalent to --format=json-pretty.

=item B<--log-level>=I<s>

Set log level.

By default, these log levels are available (in order of increasing level of
importance, from least important to most): C<trace>, C<debug>, C<info>,
C<warn>/C<warning>, C<error>, C<fatal>. By default, the level is usually set to
C<warn>, which means that log statements with level C<info> and less important
levels will not be shown. To increase verbosity, choose C<info>, C<debug>, or
C<trace>.

For more details on log level and logging, as well as how new logging levels can
be defined or existing ones modified, see L<Log::ger>.


=item B<--naked-res>

When outputing as JSON, strip result envelope.

Default value:

 0

By default, when outputing as JSON, the full enveloped result is returned, e.g.:

 [200,"OK",[1,2,3],{"func.extra"=>4}]

The reason is so you can get the status (1st element), status message (2nd



( run in 0.628 second using v1.01-cache-2.11-cpan-e1769b4cff6 )