diff --git a/bin/uniq-files b/bin/uniq-files deleted file mode 100755 index f7d8f09..0000000 --- a/bin/uniq-files +++ /dev/null @@ -1,39 +0,0 @@ -#!perl - -use 5.010; -use strict; -use warnings; - -use Perinci::CmdLine::Any; - -# VERSION - -Perinci::CmdLine::Any->new(url => '/App/UniqFiles/uniq_files')->run; - -1; -# ABSTRACT: Report or omit duplicate file contents -# PODNAME: uniq-files - -=head1 SYNOPSIS - - # list all files which do not have duplicate contents - $ uniq-files * - - # list all files which have duplicate contents - $ uniq-files -d * - - # list number of occurrences of contents for each file - $ uniq-files -c * - - -=head1 DESCRIPTION - -This is a simple script to report/omit files which have duplicate contents. -Think the B Unix command, but for checking uniqueness of file contents. - - -=head1 SEE ALSO - -B, Unix command from which this program is inspired. - -=cut diff --git a/dist.ini b/dist.ini index 3e8152a..daac537 100644 --- a/dist.ini +++ b/dist.ini @@ -5,6 +5,9 @@ author = Steven Haryanto license = Perl_5 copyright_holder = Steven Haryanto +[Rinci::ScriptFromFunc] +script= func=/App/UniqFiles/uniq_files, prefer_lite=1 + [@Author::SHARYANTO] :version=0.23 diff --git a/lib/App/UniqFiles.pm b/lib/App/UniqFiles.pm index 44c04e3..d855cdd 100644 --- a/lib/App/UniqFiles.pm +++ b/lib/App/UniqFiles.pm @@ -98,6 +98,23 @@ duplicate, and so on. _ }, }, + examples => [ + { + summary => 'List all files which do no have duplicate contents', + src => 'uniq-files *', + src_plang => 'bash', + }, + { + summary => 'List all files which have duplicate contents', + src => 'uniq-files -d *', + src_plang => 'bash', + }, + { + summary => 'List number of occurences of contents for each file', + src => 'uniq-files -c *', + src_plang => 'bash', + }, + ], }; sub uniq_files { my %args = @_;