Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/progrhyme/perl-text-ltsv-liner
A simple and line-oriented LTSV parser
https://github.com/progrhyme/perl-text-ltsv-liner
Last synced: about 2 months ago
JSON representation
A simple and line-oriented LTSV parser
- Host: GitHub
- URL: https://github.com/progrhyme/perl-text-ltsv-liner
- Owner: progrhyme
- License: other
- Created: 2013-06-19T16:31:26.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-07-03T06:28:38.000Z (over 7 years ago)
- Last Synced: 2023-08-09T11:41:31.328Z (over 1 year ago)
- Language: Perl
- Size: 23.4 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# NAME
Text::LTSV::Liner - Line filter of LTSV text
# SYNOPSIS
use Text::LTSV::Liner;
my $liner = Text::LTSV::Liner->new( key => \@keys );
while(<>) {
$liner->run($_);
}# DESCRIPTION
Labeled Tab-separated Values (LTSV) format is a variant of Tab-separated
Values (TSV). (cf: [http://ltsv.org/](http://ltsv.org/))
This module simply filters text whose format is LTSV by specified keys.# METHODS
## new
Constructor.
You can specify some options to filter lines.- **key**
You can choose keys as array reference which you want to see in filtered output.
- **no-color**
If you prefer no-colorized output, specify this option.
- **no-key**
If you don't need to see keys in the output, specify this option.
Then you'll see values only in the output.## run
Process lines and print output to STDOUT.
## parse
my $liner = Text::LTSV::Liner->new( key => \@keys );
for my $line (@lines) {
my $parsed = $liner->parse($line);
}This method is convinent if you want to use the filtered output in your codes.
# AUTHORS
IKEDA Kiyoshi
# LICENSE
Copyright (C) 2013-2017 IKEDA Kiyoshi.
This library is free software; you can redistribute it and/or modify it under
the same terms as Perl itself. That means either (a) the GNU General Public
License or (b) the Artistic License.