Debian Codegraph @

bin/xgettextdbi

raw
1 =head1 NAME
2
3 xgettextdbi - Fetch values for translation from a database
4
5 =head1 SYNOPSIS
6
7 % xgettextdbi [OPTIONS]
8
9 INPUT OPTIONS:
10 --dsn the database DSN
11 --username your username
12 --password your password
13 --query the SQL query to select the column you would like translated
14
15 OUTPUT OPTIONS:
16 -d, --default-domain Use $NAME.po for output, instead of messages.po
17 -o, --output PO file name to be written or incrementally
18 updated (use "-" for STDOUT)
19 -p, --output-dir Output files will be placed in this directory
20
21 =head1 DESCRIPTION
22
23 Grabs values from a database;
24
25 =cut
26
27 use strict;
28 use warnings;
29
30 use Locale::Maketext::Extract::DBI;
31 use Getopt::Long;
32 use Pod::Usage;
33
34 our $VERSION = '0.01';
35
36 my %options;
37
38 GetOptions( \%options, qw( dsn=s username=s password=s query=s help=s p|output-dir=s o|output=s d|default-domain=s ) );
39
40 pod2usage( 1 ) && exit if exists $options{ help } or !keys %options;
41
42 my $extractor = Locale::Maketext::Extract::DBI->new;
43 $extractor->extract( %options );
44
45 =head1 AUTHOR
46
47 =over 4
48
49 =item * Brian Cassidy E<lt>[email protected]<gt>
50
51 =back
52
53 =head1 COPYRIGHT AND LICENSE
54
55 Copyright 2006 by Brian Cassidy
56
57 This library is free software; you can redistribute it and/or modify
58 it under the same terms as Perl itself.
59
60 =head1 SEE ALSO
61
62 =over 4
63
64 =item * L<xgettext>
65
66 =back
67
68 =cut