Documentation Center

IPublishPostProcessPlugin - DitaDeliveryCompressPackages

Compresses the pre-created packages for Dynamic Delivery and moves the compressed files to the ZIP subfolder of the transport package folder.

Plugin Input

Input expected in the context.Items collection
Item KeyRequiredDefault valueItem Value TypeDescription
TransportPackageDirectoriesNoEmpty listList<String>The list with full directory path for every directory that needs to be zipped.
TransportPackageRootDirectoryYesStringThe full directory name of the TP folder.

Plugin Outcome

Changes made to the file system:
  • Zip files are created in the ZIP folder under the TP folder (e.g. C:\InfoShare\Data\Publish\Data\2r1yonuwcoe\work\TP\ZIP). The file names are obtained from the package ids after removing all characters not allowed in the filename and adding a unique timestamp.
Values set in the context.Items collection as a result
Item KeyTypical ValueItem Value TypeDescription
CompressedPackagesFilePaths{ Data\Publish\Data\[RANDOMFOLDERNAME]\work\TP\ZIP\ish[PUBLICATIONOUTPUTID]-1-66560-[POSTPROCESSTIMESTAMP].zip, Data\Publish\Data\[RANDOMFOLDERNAME]\work\TP\ZIP\ish[PUBLICATIONOUTPUTID]-2-66560-[POSTPROCESSTIMESTAMP].zip, Data\Publish\Data\[RANDOMFOLDERNAME]\work\TP\ZIP\ish[PUBLICATIONOUTPUTID]-3-66560-[POSTPROCESSTIMESTAMP].zip, Data\Publish\Data\[RANDOMFOLDERNAME]\work\TP\ZIP\ish[PUBLICATIONOUTPUTID]-4-66560-[POSTPROCESSTIMESTAMP].zip,...}List<String>The list with full file path for every compressed file created.

plugin name="ISHDITADELIVERYCOMPRESSPACKAGES" example


<plugin name="ISHDITADELIVERYCOMPRESSPACKAGES" handler="DitaDeliveryCompressPackages">
  <description>Zips every package created by DitaDeliveryPrepareOverallPackage and puts the resulting zip files in a TP\Zips folder</description>
  <initialize>
	<parameters />
  </initialize>
</plugin>		

Plugin flow

DitaDeliveryCompressPackages does the following:
  • Creates a ZIP folder under the folder provided in the Items collection of the context with the key TransportPackageRootDirectory .
  • For every directory provided in the Items collection of the context with the key TransportPackageDirectories creates a zip file.
  • Stores the resulted zip file in the new ZIP folder.
  • The name of the zip file is the package id with all characters that are not allowed for the file name removed + a unique timestamp.
  • Binaries are added to the zip files without compression.