—#!/usr/bin/perl
# PODNAME: docmake
use
strict;
use
warnings;
use
App::Docmake ();
exit
( App::Docmake->new( {
argv
=> [
@ARGV
] } )->run() );
__END__
=pod
=encoding UTF-8
=head1 NAME
docmake - a tool to render DocBook/XML into various output formats.
=head1 VERSION
version 0.1101
=head1 SYNOPSIS
# To render input.xml file into XHTML
docmake --ns -o output.xhtml xhtml input.xml
# Same with more verbose output
docmake -v ---ns o output.xhtml xhtml input.xml
# Avoid trailing slash when emitting to a dummy file in a dir
docmake ---ns -trailing-slash=0 -o output/index.xhtml xhtml5 input.xml
# Render into pdf
docmake -v --ns -o output.pdf pdf input.xml
# Same while not rebuilding if not necessary
docmake -v --ns --make -o output.pdf pdf input.xml
# Render using a Stylesheet
docmake -v --ns -o output.xhtml -x my-stylesheets.xsl xhtml input.xml
=head1 DESCRIPTION
B<docmake> is a tool to render DocBook/XML into its resultant formats
using XSLT: XHTML, XSL-FO, PDF, RTF, etc. For a brief help type
C<docmake help> .
It aims to be a replacement for xmlto -
L<http://cyberelk.net/tim/software/xmlto/> . As opposed to xmlto,
it is written in Perl, which is easier to get right than xmlto's Bash, and
xmlto hasn't been updated for a long time when I started work on docmake.
=head1 USAGE
The basic invocation of docmake is:
docmake [flags] MODE input.xml
=head2 MODES
The available modes are:
=over 4
=item * help
To get help.
=item * fo
Convert to XSL-FO.
=item * manpages
Convert to Unix man pages.
=item * rtf
Convert to Word/RTF.
=item * xhtml
Convert to XHTML.
=item * xhtml-1_1
Convert to XHTML-1.1.
=item * xhtml5
Convert to XHTML5.
=item * pdf
Convert to PDF.
=back
=head2 FLAGS
The available flags are:
=over 4
=item * -h ; --help
Display some rudimentary help.
=item * --man
Display the man page.
=item * -v ; --verbose
Verbose - output the commands' invocation as they are executed.
=item * --ns
Use the DocBook xsl-ns ( namespaces ) URLs.
Verbose - output the commands' invocation as they are executed.
=item * -o OUTPUT_PATH
Put the result in B<OUTPUT_PATH> .
=item * -x STYLESHEET ; --stylesheet STYLESHEET
Use the XSLT stylesheet B<STYLESHEET> for performing XSLT transformations.
=item * --basepath PATH
This is the base path for the DocBook stylesheets. The appropriate XSLT mode
will be appended to it. This is for example, useful for building DocBook 5
documents by specifying the path to their stylesheets.
=item * --stringparam KEY=VALUE
Specify the string parameter of B<KEY> as B<VALUE>. Note that as opposed to
xsltproc, B<KEY> and B<VALUE> cannot be specified as different command line
arguments, but rather should be on the same one, delimited by an equal sign ("C<=>").
=item * --trailing-slash=0
Disable adding a trailing slash when building into an HTML file, to emit
an unneeded file there. B<Note> the C<=0> argument.
=item * --make
Behave like make in building files only if their dependencies are newer.
=back
=head2 EXAMPLES
There are some examples for sample invocation in the Synopsis.
=head1 SEE ALSO
=over 4
=item * DocBook on the Wikipedia - L<http://en.wikipedia.org/wiki/DocBook>
=item * DocBook/XSL - The Complete Guide - L<http://www.sagehill.net/docbookxsl/>
=item * The DocBook Homepage - L<http://www.docbook.org/>
=item * xmlto - L<http://cyberelk.net/tim/software/xmlto/>
=back
=head1 COPYRIGHT & LICENSE
Copyright 2008 Shlomi Fish, all rights reserved.
This program is released under the following license: MIT/X11 License.
=head1 AUTHOR
Shlomi Fish , L<http://www.shlomifish.org/> .
=for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
=head1 SUPPORT
=head2 Websites
The following websites have more information about this module, and may be of help to you. As always,
in addition to those websites please use your favorite search engine to discover more resources.
=over 4
=item *
MetaCPAN
A modern, open-source CPAN search engine, useful to view POD in HTML format.
=item *
RT: CPAN's Bug Tracker
The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.
=item *
CPANTS
The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.
=item *
CPAN Testers
The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.
=item *
CPAN Testers Matrix
The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.
=item *
CPAN Testers Dependencies
The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.
=back
=head2 Bugs / Feature Requests
Please report any bugs or feature requests by email to C<bug-app-xml-docbook-builder at rt.cpan.org>, or through
the web interface at L<https://rt.cpan.org/Public/Bug/Report.html?Queue=App-XML-DocBook-Builder>. You will be automatically notified of any
progress on the request by the system.
=head2 Source Code
The code is open to the world, and available for you to hack on. Please feel free to browse it and play
with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull
from your repository :)
git clone git://github.com/shlomif/docmake.git
=head1 AUTHOR
Shlomi Fish <shlomif@cpan.org>
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2024 by Shlomi Fish.
This is free software, licensed under:
The MIT (X11) License
=cut