#!/usr/bin/env perl

use strict;
use warnings;

use App::Test::DWG::LibreDWG::JSON;

our $VERSION = 0.05;

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

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

__END__

=pod

=encoding utf8

=head1 NAME

test-dwg-libredwg-json - Script to test DWG file by LibreDWG conversions via JSON.

=head1 SYNOPSIS

 test-dwg-libredwg-json [-d test_dir] [-h] [-i] [-v level] [--version] dwg_file

=head1 DESCRIPTION

This tool is used to test libredwg JSON conversions on DWG file.

The process is to convert DWG file to LibreDWG JSON representation, back to DWG
and again to JSON. After this create diff between two JSON representations to
output.

=head1 ARGUMENTS

=over 8

=item * C<-d test_dir>

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

=item * C<-h>

Print help.

=item * C<-i>

Ignore errors.

Default value is error reporting.

=item * C<-v level>

Verbosity level.

Default value is 0, max is 9.

=item * C<--version>

Print version of script.

=item * C<dwg_file>

AutoCAD DWG file to test.

=back

=head1 ENV VARIABLES

=over

=item * C<DWGREAD>

Env variable to rewrite default 'dwgread' command.

e.g. "wine dwgread.exe"

=item * C<DWGWRITE>

Env variable to rewrite default 'dwgwrite' command.

e.g. "wine dwgwrite.exe"

=back

=head1 EXAMPLE1

 test-dwg-libredwg-json __FILE__.dwg

=head1 EXAMPLE2

 DWGREAD="wine dwgread.exe"
 DWGWRITE="wine dwgwrite.exe"
 test-dwg-libredwg-json __FILE__.dwg

=head1 SEE ALSO

=over

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

Script to test DWG files by LibreDWG dwgread command.

=back

=head1 REPOSITORY

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

=head1 AUTHOR

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

L<http://skim.cz>

=head1 LICENSE AND COPYRIGHT

© 2023-2024 Michal Josef Špaček

BSD 2-Clause License

=head1 VERSION

0.05

=cut
