wwtdatatool wtml merge
¶
The merge
subcommand takes one or more input WTML files and combines
their contents into a new file, rewriting any relative URLs to respect the
folder structure of the input files.
Usage¶
wwtdatatool wtml merge {INPUT-WTMLS...} {OUTPUT-WTML}
The
INPUT-WTMLS
argument is the path to one or more input WTML files that may contain relative URLs for some of their data references.The
OUTPUT-WTML
argument is the path where the merged output WTML file will be written.
Example¶
In typical usage, you might have several index.wtml
or index_rel.wtml
files for a group of images that you wish to into a combined collection. If each
of your imagesets is located in a sub-folder, you might run a command such as:
wwtdatatool wtml merge \
image1/index_rel.wtml \
image2/index_rel.wtml \
image3/index_rel.wtml \
index_rel.wtml
Each input WTML file will have its outermost folder entry “unwrapped” and merged
into the output. For instance, if image1/index_rel.wtml
contains a single
imageset named “global”, image2/index_rel.wtml
contains a single Place named
“highlight”, and image3/index_rel.wtml
contains three Places named “site1”,
“site2”, and “site3”, the merged index_rel.wtml
folder will contain five
items: “global”, “highlight”, “site1”, “site2”, and “site3”.
If the input file image1/index_rel.wtml
references a relative URL path
./thumb.jpg
, in the output file the URL path will be rewritten to have the
form image1/thumb.jpg
. This URL structure is determined from the layout of
the input WTML files on disk, and not on their logical folder structure. For
instance, if you have inputs configured to run a command such as this:
wwtdatatool wtml merge folder1/index.wtml folder2/output.wtml
The relative URLs in folder2/output.wtml
will be rewritten to start with
../folder1/
.