—#!perl
# Note: This script is a CLI for Riap function /App/NutrientUtils/list_nutrients
# and generated automatically using Perinci::CmdLine::Gen version 0.502
use
5.010001;
use
strict;
use
warnings;
our
$AUTHORITY
=
'cpan:PERLANCAR'
;
# AUTHORITY
our
$DATE
=
'2024-05-14'
;
# DATE
our
$DIST
=
'App-NutrientUtils'
;
# DIST
our
$VERSION
=
'0.001'
;
# VERSION
my
$cmdline
= Perinci::CmdLine::Any->new(
url
=>
"/App/NutrientUtils/list_nutrients"
,
program_name
=>
"list-nutrients"
,
read_config
=> 0,
read_env
=> 0,
);
$cmdline
->run;
# ABSTRACT: List nutrients
# PODNAME: list-nutrients
__END__
=pod
=encoding UTF-8
=head1 NAME
list-nutrients - List nutrients
=head1 VERSION
This document describes version 0.001 of list-nutrients (from Perl distribution App-NutrientUtils), released on 2024-05-14.
=head1 SYNOPSIS
B<list-nutrients> B<L<--help|/"--help, -h, -?">> (or B<L<-h|/"--help, -h, -?">>, B<L<-?|/"--help, -h, -?">>)
B<list-nutrients> B<L<--version|/"--version, -v">> (or B<L<-v|/"--version, -v">>)
B<list-nutrients> [B<L<--category-contains|/"--category-contains=s">>=I<str>] [(B<L<--category-in|/"--category-in=s@">>=I<str>)+|B<L<--category-in-json|/"--category-in=s@">>=I<json>] [B<L<--category-is|/"--category-is=s">>=I<str>] [B<L<--category-isnt|/"--category-isnt=s">>=I<str>] [B<L<--category-max|/"--category-max=s">>=I<str>] [B<L<--category-min|/"--category-min=s">>=I<str>] [B<L<--category-not-contains|/"--category-not-contains=s">>=I<str>] [(B<L<--category-not-in|/"--category-not-in=s@">>=I<str>)+|B<L<--category-not-in-json|/"--category-not-in=s@">>=I<json>] [B<L<--category-xmax|/"--category-xmax=s">>=I<str>] [B<L<--category-xmin|/"--category-xmin=s">>=I<str>] [B<L<--category|/"--category=s">>=I<str>] [B<L<--default-unit-contains|/"--default-unit-contains=s">>=I<str>] [(B<L<--default-unit-in|/"--default-unit-in=s@">>=I<str>)+|B<L<--default-unit-in-json|/"--default-unit-in=s@">>=I<json>] [B<L<--default-unit-is|/"--default-unit-is=s">>=I<str>] [B<L<--default-unit-isnt|/"--default-unit-isnt=s">>=I<str>] [B<L<--default-unit-max|/"--default-unit-max=s">>=I<str>] [B<L<--default-unit-min|/"--default-unit-min=s">>=I<str>] [B<L<--default-unit-not-contains|/"--default-unit-not-contains=s">>=I<str>] [(B<L<--default-unit-not-in|/"--default-unit-not-in=s@">>=I<str>)+|B<L<--default-unit-not-in-json|/"--default-unit-not-in=s@">>=I<json>] [B<L<--default-unit-xmax|/"--default-unit-xmax=s">>=I<str>] [B<L<--default-unit-xmin|/"--default-unit-xmin=s">>=I<str>] [B<L<--default-unit|/"--default-unit=s">>=I<str>] [B<L<--detail|/"--detail, -l">>|B<L<-l|/"--detail, -l">>|B<L<--no-detail|/"--detail, -l">>|B<L<--nodetail|/"--detail, -l">>] [(B<L<--eng-aliases-has|/"--eng-aliases-has=s@">>=I<str>)+|B<L<--eng-aliases-has-json|/"--eng-aliases-has=s@">>=I<json>] [B<L<--eng-aliases-is|/"--eng-aliases-is=s">>=I<s>|B<L<--eng-aliases-is-json|/"--eng-aliases-is=s">>=I<json>] [B<L<--eng-aliases-isnt|/"--eng-aliases-isnt=s">>=I<s>|B<L<--eng-aliases-isnt-json|/"--eng-aliases-isnt=s">>=I<json>] [(B<L<--eng-aliases-lacks|/"--eng-aliases-lacks=s@">>=I<str>)+|B<L<--eng-aliases-lacks-json|/"--eng-aliases-lacks=s@">>=I<json>] [B<L<--eng-aliases|/"--eng-aliases=s">>=I<s>|B<L<--eng-aliases-json|/"--eng-aliases=s">>=I<json>] [B<L<--eng-name-contains|/"--eng-name-contains=s">>=I<str>] [(B<L<--eng-name-in|/"--eng-name-in=s@">>=I<str>)+|B<L<--eng-name-in-json|/"--eng-name-in=s@">>=I<json>] [B<L<--eng-name-is|/"--eng-name-is=s">>=I<str>] [B<L<--eng-name-isnt|/"--eng-name-isnt=s">>=I<str>] [B<L<--eng-name-max|/"--eng-name-max=s">>=I<str>] [B<L<--eng-name-min|/"--eng-name-min=s">>=I<str>] [B<L<--eng-name-not-contains|/"--eng-name-not-contains=s">>=I<str>] [(B<L<--eng-name-not-in|/"--eng-name-not-in=s@">>=I<str>)+|B<L<--eng-name-not-in-json|/"--eng-name-not-in=s@">>=I<json>] [B<L<--eng-name-xmax|/"--eng-name-xmax=s">>=I<str>] [B<L<--eng-name-xmin|/"--eng-name-xmin=s">>=I<str>] [B<L<--eng-name|/"--eng-name=s">>=I<str>] [(B<L<--exclude-field|/"--exclude-fields-json=s">>=I<str>)+|B<L<--exclude-fields-json|/"--exclude-fields-json=s">>=I<json>] [B<L<--fat-soluble|/"--fat-soluble">>|B<L<--no-fat-soluble|/"--fat-soluble">>|B<L<--nofat-soluble|/"--fat-soluble">>] [B<L<--fat-soluble-is|/"--fat-soluble-is">>|B<L<--no-fat-soluble-is|/"--fat-soluble-is">>|B<L<--nofat-soluble-is|/"--fat-soluble-is">>] [B<L<--fat-soluble-isnt|/"--fat-soluble-isnt">>|B<L<--no-fat-soluble-isnt|/"--fat-soluble-isnt">>|B<L<--nofat-soluble-isnt|/"--fat-soluble-isnt">>] [B<L<--fat-soluble-note-contains|/"--fat-soluble-note-contains=s">>=I<str>] [(B<L<--fat-soluble-note-in|/"--fat-soluble-note-in=s@">>=I<str>)+|B<L<--fat-soluble-note-in-json|/"--fat-soluble-note-in=s@">>=I<json>] [B<L<--fat-soluble-note-is|/"--fat-soluble-note-is=s">>=I<str>] [B<L<--fat-soluble-note-isnt|/"--fat-soluble-note-isnt=s">>=I<str>] [B<L<--fat-soluble-note-max|/"--fat-soluble-note-max=s">>=I<str>] [B<L<--fat-soluble-note-min|/"--fat-soluble-note-min=s">>=I<str>] [B<L<--fat-soluble-note-not-contains|/"--fat-soluble-note-not-contains=s">>=I<str>] [(B<L<--fat-soluble-note-not-in|/"--fat-soluble-note-not-in=s@">>=I<str>)+|B<L<--fat-soluble-note-not-in-json|/"--fat-soluble-note-not-in=s@">>=I<json>] [B<L<--fat-soluble-note-xmax|/"--fat-soluble-note-xmax=s">>=I<str>] [B<L<--fat-soluble-note-xmin|/"--fat-soluble-note-xmin=s">>=I<str>] [B<L<--fat-soluble-note|/"--fat-soluble-note=s">>=I<str>] [(B<L<--field|/"--fields-json=s">>=I<str>)+|B<L<--fields-json|/"--fields-json=s">>=I<json>] [B<L<--format|/"--format=s">>=I<name>|B<L<--json|/"--json">>] [(B<L<--ind-aliases-has|/"--ind-aliases-has=s@">>=I<str>)+|B<L<--ind-aliases-has-json|/"--ind-aliases-has=s@">>=I<json>] [B<L<--ind-aliases-is|/"--ind-aliases-is=s">>=I<s>|B<L<--ind-aliases-is-json|/"--ind-aliases-is=s">>=I<json>] [B<L<--ind-aliases-isnt|/"--ind-aliases-isnt=s">>=I<s>|B<L<--ind-aliases-isnt-json|/"--ind-aliases-isnt=s">>=I<json>] [(B<L<--ind-aliases-lacks|/"--ind-aliases-lacks=s@">>=I<str>)+|B<L<--ind-aliases-lacks-json|/"--ind-aliases-lacks=s@">>=I<json>] [B<L<--ind-aliases|/"--ind-aliases=s">>=I<s>|B<L<--ind-aliases-json|/"--ind-aliases=s">>=I<json>] [B<L<--ind-name-contains|/"--ind-name-contains=s">>=I<str>] [(B<L<--ind-name-in|/"--ind-name-in=s@">>=I<str>)+|B<L<--ind-name-in-json|/"--ind-name-in=s@">>=I<json>] [B<L<--ind-name-is|/"--ind-name-is=s">>=I<str>] [B<L<--ind-name-isnt|/"--ind-name-isnt=s">>=I<str>] [B<L<--ind-name-max|/"--ind-name-max=s">>=I<str>] [B<L<--ind-name-min|/"--ind-name-min=s">>=I<str>] [B<L<--ind-name-not-contains|/"--ind-name-not-contains=s">>=I<str>] [(B<L<--ind-name-not-in|/"--ind-name-not-in=s@">>=I<str>)+|B<L<--ind-name-not-in-json|/"--ind-name-not-in=s@">>=I<json>] [B<L<--ind-name-xmax|/"--ind-name-xmax=s">>=I<str>] [B<L<--ind-name-xmin|/"--ind-name-xmin=s">>=I<str>] [B<L<--ind-name|/"--ind-name=s">>=I<str>] [B<L<--(no)naked-res|/"--naked-res">>] [B<L<--page-result|/"--page-result">>[=I<program>]|B<L<--view-result|/"--view-result">>[=I<program>]] [B<L<--query-boolean|/"--query-boolean=s">>=I<str>|B<L<--and|/"--query-boolean=s">>|B<L<--or|/"--query-boolean=s">>] [(B<L<--query|/"--query=s@">>=I<str>)+|B<L<--queries-json|/"--query=s@">>=I<json>|(B<L<-q|/"--query=s@">>=I<str>)+] [B<L<--random|/"--random">>|B<L<--no-random|/"--random">>|B<L<--norandom|/"--random">>] [B<L<--result-limit|/"--result-limit=s">>=I<int>] [B<L<--result-start|/"--result-start=s">>=I<int>] [(B<L<--sort|/"--sort=s@">>=I<str>)+|B<L<--sort-json|/"--sort=s@">>=I<json>] [B<L<--summary-contains|/"--summary-contains=s">>=I<str>] [(B<L<--summary-in|/"--summary-in=s@">>=I<str>)+|B<L<--summary-in-json|/"--summary-in=s@">>=I<json>] [B<L<--summary-is|/"--summary-is=s">>=I<str>] [B<L<--summary-isnt|/"--summary-isnt=s">>=I<str>] [B<L<--summary-max|/"--summary-max=s">>=I<str>] [B<L<--summary-min|/"--summary-min=s">>=I<str>] [B<L<--summary-not-contains|/"--summary-not-contains=s">>=I<str>] [(B<L<--summary-not-in|/"--summary-not-in=s@">>=I<str>)+|B<L<--summary-not-in-json|/"--summary-not-in=s@">>=I<json>] [B<L<--summary-xmax|/"--summary-xmax=s">>=I<str>] [B<L<--summary-xmin|/"--summary-xmin=s">>=I<str>] [B<L<--summary|/"--summary=s">>=I<str>] [B<L<--symbol-contains|/"--symbol-contains=s">>=I<str>] [(B<L<--symbol-in|/"--symbol-in=s@">>=I<str>)+|B<L<--symbol-in-json|/"--symbol-in=s@">>=I<json>] [B<L<--symbol-is|/"--symbol-is=s">>=I<str>] [B<L<--symbol-isnt|/"--symbol-isnt=s">>=I<str>] [B<L<--symbol-max|/"--symbol-max=s">>=I<str>] [B<L<--symbol-min|/"--symbol-min=s">>=I<str>] [B<L<--symbol-not-contains|/"--symbol-not-contains=s">>=I<str>] [(B<L<--symbol-not-in|/"--symbol-not-in=s@">>=I<str>)+|B<L<--symbol-not-in-json|/"--symbol-not-in=s@">>=I<json>] [B<L<--symbol-xmax|/"--symbol-xmax=s">>=I<str>] [B<L<--symbol-xmin|/"--symbol-xmin=s">>=I<str>] [B<L<--symbol|/"--symbol=s">>=I<str>] [B<L<--water-soluble|/"--water-soluble">>|B<L<--no-water-soluble|/"--water-soluble">>|B<L<--nowater-soluble|/"--water-soluble">>] [B<L<--water-soluble-is|/"--water-soluble-is">>|B<L<--no-water-soluble-is|/"--water-soluble-is">>|B<L<--nowater-soluble-is|/"--water-soluble-is">>] [B<L<--water-soluble-isnt|/"--water-soluble-isnt">>|B<L<--no-water-soluble-isnt|/"--water-soluble-isnt">>|B<L<--nowater-soluble-isnt|/"--water-soluble-isnt">>] [B<L<--water-soluble-note-contains|/"--water-soluble-note-contains=s">>=I<str>] [(B<L<--water-soluble-note-in|/"--water-soluble-note-in=s@">>=I<str>)+|B<L<--water-soluble-note-in-json|/"--water-soluble-note-in=s@">>=I<json>] [B<L<--water-soluble-note-is|/"--water-soluble-note-is=s">>=I<str>] [B<L<--water-soluble-note-isnt|/"--water-soluble-note-isnt=s">>=I<str>] [B<L<--water-soluble-note-max|/"--water-soluble-note-max=s">>=I<str>] [B<L<--water-soluble-note-min|/"--water-soluble-note-min=s">>=I<str>] [B<L<--water-soluble-note-not-contains|/"--water-soluble-note-not-contains=s">>=I<str>] [(B<L<--water-soluble-note-not-in|/"--water-soluble-note-not-in=s@">>=I<str>)+|B<L<--water-soluble-note-not-in-json|/"--water-soluble-note-not-in=s@">>=I<json>] [B<L<--water-soluble-note-xmax|/"--water-soluble-note-xmax=s">>=I<str>] [B<L<--water-soluble-note-xmin|/"--water-soluble-note-xmin=s">>=I<str>] [B<L<--water-soluble-note|/"--water-soluble-note=s">>=I<str>] [B<L<--with-field-names|/"--with-field-names">>|B<L<--without-field-names|/"--with-field-names">>] -- [I<L<query|/"--query=s@">>] ...
See examples in the L</EXAMPLES> section.
=head1 OPTIONS
C<*> marks required options.
=head2 Field selection options
=over
=item B<--detail>, B<-l>
Return array of full records instead of just ID fields.
By default, only the key (ID) field is returned per result entry.
=item B<--exclude-field>=I<s@>
Select fields to return.
Can be specified multiple times.
=item B<--exclude-fields-json>=I<s>
Select fields to return (JSON-encoded).
See C<--exclude-field>.
=item B<--field>=I<s@>
Select fields to return.
Can be specified multiple times.
=item B<--fields-json>=I<s>
Select fields to return (JSON-encoded).
See C<--field>.
=item B<--with-field-names>
Return field names in each record (as hash/associative array).
When enabled, function will return each record as hash/associative array
(field name => value pairs). Otherwise, function will return each record
as list/array (field value, field value, ...).
=back
=head2 Filtering for category options
=over
=item B<--category-contains>=I<s>
Only return records where the 'category' field contains specified text.
=item B<--category-in-json>=I<s>
Only return records where the 'category' field is in the specified values (JSON-encoded).
See C<--category-in>.
=item B<--category-in>=I<s@>
Only return records where the 'category' field is in the specified values.
Can be specified multiple times.
=item B<--category-is>=I<s>
Only return records where the 'category' field equals specified value.
=item B<--category-isnt>=I<s>
Only return records where the 'category' field does not equal specified value.
=item B<--category-max>=I<s>
Only return records where the 'category' field is less than or equal to specified value.
=item B<--category-min>=I<s>
Only return records where the 'category' field is greater than or equal to specified value.
=item B<--category-not-contains>=I<s>
Only return records where the 'category' field does not contain specified text.
=item B<--category-not-in-json>=I<s>
Only return records where the 'category' field is not in the specified values (JSON-encoded).
See C<--category-not-in>.
=item B<--category-not-in>=I<s@>
Only return records where the 'category' field is not in the specified values.
Can be specified multiple times.
=item B<--category-xmax>=I<s>
Only return records where the 'category' field is less than specified value.
=item B<--category-xmin>=I<s>
Only return records where the 'category' field is greater than specified value.
=item B<--category>=I<s>
Only return records where the 'category' field equals specified value.
=back
=head2 Filtering for default_unit options
=over
=item B<--default-unit-contains>=I<s>
Only return records where the 'default_unit' field contains specified text.
=item B<--default-unit-in-json>=I<s>
Only return records where the 'default_unit' field is in the specified values (JSON-encoded).
See C<--default-unit-in>.
=item B<--default-unit-in>=I<s@>
Only return records where the 'default_unit' field is in the specified values.
Can be specified multiple times.
=item B<--default-unit-is>=I<s>
Only return records where the 'default_unit' field equals specified value.
=item B<--default-unit-isnt>=I<s>
Only return records where the 'default_unit' field does not equal specified value.
=item B<--default-unit-max>=I<s>
Only return records where the 'default_unit' field is less than or equal to specified value.
=item B<--default-unit-min>=I<s>
Only return records where the 'default_unit' field is greater than or equal to specified value.
=item B<--default-unit-not-contains>=I<s>
Only return records where the 'default_unit' field does not contain specified text.
=item B<--default-unit-not-in-json>=I<s>
Only return records where the 'default_unit' field is not in the specified values (JSON-encoded).
See C<--default-unit-not-in>.
=item B<--default-unit-not-in>=I<s@>
Only return records where the 'default_unit' field is not in the specified values.
Can be specified multiple times.
=item B<--default-unit-xmax>=I<s>
Only return records where the 'default_unit' field is less than specified value.
=item B<--default-unit-xmin>=I<s>
Only return records where the 'default_unit' field is greater than specified value.
=item B<--default-unit>=I<s>
Only return records where the 'default_unit' field equals specified value.
=back
=head2 Filtering for eng_aliases options
=over
=item B<--eng-aliases-has-json>=I<s>
Only return records where the 'eng_aliases' field is an array/list which contains specified value (JSON-encoded).
See C<--eng-aliases-has>.
=item B<--eng-aliases-has>=I<s@>
Only return records where the 'eng_aliases' field is an array/list which contains specified value.
Can be specified multiple times.
=item B<--eng-aliases-is-json>=I<s>
Only return records where the 'eng_aliases' field equals specified value (JSON-encoded).
See C<--eng-aliases-is>.
=item B<--eng-aliases-is>=I<s>
Only return records where the 'eng_aliases' field equals specified value.
=item B<--eng-aliases-isnt-json>=I<s>
Only return records where the 'eng_aliases' field does not equal specified value (JSON-encoded).
See C<--eng-aliases-isnt>.
=item B<--eng-aliases-isnt>=I<s>
Only return records where the 'eng_aliases' field does not equal specified value.
=item B<--eng-aliases-json>=I<s>
Only return records where the 'eng_aliases' field equals specified value (JSON-encoded).
See C<--eng-aliases>.
=item B<--eng-aliases-lacks-json>=I<s>
Only return records where the 'eng_aliases' field is an array/list which does not contain specified value (JSON-encoded).
See C<--eng-aliases-lacks>.
=item B<--eng-aliases-lacks>=I<s@>
Only return records where the 'eng_aliases' field is an array/list which does not contain specified value.
Can be specified multiple times.
=item B<--eng-aliases>=I<s>
Only return records where the 'eng_aliases' field equals specified value.
=back
=head2 Filtering for eng_name options
=over
=item B<--eng-name-contains>=I<s>
Only return records where the 'eng_name' field contains specified text.
=item B<--eng-name-in-json>=I<s>
Only return records where the 'eng_name' field is in the specified values (JSON-encoded).
See C<--eng-name-in>.
=item B<--eng-name-in>=I<s@>
Only return records where the 'eng_name' field is in the specified values.
Can be specified multiple times.
=item B<--eng-name-is>=I<s>
Only return records where the 'eng_name' field equals specified value.
=item B<--eng-name-isnt>=I<s>
Only return records where the 'eng_name' field does not equal specified value.
=item B<--eng-name-max>=I<s>
Only return records where the 'eng_name' field is less than or equal to specified value.
=item B<--eng-name-min>=I<s>
Only return records where the 'eng_name' field is greater than or equal to specified value.
=item B<--eng-name-not-contains>=I<s>
Only return records where the 'eng_name' field does not contain specified text.
=item B<--eng-name-not-in-json>=I<s>
Only return records where the 'eng_name' field is not in the specified values (JSON-encoded).
See C<--eng-name-not-in>.
=item B<--eng-name-not-in>=I<s@>
Only return records where the 'eng_name' field is not in the specified values.
Can be specified multiple times.
=item B<--eng-name-xmax>=I<s>
Only return records where the 'eng_name' field is less than specified value.
=item B<--eng-name-xmin>=I<s>
Only return records where the 'eng_name' field is greater than specified value.
=item B<--eng-name>=I<s>
Only return records where the 'eng_name' field equals specified value.
=back
=head2 Filtering for fat_soluble options
=over
=item B<--fat-soluble>
Only return records where the 'fat_soluble' field equals specified value.
=item B<--fat-soluble-is>
Only return records where the 'fat_soluble' field equals specified value.
=item B<--fat-soluble-isnt>
Only return records where the 'fat_soluble' field does not equal specified value.
=back
=head2 Filtering for fat_soluble_note options
=over
=item B<--fat-soluble-note-contains>=I<s>
Only return records where the 'fat_soluble_note' field contains specified text.
=item B<--fat-soluble-note-in-json>=I<s>
Only return records where the 'fat_soluble_note' field is in the specified values (JSON-encoded).
See C<--fat-soluble-note-in>.
=item B<--fat-soluble-note-in>=I<s@>
Only return records where the 'fat_soluble_note' field is in the specified values.
Can be specified multiple times.
=item B<--fat-soluble-note-is>=I<s>
Only return records where the 'fat_soluble_note' field equals specified value.
=item B<--fat-soluble-note-isnt>=I<s>
Only return records where the 'fat_soluble_note' field does not equal specified value.
=item B<--fat-soluble-note-max>=I<s>
Only return records where the 'fat_soluble_note' field is less than or equal to specified value.
=item B<--fat-soluble-note-min>=I<s>
Only return records where the 'fat_soluble_note' field is greater than or equal to specified value.
=item B<--fat-soluble-note-not-contains>=I<s>
Only return records where the 'fat_soluble_note' field does not contain specified text.
=item B<--fat-soluble-note-not-in-json>=I<s>
Only return records where the 'fat_soluble_note' field is not in the specified values (JSON-encoded).
See C<--fat-soluble-note-not-in>.
=item B<--fat-soluble-note-not-in>=I<s@>
Only return records where the 'fat_soluble_note' field is not in the specified values.
Can be specified multiple times.
=item B<--fat-soluble-note-xmax>=I<s>
Only return records where the 'fat_soluble_note' field is less than specified value.
=item B<--fat-soluble-note-xmin>=I<s>
Only return records where the 'fat_soluble_note' field is greater than specified value.
=item B<--fat-soluble-note>=I<s>
Only return records where the 'fat_soluble_note' field equals specified value.
=back
=head2 Filtering for ind_aliases options
=over
=item B<--ind-aliases-has-json>=I<s>
Only return records where the 'ind_aliases' field is an array/list which contains specified value (JSON-encoded).
See C<--ind-aliases-has>.
=item B<--ind-aliases-has>=I<s@>
Only return records where the 'ind_aliases' field is an array/list which contains specified value.
Can be specified multiple times.
=item B<--ind-aliases-is-json>=I<s>
Only return records where the 'ind_aliases' field equals specified value (JSON-encoded).
See C<--ind-aliases-is>.
=item B<--ind-aliases-is>=I<s>
Only return records where the 'ind_aliases' field equals specified value.
=item B<--ind-aliases-isnt-json>=I<s>
Only return records where the 'ind_aliases' field does not equal specified value (JSON-encoded).
See C<--ind-aliases-isnt>.
=item B<--ind-aliases-isnt>=I<s>
Only return records where the 'ind_aliases' field does not equal specified value.
=item B<--ind-aliases-json>=I<s>
Only return records where the 'ind_aliases' field equals specified value (JSON-encoded).
See C<--ind-aliases>.
=item B<--ind-aliases-lacks-json>=I<s>
Only return records where the 'ind_aliases' field is an array/list which does not contain specified value (JSON-encoded).
See C<--ind-aliases-lacks>.
=item B<--ind-aliases-lacks>=I<s@>
Only return records where the 'ind_aliases' field is an array/list which does not contain specified value.
Can be specified multiple times.
=item B<--ind-aliases>=I<s>
Only return records where the 'ind_aliases' field equals specified value.
=back
=head2 Filtering for ind_name options
=over
=item B<--ind-name-contains>=I<s>
Only return records where the 'ind_name' field contains specified text.
=item B<--ind-name-in-json>=I<s>
Only return records where the 'ind_name' field is in the specified values (JSON-encoded).
See C<--ind-name-in>.
=item B<--ind-name-in>=I<s@>
Only return records where the 'ind_name' field is in the specified values.
Can be specified multiple times.
=item B<--ind-name-is>=I<s>
Only return records where the 'ind_name' field equals specified value.
=item B<--ind-name-isnt>=I<s>
Only return records where the 'ind_name' field does not equal specified value.
=item B<--ind-name-max>=I<s>
Only return records where the 'ind_name' field is less than or equal to specified value.
=item B<--ind-name-min>=I<s>
Only return records where the 'ind_name' field is greater than or equal to specified value.
=item B<--ind-name-not-contains>=I<s>
Only return records where the 'ind_name' field does not contain specified text.
=item B<--ind-name-not-in-json>=I<s>
Only return records where the 'ind_name' field is not in the specified values (JSON-encoded).
See C<--ind-name-not-in>.
=item B<--ind-name-not-in>=I<s@>
Only return records where the 'ind_name' field is not in the specified values.
Can be specified multiple times.
=item B<--ind-name-xmax>=I<s>
Only return records where the 'ind_name' field is less than specified value.
=item B<--ind-name-xmin>=I<s>
Only return records where the 'ind_name' field is greater than specified value.
=item B<--ind-name>=I<s>
Only return records where the 'ind_name' field equals specified value.
=back
=head2 Filtering for summary options
=over
=item B<--summary-contains>=I<s>
Only return records where the 'summary' field contains specified text.
=item B<--summary-in-json>=I<s>
Only return records where the 'summary' field is in the specified values (JSON-encoded).
See C<--summary-in>.
=item B<--summary-in>=I<s@>
Only return records where the 'summary' field is in the specified values.
Can be specified multiple times.
=item B<--summary-is>=I<s>
Only return records where the 'summary' field equals specified value.
=item B<--summary-isnt>=I<s>
Only return records where the 'summary' field does not equal specified value.
=item B<--summary-max>=I<s>
Only return records where the 'summary' field is less than or equal to specified value.
=item B<--summary-min>=I<s>
Only return records where the 'summary' field is greater than or equal to specified value.
=item B<--summary-not-contains>=I<s>
Only return records where the 'summary' field does not contain specified text.
=item B<--summary-not-in-json>=I<s>
Only return records where the 'summary' field is not in the specified values (JSON-encoded).
See C<--summary-not-in>.
=item B<--summary-not-in>=I<s@>
Only return records where the 'summary' field is not in the specified values.
Can be specified multiple times.
=item B<--summary-xmax>=I<s>
Only return records where the 'summary' field is less than specified value.
=item B<--summary-xmin>=I<s>
Only return records where the 'summary' field is greater than specified value.
=item B<--summary>=I<s>
Only return records where the 'summary' field equals specified value.
=back
=head2 Filtering for symbol options
=over
=item B<--symbol-contains>=I<s>
Only return records where the 'symbol' field contains specified text.
=item B<--symbol-in-json>=I<s>
Only return records where the 'symbol' field is in the specified values (JSON-encoded).
See C<--symbol-in>.
=item B<--symbol-in>=I<s@>
Only return records where the 'symbol' field is in the specified values.
Can be specified multiple times.
=item B<--symbol-is>=I<s>
Only return records where the 'symbol' field equals specified value.
=item B<--symbol-isnt>=I<s>
Only return records where the 'symbol' field does not equal specified value.
=item B<--symbol-max>=I<s>
Only return records where the 'symbol' field is less than or equal to specified value.
=item B<--symbol-min>=I<s>
Only return records where the 'symbol' field is greater than or equal to specified value.
=item B<--symbol-not-contains>=I<s>
Only return records where the 'symbol' field does not contain specified text.
=item B<--symbol-not-in-json>=I<s>
Only return records where the 'symbol' field is not in the specified values (JSON-encoded).
See C<--symbol-not-in>.
=item B<--symbol-not-in>=I<s@>
Only return records where the 'symbol' field is not in the specified values.
Can be specified multiple times.
=item B<--symbol-xmax>=I<s>
Only return records where the 'symbol' field is less than specified value.
=item B<--symbol-xmin>=I<s>
Only return records where the 'symbol' field is greater than specified value.
=item B<--symbol>=I<s>
Only return records where the 'symbol' field equals specified value.
=back
=head2 Filtering for water_soluble options
=over
=item B<--water-soluble>
Only return records where the 'water_soluble' field equals specified value.
=item B<--water-soluble-is>
Only return records where the 'water_soluble' field equals specified value.
=item B<--water-soluble-isnt>
Only return records where the 'water_soluble' field does not equal specified value.
=back
=head2 Filtering for water_soluble_note options
=over
=item B<--water-soluble-note-contains>=I<s>
Only return records where the 'water_soluble_note' field contains specified text.
=item B<--water-soluble-note-in-json>=I<s>
Only return records where the 'water_soluble_note' field is in the specified values (JSON-encoded).
See C<--water-soluble-note-in>.
=item B<--water-soluble-note-in>=I<s@>
Only return records where the 'water_soluble_note' field is in the specified values.
Can be specified multiple times.
=item B<--water-soluble-note-is>=I<s>
Only return records where the 'water_soluble_note' field equals specified value.
=item B<--water-soluble-note-isnt>=I<s>
Only return records where the 'water_soluble_note' field does not equal specified value.
=item B<--water-soluble-note-max>=I<s>
Only return records where the 'water_soluble_note' field is less than or equal to specified value.
=item B<--water-soluble-note-min>=I<s>
Only return records where the 'water_soluble_note' field is greater than or equal to specified value.
=item B<--water-soluble-note-not-contains>=I<s>
Only return records where the 'water_soluble_note' field does not contain specified text.
=item B<--water-soluble-note-not-in-json>=I<s>
Only return records where the 'water_soluble_note' field is not in the specified values (JSON-encoded).
See C<--water-soluble-note-not-in>.
=item B<--water-soluble-note-not-in>=I<s@>
Only return records where the 'water_soluble_note' field is not in the specified values.
Can be specified multiple times.
=item B<--water-soluble-note-xmax>=I<s>
Only return records where the 'water_soluble_note' field is less than specified value.
=item B<--water-soluble-note-xmin>=I<s>
Only return records where the 'water_soluble_note' field is greater than specified value.
=item B<--water-soluble-note>=I<s>
Only return records where the 'water_soluble_note' field equals specified value.
=back
=head2 Filtering options
=over
=item B<--and>
Shortcut for --query-boolean=and.
See C<--query-boolean>.
=item B<--or>
Shortcut for --query-boolean=or.
See C<--query-boolean>.
=item B<--queries-json>=I<s>, B<-q>
Search (JSON-encoded).
See C<--query>.
Can also be specified as the 1st command-line argument and onwards.
=item B<--query-boolean>=I<s>
Whether records must match all search queries ('and') or just one ('or').
Default value:
"and"
Valid values:
["and","or"]
If set to C<and>, all queries must match; if set to C<or>, only one query should
match. See the C<queries> option for more details on searching.
=item B<--query>=I<s@>
Search.
This will search all searchable fields with one or more specified queries. Each
query can be in the form of C<-FOO> (dash prefix notation) to require that the
fields do not contain specified string, or C</FOO/> to use regular expression.
All queries must match if the C<query_boolean> option is set to C<and>; only one
query should match if the C<query_boolean> option is set to C<or>.
Can also be specified as the 1st command-line argument and onwards.
Can be specified multiple times.
=back
=head2 Ordering options
=over
=item B<--random>
Return records in random order.
=item B<--sort-json>=I<s>
Order records according to certain field(s) (JSON-encoded).
See C<--sort>.
=item B<--sort>=I<s@>
Order records according to certain field(s).
A list of field names separated by comma. Each field can be prefixed with '-' to
specify descending order instead of the default ascending.
Can be specified multiple times.
=back
=head2 Output options
=over
=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<--json>
Set output format to json.
=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
element) as well as result metadata/extra result (4th element) instead of just
the result (3rd element). However, sometimes you want just the result, e.g. when
you want to pipe the result for more post-processing. In this case you can use
C<--naked-res> so you just get:
[1,2,3]
=item B<--page-result>
Filter output through a pager.
This option will pipe the output to a specified pager program. If pager program
is not specified, a suitable default e.g. C<less> is chosen.
=item B<--view-result>
View output using a viewer.
This option will first save the output to a temporary file, then open a viewer
program to view the temporary file. If a viewer program is not chosen, a
suitable default, e.g. the browser, is chosen.
=back
=head2 Paging options
=over
=item B<--result-limit>=I<s>
Only return a certain number of records.
=item B<--result-start>=I<s>
Only return starting from the n'th record.
Default value:
1
=back
=head2 Other options
=over
=item B<--help>, B<-h>, B<-?>
Display help message and exit.
=item B<--version>, B<-v>
Display program's version and exit.
=back
=head1 COMPLETION
This script has shell tab completion capability with support for several
shells.
=head2 bash
To activate bash completion for this script, put:
complete -C list-nutrients list-nutrients
in your bash startup (e.g. F<~/.bashrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is recommended, however, that you install modules using L<cpanm-shcompgen>
which can activate shell completion for scripts immediately.
=head2 tcsh
To activate tcsh completion for this script, put:
complete list-nutrients 'p/*/`list-nutrients`/'
in your tcsh startup (e.g. F<~/.tcshrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.
It is also recommended to install L<shcompgen> (see above).
=head2 other shells
For fish and zsh, install L<shcompgen> as described above.
=head1 EXAMPLES
=head2 List all vitamins, with all details
% list-nutrients -l --category vitamin
VA vitamin Vitamin A Vitamin A IU-vita 1
VD vitamin Vitamin D Vitamin D IU-vitd 1
VE vitamin Vitamin E Vitamin E IU-vite 1
VK vitamin Vitamin K Vitamin K mcg 1
VB1 vitamin Vitamin B1 ["Thiamine"] Vitamin B1 ["Thiamin"] mg 1
VB2 vitamin Vitamin B2 ["Riboflavin"] Vitamin B2 ["Riboflavin"] mg 1
VB3 vitamin Vitamin B3 ["Niacin"] Vitamin B3 ["Niacin"] mg 1
VB5 vitamin Pantothenic acid ["Vitamin B5"] Asam pantotenat ["Vitamin B5"] mg 1
VB6 Vitamin B6 refers to a group of six vitamers, one of which is pyridoxine vitamin Vitamin B6 ["Pyridoxine"] Vitamin B6 ["Pyridoxine"] mg 1
VB9 vitamin Folate ["Vitamin B9","Folacin"] Folat ["Vitamin B9","Folasin"] mcg 1
VB12 vitamin Vitamin B12 ["Cobalamin"] Vitamin B12 ["Kobalamin"] mcg 1
VB7 vitamin Biotin ["Vitamin B7","Vitamin H"] Biotin ["Vitamin B7","Vitamin H"] mg 1
VC vitamin Vitamin C Vitamin C mg 1
=head2 List the English names of all minerals
% list-nutrients --category mineral --fields '["eng_name"]'
Calcium
Phosphorus
Magnesium
Iron
Iodium
Zinc
Selenium
Mangan
Fluorine
Chromium
Potassium
Sodium
Chlorine
Copper
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/App-NutrientUtils>.
=head1 SOURCE
Source repository is at L<https://github.com/perlancar/perl-App-NutrientUtils>.
=head1 AUTHOR
perlancar <perlancar@cpan.org>
=head1 CONTRIBUTING
To contribute, you can send patches by email/via RT, or send pull requests on
GitHub.
Most of the time, you don't need to build the distribution yourself. You can
simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your
system), you can install L<Dist::Zilla>,
L<Dist::Zilla::PluginBundle::Author::PERLANCAR>,
L<Pod::Weaver::PluginBundle::Author::PERLANCAR>, and sometimes one or two other
Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond
that are considered a bug and can be reported to me.
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2024 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=App-NutrientUtils>
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
=cut