App-RecordStream
view release on metacpan or search on metacpan
lib/App/RecordStream.pm view on Meta::CPAN
use strict;
use warnings;
package App::RecordStream;
use Module::Pluggable::Object;
our $VERSION = "4.0.25";
sub operation_packages {
sort { $a cmp $b }
Module::Pluggable::Object->new(
search_path => "App::RecordStream::Operation",
max_depth => 4,
)->plugins
}
=encoding utf-8
=for markdown
<img src="https://cdn.rawgit.com/benbernard/RecordStream/master/logos/logo-small.svg" align="right">
=for markdown
[](https://metacpan.org/release/App-RecordStream)
[](https://travis-ci.org/benbernard/RecordStream)
=head1 NAME
App::RecordStream - recs - A system for command-line analysis of data
=head1 SYNOPSIS
A set of programs for creating, manipulating, and outputting a stream of
Records, or JSON hashes. Inspired by Monad.
=head1 INSTALLATION
=head2 Quick, standalone bundle
The quickest way to start using recs is via the minimal, standalone bundle:
curl -fsSL https://recs.pl > recs
chmod +x recs
./recs --help
This is also known as the "fatpacked" recs.
=head2 From CPAN
You can also install recs from L<CPAN|http://cpan.org> as App::RecordStream:
cpanm --interactive App::RecordStream
Using L<cpanm> in interactive mode will prompt you for optional feature
support. Other CPAN clients such as L<cpan> and L<cpanp> also work fine, but
you can't opt to use any optional features (just like cpanm in non-interactive
mode). A kitchen-sink install of App::RecordStream looks like:
cpanm --with-recommends --with-all-features App::RecordStream
If you don't have L<cpanm> itself, you can install it easily with:
curl -fsSL https://cpanmin.us | perl - App::cpanminus
=head1 DESCRIPTION
The recs system consists of three basic sets of commands:
=over 4
=item * I<Input> commands responsible for generating streams of record objects
=item * I<Manipulation> commands responsible for analyzing, selecting, and manipulating records
=item * I<Output> commands responsible for taking record streams and producing output for humans or other programs
=back
These commands can interface with other systems to retrieve data, parse existing
files, or just regex out some values from a text stream.
Commands are run using C<recs command [options and arguments]>. If you're using
a CPAN-based install, you may also run commands directly as C<recs-command>,
though this is no longer recommended for forwards compatibility. Both
L<installation methods|/INSTALLATION> provide a top-level C<recs> executable
which dispatches to commands, so this is the preferred invocation style.
The core recs commands are briefly summarized below, and you can list all
available commands by running C<recs --list>.
To read more about each command, run C<recs command --help>. Longer
documentation is available as C<recs command --help-all> or C<perldoc recs-command>.
For example, to read more about L</fromcsv>, you might run any of the
following:
recs fromcsv --help
recs fromcsv --help-all
perldoc recs-fromcsv
=head1 COMMANDS
=head2 Input Generation
=over 4
=item fromcsv
Produces records from a csv file/stream
=item fromdb
Produces records for a db table, or from a SELECT statement into a db.
=item fromre
Matches input streams against a regex, puts capture groups into hashes
( run in 5.812 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )