#!/usr/bin/env perl

use strict;
use warnings;

use App::Test::DWG::LibreDWG::DwgRead;

our $VERSION = 0.06;

# Run.
exit App::Test::DWG::LibreDWG::DwgRead->new->run;

# Print version.
sub VERSION_MESSAGE {
	print $VERSION."\n";
	exit 0;
}

__END__

=pod

=encoding utf8

=head1 NAME

test-dwg-libredwg-dwgread - Script to test DWG files by LibreDWG dwgread command.

=head1 SYNOPSIS

 test-dwg-libredwg-dwgread [-d test_dir] [-f] [-h] [-i] [-m match_string] [-s] [-v level] [--version] directory

=head1 DESCRIPTION

This tool is used to test libredwg dwgread command on directory with DWG files.

The process is to find all DWG files in a directory and run dwgread on them.
If dwgread exits with code different than 0, report it. If dwgread returns some ERROR,
report number of ERRORS in run.

=head1 ARGUMENTS

=over 8

=item * C<-d test_dir>

Test directory. If doesn't exist, create dir in system tmp.

=item * C<-f>

Print file name in matching output.

=item * C<-h>

Print help.

=item * C<-i>

Ignore errors.

Default value is error reporting.

=item * C<-m match_string>

Match string from dwgread stderr.

Default value is not defined.

=item * C<-s>

Select files which are symlinks too.

=item * C<-v level>

Verbosity level.

Default value is 1, min is 0, max is 9.

=item * C<--version>

Print version of script.

=item * C<directory>

Directory with DWG files to test.

=back

=head1 EXAMPLE

 test-dwg-libredwg-dwgread __DIR__

=head1 SEE ALSO

=over

=item L<test-dwg-libredwg-json>

Script to test DWG file by LibreDWG conversions via JSON.

=back

=head1 REPOSITORY

L<https://github.com/michal-josef-spacek/App-Test-DWG-LibreDWG-DwgRead>

=head1 AUTHOR

Michal Josef Špaček L<mailto:skim@cpan.org>

L<http://skim.cz>

=head1 LICENSE AND COPYRIGHT

© 2023-2025 Michal Josef Špaček

BSD 2-Clause License

=head1 VERSION

0.06

=cut
