Standard output when publishing from the command line

This section is for programmers. Please use it for all discussons on interfacing help with your applications and related subjects.

Moderators: Alexander Halser, Michael Schwarzl

Post Reply
Roman Turcanu
Posts: 13
Joined: Tue Jul 22, 2014 9:57 am

Standard output when publishing from the command line

Unread post by Roman Turcanu » Wed Jul 15, 2020 8:50 am

I've just upgraded to Help&Manual 8.1.0 Build 5536. This question is about publishing Help&Manual projects from the command line. When running a Windows batch script, I need to be able to redirect the output to a log file AND also show it at the command line in the standard output. With HM8, I noticed that the standard output is no longer shown if option /L is set (which was the case in HM7). I have tried using both /stdout and /L according to your documentation but the output is still not shown at the command line, only written to the log. Is this possible at all?

User avatar
Tim Green
Site Admin
Posts: 21747
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Standard output when publishing from the command line

Unread post by Tim Green » Wed Jul 15, 2020 10:58 am

Hi Roman,

I think the command line display was disabled in HM8 when log output is active specifically because many customers wanted a completely silent option when writing to the log. I will check this with our developers.
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
Alexander Halser
EC-Software Support
Posts: 3994
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Standard output when publishing from the command line

Unread post by Alexander Halser » Wed Jul 15, 2020 11:18 am

That hasn't changed between version 7 and 8: the resulting output is either console or log file but not both. In fact, the console output (STDOUT) is redirected to a log file. There is no double reporting for command line compilation. What do you need the console output for?
Alexander Halser
Senior Software Architect, EC Software GmbH

Roman Turcanu
Posts: 13
Joined: Tue Jul 22, 2014 9:57 am

Re: Standard output when publishing from the command line

Unread post by Roman Turcanu » Wed Jul 15, 2020 12:21 pm

Just for clarification, in HM 7, the following line (from a Windows batch script) was creating a log file and was also showing the standard output. But this is no longer the case in HM8:

Code: Select all

"C:\Program Files (x86)\EC Software\HelpAndManual7\HelpMan.exe" "C:\Projects\SomeProject.hmxp" /PDF=C:\DocOutput\SomeProject.pdf /I=PDF /V=..\..\Variables\Variables.txt /Template=..\..\Templates\PDF\Standard.mnl /L=C:\_Logs\SomeProject_PDF.log
What do you need the console output for?
Some of our scripts compile more than 20 outputs (like the line above) in a single run and take a long time... Whenever I run such a script on demand, I would like to have an idea about the current progress, errors, and so on, instead of staring at a blank command line for 20-30 min. And I also run exactly the same scripts in a fully unattended way periodically (not just on demand), which is why I also need the log.

I could of course maintain two different sets of scripts, but I wanted to avoid that. If the /stdout and /L options are mutually exclusive, it would be great if you updated the documentation to state that explicitly.

Tim Frost
Posts: 271
Joined: Mon Nov 22, 2004 11:45 pm

Re: Standard output when publishing from the command line

Unread post by Tim Frost » Wed Jul 15, 2020 12:38 pm

You may be able to use a program with a 'tail' option to open the log and view it as it is being written. The free Notepad++ can do this: see "Monitor" at the foot of the view menu.

Another solution might be to run the build from Powershell instead of a command window; this has a tee command (as in Unix) which will put the standard output to a file as well as displaying it.

Roman Turcanu
Posts: 13
Joined: Tue Jul 22, 2014 9:57 am

Re: Standard output when publishing from the command line

Unread post by Roman Turcanu » Wed Jul 15, 2020 1:51 pm

@Tim Frost: Thank you, I'll investigate that.

Post Reply