Command-line option for generating help context file
Moderators: Alexander Halser, Tim Green
Command-line option for generating help context file
The ability to carry out the functions of the Tools/Help Context Tool menu entry via command line switches would allow the entire project to be produced from a batch file. At present this step needs to be carried out manually.
Re: Command-line option for generating help context file
12 years later, a quiet nudge for this feature, please.
It has occurred to me that it might be possible to write a tool to perform this so I have done this. It's a batch file and while it's reasonably elegant (for a batch file, anyway), it only produces a file suitable for use with my toolchain (Delphi) and a solution based on a tool built into H&M would be much cleaner.
It has occurred to me that it might be possible to write a tool to perform this so I have done this. It's a batch file and while it's reasonably elegant (for a batch file, anyway), it only produces a file suitable for use with my toolchain (Delphi) and a solution based on a tool built into H&M would be much cleaner.
- Tim Green
- Site Admin
- Posts: 23181
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Command-line option for generating help context file
Hi Ross,
Thanks for the suggestion, I've passed it on to the development team. One question: Are you using this for CHM files or also for something else? I ask because CHM is clearly going the way of WinHelp and the Dodo; it's future is anything but bright...
Thanks for the suggestion, I've passed it on to the development team. One question: Are you using this for CHM files or also for something else? I ask because CHM is clearly going the way of WinHelp and the Dodo; it's future is anything but bright...
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Re: Command-line option for generating help context file
Hi Tim,
I'm using one source to produce CHM, PDF and HTML.
I think that every time they "improve" windows help it gets worse. The biggest disaster (not really MS's fault, this one) was when Embarcadero/Codegear/whatever they were called that month - used the MS document explorer to host the Delphi 2007 help. It was a disaster. Luckily they released a CHM version of it later on.
I'm using one source to produce CHM, PDF and HTML.
I think that every time they "improve" windows help it gets worse. The biggest disaster (not really MS's fault, this one) was when Embarcadero/Codegear/whatever they were called that month - used the MS document explorer to host the Delphi 2007 help. It was a disaster. Luckily they released a CHM version of it later on.
- Tim Green
- Site Admin
- Posts: 23181
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Re: Command-line option for generating help context file
rossmcm wrote:I'm using one source to produce CHM, PDF and HTML.
OK, but are you using the context tool output for all those formats or just for CHM?
Although Windows itself really has got a lot better, the state of Microsoft's help systems is still, shall we say, somewhat sub-optimal...I think that every time they "improve" windows help it gets worse.
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.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Re: Command-line option for generating help context file
Ah, OK. I export the help context numbers and produce a .INC file with const declarations. Those are used for context-sensitive CHM help in the Delphi app, so yes, just for CHM.OK, but are you using the context tool output for all those formats or just for CHM?
- Alexander Halser
- EC-Software Support
- Posts: 4101
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Re: Command-line option for generating help context file
Hi Ross,
If you produce the help project from a batch file, why not include the help context numbers directly into the project XML? I don't really see what a command line option for the help context tool could do here.
The help context list is stored in the .HMXP file. You find it in:
If you produce the help project from a batch file, why not include the help context numbers directly into the project XML? I don't really see what a command line option for the help context tool could do here.
The help context list is stored in the .HMXP file. You find it in:
Code: Select all
<helpproject>
<config>
<helpcontext-numbers>
<helpcontext-number href=topicid value=number>
Example from "HELPMAN.HMXP":
<helpcontext-numbers>
<helpcontext-number href="HM_Advanced" value="7240"/>
<helpcontext-number href="HM_Advanced_Baggage" value="7930"/>
<helpcontext-number href="HM_Advanced_Baggage_DeleteRename" value="7960"/>
<helpcontext-number href="HM_Advanced_Baggage_Editing" value="11161"/>
<helpcontext-number href="HM_Advanced_Baggage_External" value="7940"/>
<helpcontext-number href="HM_Advanced_Baggage_Handling" value="7970"/>
<helpcontext-number href="HM_Advanced_Baggage_Uses" value="11081"/>
<helpcontext-number href="HM_Advanced_CommandLine" value="7860"/>
</helpcontext-numbers>
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
Re: Command-line option for generating help context file
Yup, that's pretty much how I'm doing it via my klunky batch file. Given a project name, I:
- find <project>.hmxz
- extract project.hmxp from it
- use grep on project.hmxp to get all lines matching the regexp "helpcontext\-number\ href\=.*value\=" to file <project>.inc
- use FART (wonderful utility!) to change lines in file <project>.inc from:
<helpcontext-number href="Accuracy_and_Resolution" value="904200"/>
to
const HELP_Accuracy_and_Resolution = 904200 ;