Style Repository Options via Command line?

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
itexnz
Posts: 137
Joined: Tue Jan 06, 2009 10:09 pm
Location: Wellington, New Zealand
Contact:

Style Repository Options via Command line?

Unread post by itexnz »

hi, I have a new requirement to output some DOCX files from projects which need to be in a formatted to a customers specification... I can do this easily enough by creating a Style repository - but I don't want their "styles" to apply to ALL of my outputs and taint all my nice PDFs etc with that stink LOL

There doesn't seem to be way for me to apply a Style Repository just to a particular publishing task or specify a command line argument in a batch file.

Currently I think I would have to manually link the offending style repository if I wanted to publish their stuff, and then relink to our way-better Style Repository before publishing our own.

It would be really really useful if it could be done a smarter way... I'm hoping I've just not spotted the solution.

Thoughts?
David Scott
Documentation Infrastructure Consultant
https://www.sourceone.co.nz
SourceOne. Documentation, engineered.
User avatar
Tim Green
Site Admin
Posts: 23178
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Style Repository Options via Command line?

Unread post by Tim Green »

Hi Itex,

Style repositories won't help you here because they are always live-linked to a project before publishing. What you want here is a skin that you can apply when publishing. You can only use skins directly from within Help & Manual, but you can apply styles from a skin if they are stored in it when you publish from the command line. Here are the steps you need to perform:
  1. Create all the styles you want to use in a project, making sure that all the names are exactly the same as the styles they will be replacing.
  2. Use Save As... in the File menu and save the project as a skin in the same folder as your project. In the dialog that is displayed asking what you want to include the skin SELECT the option for text and table styles and DESELECT everything else.
  3. Open an command prompt in Windows, switch to the folder containing your project, and publish from the command line using the following syntax:
"C:\Program Files (x86)\EC Software\HelpAndManual7\HELPMAN.EXE" ".\YourProject.hmxz" /DOCX=".\word_file_name.docx" /Template=".\WordTemplate.docx" /I=DOCX /O=".\StylesSkin.hmskin"

You can save this in a text file with the extension .cmd in the project folder and then publish by double-clicking on it. You can also include multiple lines in the file, to perform all the publishing tasks at the same time (one line for each output). See Command Line Publishing in the Publishing chapter in the Help & Manual help for more details.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
User avatar
itexnz
Posts: 137
Joined: Tue Jan 06, 2009 10:09 pm
Location: Wellington, New Zealand
Contact:

Re: Style Repository Options via Command line?

Unread post by itexnz »

Thanks for the great advice as always. I'll give that a go
David Scott
Documentation Infrastructure Consultant
https://www.sourceone.co.nz
SourceOne. Documentation, engineered.
Post Reply