Topics

Create ZIPs of output


Nicholas Mucks
 

Hello!

Has anyone created zip outputs from DITA-OT plugins? I’d like to create X number of zip files of a normalized DITA package based on a runtime parameter value. I’m currently doing this in a script after the DITA-OT, but it would be cool to bake this logic into the transform.

Thanks for any suggestions!

Take care,
- Nick

Sent from mobile


Aliza Merzel
 

Hi,

 

You can create your own transtype, which calls (for example) html5 or pdf and afterwards has a target that zips up the output.

 

<target name="create.zip">
       
<zip file="${output.dir}/bundle.zip">
           
<zipfileset dir="${output.dir}">
               
<include name=”*.*"/>
           
</zipfileset>

       
</zip>
   
</target>

 

 

Aliza

 

 

Aliza Merzel

Senior Developer and XML Specialist

Phone: +972 8-976-0323

Email: alizam@...

 

Connect with us:  twitter.png   linked-in.png  youtube.png

 

Logo-for-email-signatures - smaller

 

From: main@dita-users.groups.io [mailto:main@dita-users.groups.io] On Behalf Of Nicholas Mucks via groups.io
Sent: Monday, December 28, 2020 8:16 PM
To: dita-users@groups.io
Subject: [dita-users] Create ZIPs of output

 

Hello!

 

Has anyone created zip outputs from DITA-OT plugins? I’d like to create X number of zip files of a normalized DITA package based on a runtime parameter value. I’m currently doing this in a script after the DITA-OT, but it would be cool to bake this logic into the transform.

 

Thanks for any suggestions!

 

Take care,

- Nick

 

Sent from mobile


Nicholas Mucks
 

Hi Aliza,
Wow — beautiful. Thanks a lot.  Works fine!

Take care,
- Nick

Sent from mobile

On Dec 28, 2020, at 10:30 AM, Aliza Merzel <alizam@...> wrote:



Hi,

 

You can create your own transtype, which calls (for example) html5 or pdf and afterwards has a target that zips up the output.

 

<target name="create.zip">
       
<zip file="${output.dir}/bundle.zip">
           
<zipfileset dir="${output.dir}">
               
<include name=”*.*"/>
           
</zipfileset>

       
</zip>
   
</target>

 

 

Aliza

 

 

Aliza Merzel

Senior Developer and XML Specialist

Phone: +972 8-976-0323

Email: alizam@...

 

Connect with us:  

   
<image002.jpg>
  
<image003.png>

 

<image004.png>

 

From: main@dita-users.groups.io [mailto:main@dita-users.groups.io] On Behalf Of Nicholas Mucks via groups.io
Sent: Monday, December 28, 2020 8:16 PM
To: dita-users@groups.io
Subject: [dita-users] Create ZIPs of output

 

Hello!

 

Has anyone created zip outputs from DITA-OT plugins? I’d like to create X number of zip files of a normalized DITA package based on a runtime parameter value. I’m currently doing this in a script after the DITA-OT, but it would be cool to bake this logic into the transform.

 

Thanks for any suggestions!

 

Take care,

- Nick

 

Sent from mobile