[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp TODO Texinfo/Convert/Converter.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp TODO Texinfo/Convert/Converter.pm |
Date: |
Mon, 31 Oct 2011 08:53:58 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/10/31 08:53:58
Modified files:
tp : TODO
tp/Texinfo/Convert: Converter.pm
Log message:
Simplify 'document_name' setting.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/TODO?cvsroot=texinfo&r1=1.195&r2=1.196
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Converter.pm?cvsroot=texinfo&r1=1.58&r2=1.59
Patches:
Index: TODO
===================================================================
RCS file: /sources/texinfo/texinfo/tp/TODO,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -b -r1.195 -r1.196
--- TODO 29 Oct 2011 12:23:43 -0000 1.195
+++ TODO 31 Oct 2011 08:53:57 -0000 1.196
@@ -9,7 +9,8 @@
<macro>@vtable @asis
Is it right or not?
-Warning for obsolete/unused customization variables like USE_SECTIONS?
+Warning for obsolete/unused customization variables like USE_SECTIONS
+(a FIXME in Texinfo/Common.pm).?
For plaintext @image output if there is no basename.txt, use alt else
the basename as [image basename].
@@ -293,12 +294,7 @@
sectioning_command_target_name
node_target_name
-.init files:
-manuals/cvs.init
-manuals/mini_ker_t2h.init
-singular_manual/t2h_singular.init
-
-not relevant since indices cannot be split anymore
+tests .init file not relevant since indices cannot be split anymore
indices/index_test.init
Index: Texinfo/Convert/Converter.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Converter.pm,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- Texinfo/Convert/Converter.pm 30 Oct 2011 23:03:32 -0000 1.58
+++ Texinfo/Convert/Converter.pm 31 Oct 2011 08:53:58 -0000 1.59
@@ -132,7 +132,7 @@
# my $filehandle = $self->{'fh'};
# if ($encoding eq 'utf8' or $encoding eq 'utf-8-strict') {
# binmode($filehandle, ':utf8');
- # } else { # FIXME also right for shiftijs or similar encodings?
+ # } else { # also right for shiftijs or similar encodings?
# binmode($filehandle, ':bytes');
# }
# binmode($filehandle, ":encoding($encoding)");
@@ -377,6 +377,8 @@
$input_basename = $self->get_conf('PREFIX');
}
+ # the name of the document, which is more or less the basename, without
+ # extension
my $document_name;
my $set_outfile = $self->get_conf('OUTFILE');
# determine output file and output file name
@@ -384,19 +386,17 @@
if (!defined($self->get_conf('OUTFILE'))) {
if (defined($setfilename) and !$self->get_conf('NO_USE_SETFILENAME')) {
$outfile = $setfilename;
+ $document_name = $setfilename;
+ $document_name =~ s/\.[^\.]*$//;
if (!$self->get_conf('USE_SETFILENAME_EXTENSION')) {
$outfile =~ s/\.[^\.]*$//;
- $document_name = $outfile;
$outfile .= '.'.$self->get_conf('EXTENSION')
if (defined($self->get_conf('EXTENSION'))
and $self->get_conf('EXTENSION') ne '');
- } else {
- $document_name = $outfile;
}
} elsif ($input_basename ne '') {
$outfile = $input_basename;
- #$outfile =~ s/\.te?x(i|info)?$//;
- $document_name = $outfile;
+ $document_name = $input_basename;
$outfile .= '.'.$self->get_conf('EXTENSION')
if (defined($self->get_conf('EXTENSION'))
and $self->get_conf('EXTENSION') ne '');
@@ -410,27 +410,23 @@
$self->set_conf('OUTFILE', $outfile);
} else {
$document_name = $self->get_conf('OUTFILE');
- # FIXME use a different configuration variable?
- if (!$self->get_conf('USE_SETFILENAME_EXTENSION')) {
$document_name =~ s/\.[^\.]*$//;
}
- }
- my $output_basename = $self->get_conf('OUTFILE');
+ # the output file without directories part.
+ my $output_filename = $self->get_conf('OUTFILE');
# this is a case that should happen rarely: one wants to get
# the result in a string and there is a setfilename.
if ($self->get_conf('OUTFILE') eq '' and defined($setfilename)
and !$self->get_conf('NO_USE_SETFILENAME')) {
- $output_basename = $setfilename;
+ $output_filename = $setfilename;
$document_name = $setfilename;
- if (!$self->get_conf('USE_SETFILENAME_EXTENSION')) {
$document_name =~ s/\.[^\.]*$//;
}
- }
$document_name =~ s/^.*\///;
$self->{'document_name'} = $document_name;
- $output_basename =~ s/^.*\///;
- $self->{'output_filename'} = $output_basename;
+ $output_filename =~ s/^.*\///;
+ $self->{'output_filename'} = $output_filename;
if ($self->get_conf('SPLIT')) {
if (defined($set_outfile)) {
$self->{'destination_directory'} = $self->get_conf('OUTFILE');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo/tp TODO Texinfo/Convert/Converter.pm,
Patrice Dumas <=