[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * Pod-Simple-Texinfo/pod2texi.pl: allow - as --pr
From: |
Patrice Dumas |
Subject: |
branch master updated: * Pod-Simple-Texinfo/pod2texi.pl: allow - as --preamble argument to read the preamble from stdin. |
Date: |
Mon, 07 Feb 2022 14:55:10 -0500 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new ab010c81c0 * Pod-Simple-Texinfo/pod2texi.pl: allow - as --preamble
argument to read the preamble from stdin.
ab010c81c0 is described below
commit ab010c81c0e936124a1b349facf4a0b9bc6ec4cc
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Feb 7 20:54:55 2022 +0100
* Pod-Simple-Texinfo/pod2texi.pl: allow - as --preamble argument to
read the preamble from stdin.
---
ChangeLog | 5 +++++
Pod-Simple-Texinfo/pod2texi.pl | 21 ++++++++++++---------
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f911e40ef6..28f0c08438 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-02-07 Patrice Dumas <pertusus@free.fr>
+
+ * Pod-Simple-Texinfo/pod2texi.pl: allow - as --preamble argument to
+ read the preamble from stdin.
+
2022-02-07 Patrice Dumas <pertusus@free.fr>
* doc/texinfo.texi (HTML Customization Variables), tp/Texinfo/Common.pm
diff --git a/Pod-Simple-Texinfo/pod2texi.pl b/Pod-Simple-Texinfo/pod2texi.pl
index 7c93c4b6dd..03d578943e 100755
--- a/Pod-Simple-Texinfo/pod2texi.pl
+++ b/Pod-Simple-Texinfo/pod2texi.pl
@@ -454,21 +454,24 @@ if ($base_level > 0) {
$outfile_name =~ s/\.te?x(i|info)?$//;
$outfile_name .= '.info';
+ my $preamble_result;
+
if (! defined ($preamble)) {
- $preamble = '\input texinfo
+ $preamble_result = '\input texinfo
@setfilename ' . Pod::Simple::Texinfo::_protect_text($outfile_name) . "
-\@documentencoding utf-8
\@settitle $top
\@contents
-\@ifnottex
\@node Top
-\@top $top
-\@end ifnottex\n\n";
+\@top $top\n\n";
+ } elsif ($preamble eq '-') {
+ $preamble_result = join("", <STDIN>);
+ } else {
+ $preamble_result = $preamble;
}
- print $fh $preamble;
+ print $fh $preamble_result;
if ($section_nodes) {
#print STDERR "\@node Top\n\@top top\n".$full_manual;
my $menu = _do_top_node_menu("\@node Top\n\@top top\n".$full_manual);
@@ -566,9 +569,9 @@ Ordinarily, it's good to keep the sectioning hierarchy
intact.
=item B<--preamble>=I<STR>
-Insert I<STR> as top boilerplate before includes. The default is a
-minimal beginning for a Texinfo document, and sets C<@documentencoding>
-to C<utf-8> (because the output is written that way).
+Insert I<STR> as top boilerplate before includes. If I<STR> is set to
+C<->, read the top boilerplate from the standard input. The default
+top boilerplate is a minimal beginning for a Texinfo document.
=item B<--subdir>=I<NAME>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * Pod-Simple-Texinfo/pod2texi.pl: allow - as --preamble argument to read the preamble from stdin.,
Patrice Dumas <=