Technical writers need to frequently build their documentation, user manual or help web-sites to be able to share them with team members or deliver them to end-users. This can be a time consuming process which require care and attention to make sure that the correct version is periodically built. Fortunately, the HelpNDoc help authoring tool can be automated to perform scheduled documentation generation. Let’s see how this can be done.
Using HelpNDoc’s command line interface
From a Command or PowerShell prompt, it is possible to automate HelpNDoc’s documentation generation process to produce any format supported by the help authoring tool.
HelpNDoc includes a very powerful command line interface, which can be used to generate any documentation format that it supports without any user interaction. As an example, the following command line generates every builds setup and activated in a project named
hnd6.exe MyProject.hnd build
build command line offers multiple options to control which documentation format to generate, specify which tags to apply, override variables… As an example, the following command line will only generate topics marked as
Complete (ready for public use) of the HTML documentation format:
hnd6.exe MyProject.hnd build -only="Build HTML documentation" -statuses="Build HTML documentation:Complete"
You can review HelpNDoc’s command line documentation to learn more about all possible options, and setup the proper command line for your specific requirements. Once done, we can move on and schedule a documentation generation task.
Automate documentation generation
Once the desired command line has been defined, we can create a scheduled task to periodically run it, and make sure that the generated documentation is always up to date.
There are multiple “Continuous Integration” tools or build systems available to run scheduled or triggered command lines. We’ll use Windows built-in “Task Scheduler” as an example to produce a new version of an HTML documentation daily. Here is how this can be done:
- Click the Windows logo in the task bar
- Start typing “Task Scheduler” and click it to run it
- In the “Action” menu, click “Create Basic Task…”
- Specify a “Name” and optionally a “Description”, click “Next”
- Select the desired “Trigger” (e.g. Daily), click “Next”
- Customize the trigger options such as start time, click “Next”
- Select the “Start a program” action, click “Next”
- Specify HelpNDoc’s full path in the “Program/script” field. Usually this is:
"C:\Program Files (x86)\IBE Software\HelpNDoc 6\hnd6.exe"
- In the “Add arguments” field, enter the rest of the previously defined command line. For example:
MyProject.hnd -verysilent build -only="Build HTML documentation" -statuses="Build HTML documentation:Complete"
-verysilentcommand line argument was added to avoid showing a command prompt when HelpNDoc runs
- Enter the full path of your HND project file in the “Start in” field. For example
C:\Documentation\. Click “Next”.
- Check, click “Finish”, and that’s it! The documentation generation task is now scheduled.
By leveraging HelpNDoc’s built-in command line interface, Windows’ task scheduler (or any other automated build system) can be used to easily and rapidly automate documentation generation. This can help technical writers save a lot of time and efforts to provide up-to-date documentation to end-users or team members.
- How to locate and fix broken hyperlinks in your user manuals, eBooks and help files
- Create a new HTML template to customize your online documentation projects
- Bulk edit the status of all topics in your documentation project
- How to migrate a custom template when a new version of HelpNDoc is released
- Automatically merge multiple topics from your documentation into a single one using a script