/[suikacvs]/webroot/www/harusame/bin/harusame.pl
Suika

Diff of /webroot/www/harusame/bin/harusame.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wakaba, Tue Oct 21 08:36:59 2008 UTC revision 1.2 by wakaba, Tue Oct 21 10:14:26 2008 UTC
# Line 18  pod2usage (-exitval => 1, -verbose => 1, Line 18  pod2usage (-exitval => 1, -verbose => 1,
18        unless defined $lang;        unless defined $lang;
19  $lang =~ tr/A-Z/a-z/; ## ASCII case-insensitive.  $lang =~ tr/A-Z/a-z/; ## ASCII case-insensitive.
20    
21  use Message::DOM::DOMImplementation;  require Message::DOM::DOMImplementation;
22  my $dom = Message::DOM::DOMImplementation->new;  my $dom = Message::DOM::DOMImplementation->new;
23    
24  my $doc = $dom->create_document;  my $doc = $dom->create_document;
# Line 93  sub get_content_element ($) { Line 93  sub get_content_element ($) {
93    return $c_el;    return $c_el;
94  } # get_content_element  } # get_content_element
95    
96    __END__
97    
98    =head1 NAME
99    
100    harusame.pl - Multilingual Web page management tool
101    
102    =head1 SYNOPSIS
103    
104      perl harusame.pl --lang LANGCODE < input.html > output.html
105    
106      perl harusame.pl --help
107    
108    =head1 DESCRIPTION
109    
110    The C<harusame.pl> script extracts a version of the HTML document
111    written in the specified natural language, from a source HTML document
112    that contains paragraphs in multiple natural languages.
113    
114    The document management of a multilingual Web site where there are
115    multiple versions of a (conceptually same) document is somewhat
116    difficult in general.  If the author of an HTML document wants to edit
117    a part of the document, then he or she has to ensure not to forget
118    updating translations at the same time, otherwise documents in
119    different language versions also differ in their content versions.
120    
121    Using the C<harusame.pl>, one can generate versions of an HTML
122    document in different language from one source HTML document that
123    contains paragraphs written in all of those languages, such that
124    authors no longer have to manage different content versions and
125    different language versions in separate files.
126    
127    =head1 ARGUMENTS
128    
129    The source document must be provided to the script using the
130    I<standard input>.  It must be encoded in UTF-8.
131    
132    The script outputs the generated document encoded in UTF-8 to the
133    I<standard output>.
134    
135    Following command-line options are available to this script:
136    
137    =over 4
138    
139    =item C<--help>
140    
141    Show the help message and exit.
142    
143    =item C<--lang I<LANGCODE>> (B<REQUIRED>)
144    
145    The language of the version to generate.  This option must be
146    specified.  The value must be a value that is valid for HTML
147    C<lang=""> attribute.
148    
149    =back
150    
151    =head1 SEE ALSO
152    
153    Readme L<http://suika.fam.cx/www/harusame/readme>.  How to mark up the
154    source HTML document is described in this document.
155    
156    =head1 AUTHOR
157    
158    Wakaba <w@suika.fam.cx>.
159    
160    =head1 LICENSE
161    
162    Copyright 2008 Wakaba <w@suika.fam.cx>.
163    
164    This library is free software; you can redistribute it and/or modify
165    it under the same terms as Perl itself.
166    
167    =cut
168    
169  ## $Date$  ## $Date$

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24