..
/
download
.\" Automatically generated by Pandoc 2.9.2.1
.\"
.TH "s1kd-flatten" "1" "2021-07-06" "" "s1kd-tools"
.hy
.SH NAME
.PP
s1kd-flatten - Flatten a publication module for publishing
.SH SYNOPSIS
.IP
.nf
\f[C]
s1kd-flatten [-d <dir>] [-I <path>] [-cDfimNPpqRruvx] <PM> [<DM>...]
\f[R]
.fi
.SH DESCRIPTION
.PP
The \f[I]s1kd-flatten\f[R] tool combines a publication module and the
data modules it references in to a single file for use with a publishing
system.
.PP
Data modules are by default searched for in the current directory using
the data module code, language and/or issue info provided in each
reference.
.SH OPTIONS
.TP
-c, --containers
Flatten referenced container data modules by copying the references
inside the container directly in to the publication module.
The copied references will also be flattened, unless the -m option is
specified.
.TP
-D, --remove
Remove unresolved references.
.TP
-d, --dir <dir>
Directory to start search in.
By default, the current directory is used.
.TP
-f, --overwrite
Overwrite input publication module instead of writing to stdout.
.TP
-h, -?, --help
Show help/usage message.
.TP
-I, --include <path>
Add <path> to the list of directories that the tool will search when
resolving references.
.TP
-i, --ignore-issue
Always match the latest issue of an object found, regardless of the
issue specified in the reference.
.TP
-l, --list
Treat input (stdin or arguments) as lists of CSDB objects, rather than
CSDB objects themselves.
This option only applies to the simple \[dq]flat\[dq] format
(-p/--simple).
.TP
-m, --modify
Modify the references in the publication module without flattening them.
.TP
-N, --omit-issue
Assume that the files representing the referenced data modules do not
include the issue info in their filenames, i.e.
they were created using the -N option of the s1kd-new* tools.
.TP
-P, --only-pm-refs
Only flatten PM references, leaving DM references alone.
.TP
-p, --simple
Instead of the hierarchical PM-based format, use a simpler
\[dq]flat\[dq] format.
.TP
-q, --quiet
Quiet mode.
Errors are not printed.
.TP
-R, --recursively
Recursively flatten referenced publication modules, copying their
content in to the \[dq]master\[dq] publication module.
.TP
-r, --recursive
Search directories recursively.
.TP
-u, --unique
Remove duplicate references within the PM content.
.TP
-v, --verbose
Verbose output.
Specify multiple times to increase the verbosity.
.TP
-x, --use-xinclude
Use XInclude rather than copying each data module\[aq]s contents
directly inside the publication module.
DTD entities in data modules will only be carried over to the final
publication when using this option, otherwise they do not carry over
when copying the data module.
.TP
--version
Show version information.
.TP
<DM>...
When using the -p option, the filenames to include can be specified
manually as additional arguments instead of searching for them in the
current directory.
When not using the -p option, additional arguments are ignored.
.TP
<PM>
The publication module to flatten.
.PP
In addition, the following options allow configuration of the XML
parser:
.TP
--dtdload
Load the external DTD.
.TP
--huge
Remove any internal arbitrary parser limits.
.TP
--net
Allow network access to load external DTD and entities.
.TP
--noent
Resolve entities.
.TP
--parser-errors
Emit errors from parser.
.TP
--parser-warnings
Emit warnings from parser.
.TP
--xinclude
Do XInclude processing.
.TP
--xml-catalog <file>
Use an XML catalog when resolving entities.
Multiple catalogs may be loaded by specifying this option multiple
times.
.SH EXIT STATUS
.TP
0
No errors.
.TP
1
The publication module specified is malformed.
.TP
2
An encoding error occurred.
.SH EXAMPLE
.IP
.nf
\f[C]
$ s1kd-flatten -x PMC-EX-12345-00001-00_001-00_EN-CA.XML > Book.xml
\f[R]
.fi
.SH AUTHORS
khzae.net.
gopher://khzae.net/0/s1kd/s1kd-tools/src/tools/s1kd-flatten/doc/s1kd-flatten.1