Using External Tools feature to call Zip utility for ditamap
Oxygen general issues.
-
- Posts: 30
- Joined: Fri Dec 10, 2010 9:43 pm
Using External Tools feature to call Zip utility for ditamap
Hello,
Would it be possible to call a command line zip utility via the External Tools menu item, and zip a ditamap and all reference files. If so, what would the syntax be? This is related to my topic5501 post.
Thanks,
John
Would it be possible to call a command line zip utility via the External Tools menu item, and zip a ditamap and all reference files. If so, what would the syntax be? This is related to my topic5501 post.
Thanks,
John
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Using External Tools feature to call Zip utility for ditamap
Hi John,
You can either install Apache ANT and invoke a "build.xml" file to pack the DITA Map project or use a free zip utility which has a command line version like:
http://www.7-zip.org/download.html
Regards,
Radu
You can either install Apache ANT and invoke a "build.xml" file to pack the DITA Map project or use a free zip utility which has a command line version like:
http://www.7-zip.org/download.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 30
- Joined: Fri Dec 10, 2010 9:43 pm
Re: Using External Tools feature to call Zip utility for ditamap
Hi Radu,
I would like to give the Ant solution a try since I have Ant installed. Would you be able to walk me through the build.xml file config and explain how to invoke it?
Thanks,
John
I would like to give the Ant solution a try since I have Ant installed. Would you be able to walk me through the build.xml file config and explain how to invoke it?
Thanks,
John
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Using External Tools feature to call Zip utility for ditamap
Hi John,
So on your disk you can create an ANT build file called build.xml with the following content:
Oxygen 12.2 will have support for creating generic ANT transformations but until then you can use the following workaround:
In the DITA Maps Manager view create a new DITA OT ANT transformation scenario for the current DITA Map (of any type).
In the Parameters tab add a new parameter ditaMap with the value ${cf}.
In the Advanced tab set the Custom build file value to point to your custom build.xml.
Run this transformation scenario each time you want to pack your DITA Map project.
Regards,
Radu
So on your disk you can create an ANT build file called build.xml with the following content:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="dist">
<target name="dist">
<dirname property="ditaProjectDir" file="${ditaMap}"/>
<zip basedir="${ditaProjectDir}" destfile="../ditaMapProject.zip"/>
</target>
</project>
In the DITA Maps Manager view create a new DITA OT ANT transformation scenario for the current DITA Map (of any type).
In the Parameters tab add a new parameter ditaMap with the value ${cf}.
In the Advanced tab set the Custom build file value to point to your custom build.xml.
Run this transformation scenario each time you want to pack your DITA Map project.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 30
- Joined: Fri Dec 10, 2010 9:43 pm
Re: Using External Tools feature to call Zip utility for ditamap
Thanks, Radu! I followed your instructions and got it to "generate" easily. One problem though: the whole project stucture is zipped whereas I would only need the ditamap hierarchy with referenced files zipped. I just want to zip the files that are used by the main ditamap. Is it possible to tweak the build.xml file to do this?
John
John
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Using External Tools feature to call Zip utility for ditamap
Dear John,
It's very hard to find all dependencies for a DITA Map Project (referenced topics, images, etc).
It's impossible to do this directly from the build file but maybe you could create some Java extension and call it from the build file. But it would take a lot of time to account for all references.
Regards,
Radu
It's very hard to find all dependencies for a DITA Map Project (referenced topics, images, etc).
It's impossible to do this directly from the build file but maybe you could create some Java extension and call it from the build file. But it would take a lot of time to account for all references.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 30
- Joined: Fri Dec 10, 2010 9:43 pm
Re: Using External Tools feature to call Zip utility for ditamap
Thanks again, Radu!
I just found a DITA packager that does the job very nicely
It is a utility offered by Suite Solutions: http://www.suite-sol.com/pages/resource ... ility.html. It works perfectly! Well, almost perfectly. It would be nice to call it from Oxygen but not being able to do that is no big deal.
John
I just found a DITA packager that does the job very nicely

John
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Using External Tools feature to call Zip utility for ditamap
Hi John,
You can configure External Tools in the Oxygen Preferences but the utility you found does not seem to allow creating the ZIP based on parameters sent from the command line.
Regards,
Radu
You can configure External Tools in the Oxygen Preferences but the utility you found does not seem to allow creating the ZIP based on parameters sent from the command line.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service