perlancar > App-IndonesianLocaleUtils-0.01 > list-id-provinces

Download:
App-IndonesianLocaleUtils-0.01.tar.gz

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

list-id-provinces - Provinces in Indonesia

VERSION ^

This document describes version 0.01 of list-id-provinces (from Perl distribution App-IndonesianLocaleUtils), released on 2015-07-10.

SYNOPSIS ^

Usage:

 % list-id-provinces [options] [query]

DESCRIPTION ^

REPLACE ME

OPTIONS ^

* marks required options.

Configuration options

--config-path=filename

Set path to configuration file.

Can be specified multiple times.

--config-profile=s

Set configuration profile to use.

--no-config

Do not use any configuration file.

Environment options

--no-env

Do not read environment for default 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.

--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=i

Only return records where the 'bps_code' field equals specified value.

--bps-code-isnt=i

Only return records where the 'bps_code' field does not equal specified value.

--bps-code-max=i

Only return records where the 'bps_code' field is less than or equal to specified value.

--bps-code-min=i

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=i

Only return records where the 'bps_code' field is less than specified value.

--bps-code-xmin=i

Only return records where the 'bps_code' field is greater than specified value.

--bps-code=i

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

--tags-contains=s

Only return records where the 'tags' field contains specified text.

--tags-in-json=s

Only return records where the 'tags' field is in the specified values (JSON-encoded).

See --tags-in.

--tags-in=s@

Only return records where the 'tags' field is in the specified values.

Can be specified multiple times.

--tags-is=s

Only return records where the 'tags' field equals specified value.

--tags-isnt=s

Only return records where the 'tags' field does not equal specified value.

--tags-max=s

Only return records where the 'tags' field is less than or equal to specified value.

--tags-min=s

Only return records where the 'tags' field is greater than or equal to specified value.

--tags-not-contains=s

Only return records where the 'tags' field does not contain specified text.

--tags-not-in-json=s

Only return records where the 'tags' field is not in the specified values (JSON-encoded).

See --tags-not-in.

--tags-not-in=s@

Only return records where the 'tags' field is not in the specified values.

Can be specified multiple times.

--tags-xmax=s

Only return records where the 'tags' field is less than specified value.

--tags-xmin=s

Only return records where the 'tags' field is greater than specified value.

--tags=s

Only return records where the 'tags' field equals specified value.

Filtering options

--query=s, -q

Search.

Ordering options

--random

Return records in random order.

--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.

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]

Paging options

--result-limit=i

Only return a certain number of records.

--result-start=i

Only return starting from the n'th record.

Default value:

 1

Other options

--help, -h, -?

Display help message and exit.

--version, -v

Display program's version and exit.

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-id-provinces list-id-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 shcompgen which allows you to activate completion scripts for several kinds of scripts on multiple shells. Some CPAN distributions (those that are built with Dist::Zilla::Plugin::GenShellCompletion) will even automatically enable shell completion for their included scripts (using shcompgen) at installation time, so you can immadiately have tab completion.

tcsh

To activate tcsh completion for this script, put:

 complete list-id-provinces 'p/*/`list-id-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.

ENVIRONMENT ^

CONFIGURATION FILE ^

This script can read configuration file, which by default is searched at ~/.config/list-id-provinces.conf, ~/list-id-provinces.conf or /etc/list-id-provinces.conf (can be changed by specifying --config-path). All found files will be read and merged.

To disable searching for configuration files, pass --no-config.

Configuration file is in the format of IOD, which is basically INI with some extra features.

You can put multiple profiles in a single file by using section names like [profile=SOMENAME]. Those sections will only be read if you specify the matching --config-profile SOMENAME.

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)
 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)

FILES ^

~/.config/list-id-provinces.conf

~/list-id-provinces.conf

/etc/list-id-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) 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.

syntax highlighting: