#!/usr/bin/env perl
#
# This file is part of Convert-TBX-Basic
#
# This software is copyright (c) 2014 by Alan K. Melby.
#
# This is free software; you can redistribute it and/or modify it under
# the same terms as the Perl 5 programming language system itself.
#
use strict;
# PODNAME: basic2min
# ABSTRACT: Convert a TBX-Basic file into TBX-Min
our $VERSION = '0.01'; # VERSION
use Convert::TBX::Basic 'basic2min';
# send conversion info to stderr
use Log::Any::Adapter ('Stderr');
die "Usage: $0 <file.tbx> <source-lang> <target-lang>\n"
unless @ARGV == 3;
my ($basic_file, $source, $target) = @ARGV;
my $min = basic2min($basic_file, $source, $target);
print ${ $min->as_xml };
__END__
=pod
=head1 NAME
basic2min - Convert a TBX-Basic file into TBX-Min
=head1 VERSION
version 0.01
=head1 SYNOPSIS
% basic2min file.tbx en fr 2>log.txt
=head1 DESCRIPTION
This script takes three arguments: the name of a TBX-Basic file and
source and target language abreviations indicating which languages
to extract from the file. Relevant terms are extracted from the file
and a TBX::Min document is printed to standard out. All logs are
printed to stderr.
=head1 SEE ALSO
This script is a simple wrapper around the C<basic2min>
function in L<Convert::TBX::Basic>.
=head1 AUTHOR
BYU Translation Research Group <akmtrg@byu.edu>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Alan K. Melby.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut