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 MyProject.hnd
:
hnd6.exe MyProject.hnd build
The 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"
Note: The-verysilent
command 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.
See also...
Mastering Content Updates with HelpNDoc's Search and Replace Tools for Technical Writers
Are you tired of the constant struggle to keep documentation consistent, up-to-date, and error-free? For technical writers and content authors, managing these challenges can be a daunting task. …
Read More →Transform Your Classroom with HelpNDoc: The Ultimate Back-to-School Tool for Teachers and Students
As the back-to-school season approaches, educators and students are on the lookout for tools that can simplify content creation, improve collaboration, and enhance the overall learning experience. One …
Read More →How to Customize the Initial Position and Size of CHM Help Files
Creating CHM (Compiled HTML Help) files with HelpNDoc is a breeze, thanks to its user-friendly interface and powerful features. In this article we’ll look into the specifics of how you can set the …
Read More →Balancing Security and Usability: Best Documentation Formats for Internal Sharing
Sharing documentation effectively and securely is critical in the modern workplace. Whether you’re distributing internal manuals, project documentation, or company policies, the HelpNDoc help …
Read More →