Preventing temp dir from being deleted after command line webhelp build

Post here questions and problems related to editing and publishing DITA content.
bhunter90
Posts: 2
Joined: Wed Jan 12, 2022 11:17 am

Preventing temp dir from being deleted after command line webhelp build

Post by bhunter90 »

I have viewed the topic: topic5181.html, however it seems to deal with transforms within the client.

I am running webhelp transforms on a server through the command line. I first tried passing my own params, but that did not work. I tested editing the param in the build_dita.xml file directly, but my temp folder is still deleted after each run. I am specifying a temp folder in the same location as the output folder.

Are there extra steps for enabling the persistence of the temp folder for the server webhelp? Thanks!
Radu
Posts: 9436
Joined: Fri Jul 09, 2004 5:18 pm

Re: Preventing temp dir from being deleted after command line webhelp build

Post by Radu »

Hi,

First please specify the temporary files folder in a different location that the output folder, otherwise you may end up with the publishing engine accidentally deleting useful resources when it cleans the temp folder at the end.

For what you want there is a clean.temp transformation parameter:

https://www.dita-ot.org/dev/parameters/ ... clean.temp

So if you are using the "dita" command line script, you would need to do something like:

Code: Select all

dita -i "...path/to/ditamap" -clean.temp=no ....
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bhunter90
Posts: 2
Joined: Wed Jan 12, 2022 11:17 am

Re: Preventing temp dir from being deleted after command line webhelp build

Post by bhunter90 »

Thank you, Radu! I am not sure which change was what did it, but re-specifying to a new temp output location and changing my command line arguments worked. I did have to add another dash before the argument:

Code: Select all

... --clean.temp=no ... 
Not sure why it didn't work with just one, but all my args have two so maybe it's a mac thing or something. Thanks again, really appreciate it!!!
Radu
Posts: 9436
Joined: Fri Jul 09, 2004 5:18 pm

Re: Preventing temp dir from being deleted after command line webhelp build

Post by Radu »

Hi,
Great, I'm glad this works for you.
You are probably right about the "--", I'm alternating between Mac and Windows and I think on Windows I can use only one "-".

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply