Leo Charre

NAME

gbs - group argument LIST or STDIN by similarity and print to STDOUT

DESCRIPTION

Takes stdin or a list of arguments. This is the LIST. We group by similarity. Having same list element multiple times is ignored.

Elements are printed in groups separated by two carriage returns. Optionally, we output YAML.

USAGE

gbs [OPTION]... LIST...

   -d          debug
   -h          help   
   -v          version and exit
   -s float    min similarity for truth, defaults to 0.8
   -y          output is YAML dump
   -b          bash type output, each group is one line, quoted and space separated
   -H          group hard (thorough, slow)

   -g          group lazy (faster)
   -G          group hard (slow and accurate)

EXAMPLE USAGE

Group from argument list

   gbs these are words and if they are similar enough they will be matched and grouped

Group from STDIN

Group filenames by similarity!

   ls ./ | gbs
   
   find ~/ -name "*txt" | gbs 

List filenames by similarity:

   [root@moonshine String-Similarity-Group]# gbs ../*
   ../excel2txt-0.04
   ../excel2txt-0.04.tar.gz

   ../file1.pdf
   ../file2.pdf
   ../file3.pdf

   ../DMS-WUI-Plugin-Base
   ../DMS-WUI-Plugin-Tmpl
   ../DMS-WUI-Plugin-User

   ../temp
   ../tmp

   ../index.html?parent=747704
   ../index.html?parent=747704;node_id=3333

SEE ALSO

Getopt::Std::Strict

String::Similarity::Group - parent package.

String::Similarity

AUTHOR

Leo Charre leocharre at cpan dot org

LICENSE

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e., under the terms of the "Artistic License" or the "GNU General Public License".

DISCLAIMER

This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the "GNU General Public License" for more details.