Group
Extension

Matches 44

Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Fix.pm ( view source; MetaCPAN )
sformations

=head1 SYNOPSIS

    # From the command line

    $ catmandu convert JSON --fix 'add(foo,bar)' < data.json
    $ catmandu convert YAML --fix 'upcase(job) remove(test)' < data.yml
    $ ca
-fix /tmp/myfixes.txt

    # With preprocessing
    $ catmandu convert JSON --var field=foo --fix 'add({{field}},bar)' < data.json

    # From Perl

    use Catmandu;

    my $fixer = Catmandu->fixer(
is command is executed on the command line:

    $ catmandu convert JSON --fix 'upcase(title); add(deep.nested.field,1)' < data.json

then all the title fields will be upcased and a new deeply nested 
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Exporter/Null.pm ( view source; MetaCPAN )
he commandline
  	$ catmandu convert JSON --fix myfixes to Null < /tmp/data.json

	$ catmandu convert JSON --fix 'add_to_exporter(.,JSON)' to Null < /tmp/data.json
	
=head1 DESCRIPTION

This exporter 
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Exporter/CSV.pm ( view source; MetaCPAN )
< data.xls

    $ catmandu convert JSON to CSV --fix myfixes.txt --sep_char ';' < data.json

    # Provide a hint to the exporter which fields to export from the JSON
    # input. By default the CSV e
 will export the fields that are
    # found in the first JSON record.
    $ catmandu convert JSON to CSV --fields "id,title,year" < data.json

    # In a Perl script

    use Catmandu;

    my $expor
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Fix/Bind/importer.pm ( view source; MetaCPAN )
ove_field(n,brol)
        add_to_exporter(.,JSON)

        do importer(Mock,size:20,step:true)
            move_field(n,m)
            add_to_exporter(.,JSON)
        end
    end

=head1 SEE ALSO

L<C
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Cmd/run.pm ( view source; MetaCPAN )
xt
  add_field(my_source,{{source}})

  # Or create an execurable fix script:

  #!/usr/bin/env catmandu run
  do importer(Mock,size:10)
    add_field(foo,bar)
    add_to_exporter(.,JSON)
  end

=cut
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Importer/CSV.pm ( view source; MetaCPAN )
V data

=head1 SYNOPSIS

    # From the command line

    # convert a CSV file to JSON
    catmandu convert CSV to JSON < journals.csv

    # set column names if CSV file has no header line
    echo '
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Cmd/convert.pm ( view source; MetaCPAN )


  catmandu convert <IMPORTER> <OPTIONS> to <EXPORTER> <OPTIONS>

  cat books.json | catmandu convert JSON to CSV --fields id,title

  catmandu help importer JSON
  catmandu help exporter YAML

=cut
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Cmd/config.pm ( view source; MetaCPAN )
atmandu->exporter('JSON', pretty => 1, array => 0);
}

1;

__END__

=pod

=head1 NAME

Catmandu::Cmd::config - export the Catmandu config

=head1 EXAMPLES

  # export config to JSON
  catmandu config
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Cmd/help.pm ( view source; MetaCPAN )
.

    if (@$args == 2) {

        # detect many forms such as:
        # export JSON, exporter JSON, JSON export, JSON exporter
        foreach (0, 1) {
            foreach my $type (keys %MODULES) {
ME>";
}

1;

__END__

=pod

=head1 NAME

Catmandu::Cmd::help - show help

=head1 EXAMPLES

  catmandu help convert
  catmandu help import JSON
  catmandu help help
  catmandu help fix set_field

=cut
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Importer/TSV.pm ( view source; MetaCPAN )
values

=head1 SYNOPSIS

    # From the command line

    # convert a TSV file to JSON
    catmandu convert TSV to JSON < journals.tab

    # Or in a Perl script

    use Catmandu;

    my $importer =
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Fix/Condition/valid.pm ( view source; MetaCPAN )
to a schema
    select valid('', JSONSchema, schema: "my/schema.json")

    # check the author field
    unless valid(author, JSONSchema, schema: "my/author.schema.json")
       ... # repair or give w
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Cmd/info.pm ( view source; MetaCPAN )
  catmandu info --stores
  catmandu info --validators
  catmandu info --namespace=Catmandu
  catmandu info --all

  # export list of exporter modules to JSON
  catmandu info --exporters to JSON

=cut
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Importer/YAML.pm ( view source; MetaCPAN )
t imports YAML data

=head1 SYNOPSIS

    # From the command line

    $ catmandu convert YAML to JSON < data.yaml

    # In a Perl script

    use Catmandu;

    my $importer = Catmandu->importer('YA
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Fix/import.pm ( view source; MetaCPAN )
SH key or ARRAY index by replacing
its value with imported data

=head1 SYNOPSIS

   import(foo.bar, JSON, file: "http://foo.com/bar.json", data_path: data.*)

=head1 SEE ALSO

L<Catmandu::Fix>

=cut
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Exporter/Count.pm ( view source; MetaCPAN )
at counts things

=head1 SYNOPSIS

    # From the commandline
    $ catmandu convert JSON to Count < /tmp/data.json


=head1 DESCRIPTION

This exporter exports nothing and just counts the number of it
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Plugin/Datestamps.pm ( view source; MetaCPAN )
 data:
          plugins:
            - Datestamps

 $ echo '{"hello":"world"}' | catmandu import JSON to test
 $ catmandu export test to YAML
 ---
 _id: ADA305D8-697D-11E3-B0C3-97AD572FA7E3
 date_cre
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Exporter/Mock.pm ( view source; MetaCPAN )
t anything

=head1 SYNOPSIS

    # From the commandline
    $ catmandu convert JSON --fix myfixes to Mock < /tmp/data.json

    # From Perl

    use Catmandu;

    # Print to STDOUT
    my $exporter =
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Fix/SimpleGetValue.pm ( view source; MetaCPAN )
IPTION

Catmandu::Fix::SimpleGetValue eases the creation of emit Fixes that transform
values on a JSON path. A Fix package implementing Catmandu::Fix::SimpleGetValue
needs to implement a method C<emit
atmandu::Fix. The method should
return a string containing the Perl code to transform values on a JSON path.

It is not possible to inspect in an emit Fix the actual value on which this Fix
runs: $var
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Plugin/Versioning.pm ( view source; MetaCPAN )
store
 $ echo '{"_id":"001",hello":"world"}' | catmandu import JSON to test
 $ echo '{"_id":"001",hello":"world2"}' | catmandu import JSON to test

 # In the store we see only the latest version
 $ ca
Catmandu ( N/NI/NICS/Catmandu-1.2025.tar.gz, NICS, 2025; MetaCPAN )
Catmandu/lib/Catmandu/Fix/import_from_string.pm ( view source; MetaCPAN )
orter.

=head1 SYNOPSIS

    #BEFORE: { 'json' => '[{"name":"Nicolas"}]' }
    #AFTER:  { 'json' => [{"name":"Nicolas"}] }

    import_from_string('json','JSON')

    #BEFORE: { record => qq(first_nam
choose:

* full package name of the importer (e.g. 'Catmandu::Importer::JSON')

* short package name of the importer (e.g. 'JSON')

* name of the importer as declared in the Catmandu configuration

=i

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.