NAME
list-idn-provinces - Provinces in Indonesia
VERSION
This document describes version 0.02 of list-idn-provinces (from Perl distribution App-IndonesianLocaleUtils), released on 2021-05-07.
SYNOPSIS
Usage:
% list-idn-provinces [--bps-code-in-json=s] [--bps-code-in=s+]
[--bps-code-is=s] [--bps-code-isnt=s] [--bps-code-max=s]
[--bps-code-min=s] [--bps-code-not-in-json=s] [--bps-code-not-in=s+]
[--bps-code-xmax=s] [--bps-code-xmin=s] [--bps-code=s]
[--config-path=path | -c] [--config-profile=profile | -P] [--detail]
[--eng-name-contains=s] [--eng-name-in-json=s] [--eng-name-in=s+]
[--eng-name-is=s] [--eng-name-isnt=s] [--eng-name-max=s]
[--eng-name-min=s] [--eng-name-not-contains=s]
[--eng-name-not-in-json=s] [--eng-name-not-in=s+] [--eng-name-xmax=s]
[--eng-name-xmin=s] [--eng-name=s] [--exclude-field=s+]
[--exclude-fields-json=s] [--field=s+] [--fields-json=s]
[--format=name] [--ind-capital-name-contains=s]
[--ind-capital-name-in-json=s] [--ind-capital-name-in=s+]
[--ind-capital-name-is=s] [--ind-capital-name-isnt=s]
[--ind-capital-name-max=s] [--ind-capital-name-min=s]
[--ind-capital-name-not-contains=s] [--ind-capital-name-not-in-json=s]
[--ind-capital-name-not-in=s+] [--ind-capital-name-xmax=s]
[--ind-capital-name-xmin=s] [--ind-capital-name=s]
[--ind-island-name-contains=s] [--ind-island-name-in-json=s]
[--ind-island-name-in=s+] [--ind-island-name-is=s]
[--ind-island-name-isnt=s] [--ind-island-name-max=s]
[--ind-island-name-min=s] [--ind-island-name-not-contains=s]
[--ind-island-name-not-in-json=s] [--ind-island-name-not-in=s+]
[--ind-island-name-xmax=s] [--ind-island-name-xmin=s]
[--ind-island-name=s] [--ind-name-contains=s] [--ind-name-in-json=s]
[--ind-name-in=s+] [--ind-name-is=s] [--ind-name-isnt=s]
[--ind-name-max=s] [--ind-name-min=s] [--ind-name-not-contains=s]
[--ind-name-not-in-json=s] [--ind-name-not-in=s+] [--ind-name-xmax=s]
[--ind-name-xmin=s] [--ind-name=s] [--iso3166-2-code-contains=s]
[--iso3166-2-code-in-json=s] [--iso3166-2-code-in=s+]
[--iso3166-2-code-is=s] [--iso3166-2-code-isnt=s]
[--iso3166-2-code-max=s] [--iso3166-2-code-min=s]
[--iso3166-2-code-not-contains=s] [--iso3166-2-code-not-in-json=s]
[--iso3166-2-code-not-in=s+] [--iso3166-2-code-xmax=s]
[--iso3166-2-code-xmin=s] [--iso3166-2-code=s] [--json] [-l]
[--(no)naked-res] [--no-config | -C] [--no-detail] [--no-env]
[--no-random] [--nodetail] [--norandom] [--page-result[=program]]
[--random] [--result-limit=s] [--result-start=s] [--sort-json=s]
[--sort=s+] [--tags-contains=s] [--tags-in-json=s] [--tags-in=s+]
[--tags-is=s] [--tags-isnt=s] [--tags-max=s] [--tags-min=s]
[--tags-not-contains=s] [--tags-not-in-json=s] [--tags-not-in=s+]
[--tags-xmax=s] [--tags-xmin=s] [--tags=s] [--view-result[=program]]
[--with-field-names] [--without-field-names] [query]
DESCRIPTION
REPLACE ME
OPTIONS
*
marks required options.
Configuration options
- --config-path=s, -c
-
Set path to configuration file.
- --config-profile=s, -P
-
Set configuration profile to use.
- --no-config, -C
-
Do not use any configuration file.
Environment options
Field selection options
- --detail, -l
-
Return array of full records instead of just ID fields.
By default, only the key (ID) field is returned per result entry.
- --exclude-field=s@
-
Select fields to return.
Can be specified multiple times.
- --exclude-fields-json=s
-
Select fields to return (JSON-encoded).
See
--exclude-field
. - --field=s@
-
Select fields to return.
Can be specified multiple times.
- --fields-json=s
-
Select fields to return (JSON-encoded).
See
--field
. - --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, ...).
Filtering for bps_code options
- --bps-code-in-json=s
-
Only return records where the 'bps_code' field is in the specified values (JSON-encoded).
See
--bps-code-in
. - --bps-code-in=s@
-
Only return records where the 'bps_code' field is in the specified values.
Can be specified multiple times.
- --bps-code-is=s
-
Only return records where the 'bps_code' field equals specified value.
- --bps-code-isnt=s
-
Only return records where the 'bps_code' field does not equal specified value.
- --bps-code-max=s
-
Only return records where the 'bps_code' field is less than or equal to specified value.
- --bps-code-min=s
-
Only return records where the 'bps_code' field is greater than or equal to specified value.
- --bps-code-not-in-json=s
-
Only return records where the 'bps_code' field is not in the specified values (JSON-encoded).
See
--bps-code-not-in
. - --bps-code-not-in=s@
-
Only return records where the 'bps_code' field is not in the specified values.
Can be specified multiple times.
- --bps-code-xmax=s
-
Only return records where the 'bps_code' field is less than specified value.
- --bps-code-xmin=s
-
Only return records where the 'bps_code' field is greater than specified value.
- --bps-code=s
-
Only return records where the 'bps_code' field equals specified value.
Filtering for eng_name options
- --eng-name-contains=s
-
Only return records where the 'eng_name' field contains specified text.
- --eng-name-in-json=s
-
Only return records where the 'eng_name' field is in the specified values (JSON-encoded).
See
--eng-name-in
. - --eng-name-in=s@
-
Only return records where the 'eng_name' field is in the specified values.
Can be specified multiple times.
- --eng-name-is=s
-
Only return records where the 'eng_name' field equals specified value.
- --eng-name-isnt=s
-
Only return records where the 'eng_name' field does not equal specified value.
- --eng-name-max=s
-
Only return records where the 'eng_name' field is less than or equal to specified value.
- --eng-name-min=s
-
Only return records where the 'eng_name' field is greater than or equal to specified value.
- --eng-name-not-contains=s
-
Only return records where the 'eng_name' field does not contain specified text.
- --eng-name-not-in-json=s
-
Only return records where the 'eng_name' field is not in the specified values (JSON-encoded).
See
--eng-name-not-in
. - --eng-name-not-in=s@
-
Only return records where the 'eng_name' field is not in the specified values.
Can be specified multiple times.
- --eng-name-xmax=s
-
Only return records where the 'eng_name' field is less than specified value.
- --eng-name-xmin=s
-
Only return records where the 'eng_name' field is greater than specified value.
- --eng-name=s
-
Only return records where the 'eng_name' field equals specified value.
Filtering for ind_capital_name options
- --ind-capital-name-contains=s
-
Only return records where the 'ind_capital_name' field contains specified text.
- --ind-capital-name-in-json=s
-
Only return records where the 'ind_capital_name' field is in the specified values (JSON-encoded).
See
--ind-capital-name-in
. - --ind-capital-name-in=s@
-
Only return records where the 'ind_capital_name' field is in the specified values.
Can be specified multiple times.
- --ind-capital-name-is=s
-
Only return records where the 'ind_capital_name' field equals specified value.
- --ind-capital-name-isnt=s
-
Only return records where the 'ind_capital_name' field does not equal specified value.
- --ind-capital-name-max=s
-
Only return records where the 'ind_capital_name' field is less than or equal to specified value.
- --ind-capital-name-min=s
-
Only return records where the 'ind_capital_name' field is greater than or equal to specified value.
- --ind-capital-name-not-contains=s
-
Only return records where the 'ind_capital_name' field does not contain specified text.
- --ind-capital-name-not-in-json=s
-
Only return records where the 'ind_capital_name' field is not in the specified values (JSON-encoded).
See
--ind-capital-name-not-in
. - --ind-capital-name-not-in=s@
-
Only return records where the 'ind_capital_name' field is not in the specified values.
Can be specified multiple times.
- --ind-capital-name-xmax=s
-
Only return records where the 'ind_capital_name' field is less than specified value.
- --ind-capital-name-xmin=s
-
Only return records where the 'ind_capital_name' field is greater than specified value.
- --ind-capital-name=s
-
Only return records where the 'ind_capital_name' field equals specified value.
Filtering for ind_island_name options
- --ind-island-name-contains=s
-
Only return records where the 'ind_island_name' field contains specified text.
- --ind-island-name-in-json=s
-
Only return records where the 'ind_island_name' field is in the specified values (JSON-encoded).
See
--ind-island-name-in
. - --ind-island-name-in=s@
-
Only return records where the 'ind_island_name' field is in the specified values.
Can be specified multiple times.
- --ind-island-name-is=s
-
Only return records where the 'ind_island_name' field equals specified value.
- --ind-island-name-isnt=s
-
Only return records where the 'ind_island_name' field does not equal specified value.
- --ind-island-name-max=s
-
Only return records where the 'ind_island_name' field is less than or equal to specified value.
- --ind-island-name-min=s
-
Only return records where the 'ind_island_name' field is greater than or equal to specified value.
- --ind-island-name-not-contains=s
-
Only return records where the 'ind_island_name' field does not contain specified text.
- --ind-island-name-not-in-json=s
-
Only return records where the 'ind_island_name' field is not in the specified values (JSON-encoded).
See
--ind-island-name-not-in
. - --ind-island-name-not-in=s@
-
Only return records where the 'ind_island_name' field is not in the specified values.
Can be specified multiple times.
- --ind-island-name-xmax=s
-
Only return records where the 'ind_island_name' field is less than specified value.
- --ind-island-name-xmin=s
-
Only return records where the 'ind_island_name' field is greater than specified value.
- --ind-island-name=s
-
Only return records where the 'ind_island_name' field equals specified value.
Filtering for ind_name options
- --ind-name-contains=s
-
Only return records where the 'ind_name' field contains specified text.
- --ind-name-in-json=s
-
Only return records where the 'ind_name' field is in the specified values (JSON-encoded).
See
--ind-name-in
. - --ind-name-in=s@
-
Only return records where the 'ind_name' field is in the specified values.
Can be specified multiple times.
- --ind-name-is=s
-
Only return records where the 'ind_name' field equals specified value.
- --ind-name-isnt=s
-
Only return records where the 'ind_name' field does not equal specified value.
- --ind-name-max=s
-
Only return records where the 'ind_name' field is less than or equal to specified value.
- --ind-name-min=s
-
Only return records where the 'ind_name' field is greater than or equal to specified value.
- --ind-name-not-contains=s
-
Only return records where the 'ind_name' field does not contain specified text.
- --ind-name-not-in-json=s
-
Only return records where the 'ind_name' field is not in the specified values (JSON-encoded).
See
--ind-name-not-in
. - --ind-name-not-in=s@
-
Only return records where the 'ind_name' field is not in the specified values.
Can be specified multiple times.
- --ind-name-xmax=s
-
Only return records where the 'ind_name' field is less than specified value.
- --ind-name-xmin=s
-
Only return records where the 'ind_name' field is greater than specified value.
- --ind-name=s
-
Only return records where the 'ind_name' field equals specified value.
Filtering for iso3166_2_code options
- --iso3166-2-code-contains=s
-
Only return records where the 'iso3166_2_code' field contains specified text.
- --iso3166-2-code-in-json=s
-
Only return records where the 'iso3166_2_code' field is in the specified values (JSON-encoded).
See
--iso3166-2-code-in
. - --iso3166-2-code-in=s@
-
Only return records where the 'iso3166_2_code' field is in the specified values.
Can be specified multiple times.
- --iso3166-2-code-is=s
-
Only return records where the 'iso3166_2_code' field equals specified value.
- --iso3166-2-code-isnt=s
-
Only return records where the 'iso3166_2_code' field does not equal specified value.
- --iso3166-2-code-max=s
-
Only return records where the 'iso3166_2_code' field is less than or equal to specified value.
- --iso3166-2-code-min=s
-
Only return records where the 'iso3166_2_code' field is greater than or equal to specified value.
- --iso3166-2-code-not-contains=s
-
Only return records where the 'iso3166_2_code' field does not contain specified text.
- --iso3166-2-code-not-in-json=s
-
Only return records where the 'iso3166_2_code' field is not in the specified values (JSON-encoded).
See
--iso3166-2-code-not-in
. - --iso3166-2-code-not-in=s@
-
Only return records where the 'iso3166_2_code' field is not in the specified values.
Can be specified multiple times.
- --iso3166-2-code-xmax=s
-
Only return records where the 'iso3166_2_code' field is less than specified value.
- --iso3166-2-code-xmin=s
-
Only return records where the 'iso3166_2_code' field is greater than specified value.
- --iso3166-2-code=s
-
Only return records where the 'iso3166_2_code' field equals specified value.
Filtering for tags options
-
Only return records where the 'tags' field contains specified text.
-
Only return records where the 'tags' field is in the specified values (JSON-encoded).
See
--tags-in
. -
Only return records where the 'tags' field is in the specified values.
Can be specified multiple times.
-
Only return records where the 'tags' field equals specified value.
-
Only return records where the 'tags' field does not equal specified value.
-
Only return records where the 'tags' field is less than or equal to specified value.
-
Only return records where the 'tags' field is greater than or equal to specified value.
-
Only return records where the 'tags' field does not contain specified text.
-
Only return records where the 'tags' field is not in the specified values (JSON-encoded).
See
--tags-not-in
. -
Only return records where the 'tags' field is not in the specified values.
Can be specified multiple times.
-
Only return records where the 'tags' field is less than specified value.
-
Only return records where the 'tags' field is greater than specified value.
-
Only return records where the 'tags' field equals specified value.
Filtering options
Ordering options
- --random
-
Return records in random order.
- --sort-json=s
-
Order records according to certain field(s) (JSON-encoded).
See
--sort
. - --sort=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.
Output options
- --format=s
-
Choose output format, e.g. json, text.
Default value:
undef
- --json
-
Set output format to json.
- --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 `--naked-res` so you just get:
[1,2,3]
- --page-result
-
Filter output through a pager.
- --view-result
-
View output using a viewer.
Paging options
- --result-limit=s
-
Only return a certain number of records.
- --result-start=s
-
Only return starting from the n'th record.
Default value:
1
Other options
COMPLETION
This script has shell tab completion capability with support for several shells.
bash
To activate bash completion for this script, put:
complete -C list-idn-provinces list-idn-provinces
in your bash startup (e.g. ~/.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 cpanm-shcompgen which can activate shell completion for scripts immediately.
tcsh
To activate tcsh completion for this script, put:
complete list-idn-provinces 'p/*/`list-idn-provinces`/'
in your tcsh startup (e.g. ~/.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 shcompgen (see above).
other shells
For fish and zsh, install shcompgen as described above.
CONFIGURATION FILE
This script can read configuration files. Configuration files are in the format of IOD, which is basically INI with some extra features.
By default, these names are searched for configuration filenames (can be changed using --config-path
): ~/.config/list-idn-provinces.conf, ~/list-idn-provinces.conf, or /etc/list-idn-provinces.conf.
All found files will be read and merged.
To disable searching for configuration files, pass --no-config
.
You can put multiple profiles in a single file by using section names like [profile=SOMENAME]
or [SOMESECTION profile=SOMENAME]
. Those sections will only be read if you specify the matching --config-profile SOMENAME
.
You can also put configuration for multiple programs inside a single file, and use filter program=NAME
in section names, e.g. [program=NAME ...]
or [SOMESECTION program=NAME]
. The section will then only be used when the reading program matches.
You can also filter a section by environment variable using the filter env=CONDITION
in section names. For example if you only want a section to be read if a certain environment variable is true: [env=SOMEVAR ...]
or [SOMESECTION env=SOMEVAR ...]
. If you only want a section to be read when the value of an environment variable has value equals something: [env=HOSTNAME=blink ...]
or [SOMESECTION env=HOSTNAME=blink ...]
. If you only want a section to be read when the value of an environment variable does not equal something: [env=HOSTNAME!=blink ...]
or [SOMESECTION env=HOSTNAME!=blink ...]
. If you only want a section to be read when an environment variable contains something: [env=HOSTNAME*=server ...]
or [SOMESECTION env=HOSTNAME*=server ...]
. Note that currently due to simplistic parsing, there must not be any whitespace in the value being compared because it marks the beginning of a new section filter or section name.
To load and configure plugins, you can use either the -plugins
parameter (e.g. -plugins=DumpArgs
or -plugins=DumpArgs@before_validate_args
), or use the [plugin=NAME ...]
sections, for example:
[plugin=DumpArgs]
-event=before_validate_args
-prio=99
[plugin=Foo]
-event=after_validate_args
arg1=val1
arg2=val2
which is equivalent to setting -plugins=-DumpArgs@before_validate_args@99,-Foo@after_validate_args,arg1,val1,arg2,val2
.
List of available configuration parameters:
bps_code (see --bps-code)
bps_code.in (see --bps-code-in)
bps_code.is (see --bps-code-is)
bps_code.isnt (see --bps-code-isnt)
bps_code.max (see --bps-code-max)
bps_code.min (see --bps-code-min)
bps_code.not_in (see --bps-code-not-in)
bps_code.xmax (see --bps-code-xmax)
bps_code.xmin (see --bps-code-xmin)
detail (see --detail)
eng_name (see --eng-name)
eng_name.contains (see --eng-name-contains)
eng_name.in (see --eng-name-in)
eng_name.is (see --eng-name-is)
eng_name.isnt (see --eng-name-isnt)
eng_name.max (see --eng-name-max)
eng_name.min (see --eng-name-min)
eng_name.not_contains (see --eng-name-not-contains)
eng_name.not_in (see --eng-name-not-in)
eng_name.xmax (see --eng-name-xmax)
eng_name.xmin (see --eng-name-xmin)
exclude_fields (see --exclude-field)
fields (see --field)
format (see --format)
ind_capital_name (see --ind-capital-name)
ind_capital_name.contains (see --ind-capital-name-contains)
ind_capital_name.in (see --ind-capital-name-in)
ind_capital_name.is (see --ind-capital-name-is)
ind_capital_name.isnt (see --ind-capital-name-isnt)
ind_capital_name.max (see --ind-capital-name-max)
ind_capital_name.min (see --ind-capital-name-min)
ind_capital_name.not_contains (see --ind-capital-name-not-contains)
ind_capital_name.not_in (see --ind-capital-name-not-in)
ind_capital_name.xmax (see --ind-capital-name-xmax)
ind_capital_name.xmin (see --ind-capital-name-xmin)
ind_island_name (see --ind-island-name)
ind_island_name.contains (see --ind-island-name-contains)
ind_island_name.in (see --ind-island-name-in)
ind_island_name.is (see --ind-island-name-is)
ind_island_name.isnt (see --ind-island-name-isnt)
ind_island_name.max (see --ind-island-name-max)
ind_island_name.min (see --ind-island-name-min)
ind_island_name.not_contains (see --ind-island-name-not-contains)
ind_island_name.not_in (see --ind-island-name-not-in)
ind_island_name.xmax (see --ind-island-name-xmax)
ind_island_name.xmin (see --ind-island-name-xmin)
ind_name (see --ind-name)
ind_name.contains (see --ind-name-contains)
ind_name.in (see --ind-name-in)
ind_name.is (see --ind-name-is)
ind_name.isnt (see --ind-name-isnt)
ind_name.max (see --ind-name-max)
ind_name.min (see --ind-name-min)
ind_name.not_contains (see --ind-name-not-contains)
ind_name.not_in (see --ind-name-not-in)
ind_name.xmax (see --ind-name-xmax)
ind_name.xmin (see --ind-name-xmin)
iso3166_2_code (see --iso3166-2-code)
iso3166_2_code.contains (see --iso3166-2-code-contains)
iso3166_2_code.in (see --iso3166-2-code-in)
iso3166_2_code.is (see --iso3166-2-code-is)
iso3166_2_code.isnt (see --iso3166-2-code-isnt)
iso3166_2_code.max (see --iso3166-2-code-max)
iso3166_2_code.min (see --iso3166-2-code-min)
iso3166_2_code.not_contains (see --iso3166-2-code-not-contains)
iso3166_2_code.not_in (see --iso3166-2-code-not-in)
iso3166_2_code.xmax (see --iso3166-2-code-xmax)
iso3166_2_code.xmin (see --iso3166-2-code-xmin)
naked_res (see --naked-res)
query (see --query)
random (see --random)
result_limit (see --result-limit)
result_start (see --result-start)
sort (see --sort)
tags (see --tags)
tags.contains (see --tags-contains)
tags.in (see --tags-in)
tags.is (see --tags-is)
tags.isnt (see --tags-isnt)
tags.max (see --tags-max)
tags.min (see --tags-min)
tags.not_contains (see --tags-not-contains)
tags.not_in (see --tags-not-in)
tags.xmax (see --tags-xmax)
tags.xmin (see --tags-xmin)
with_field_names (see --with-field-names)
ENVIRONMENT
LIST_IDN_PROVINCES_OPT => str
Specify additional command-line options.
FILES
~/.config/list-idn-provinces.conf
~/list-idn-provinces.conf
/etc/list-idn-provinces.conf
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/App-IndonesianLocaleUtils.
SOURCE
Source repository is at https://github.com/perlancar/perl-App-IndonesianLocaleUtils.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-IndonesianLocaleUtils
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.
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2021, 2015 by 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.