In my master Flare project, I like to include PDF-versions of the webhelp targets, so that users can either download the PDF, or read the online help. It’s all built from the same TOC.
To keep this up-to-date, the PDFs are built and published to a network folder, and then re-imported to the Flare project using External Resources.
The problem is that to make sure the PDF and the webhelp are both up-to-date, I need to follow this process:
- Rebuild and publish the PDF.
- Re-import the PDF using External Resources.
- Rebuild and publish the webhelp target.
Steps 1 and 3 I can handle using batch builds, but step number 2 is a manual process. A solution could be to set up my batch job to use Robocopy to copy the external resources to my Flare project before I build it. This leaves me two options:
- Copy all files from the External Resources to the local project
- Maintain a list of files I need to copy, and pray that it never gets out of date.
Because the External Resources folder contains close to 2 Gb of files I don’t want to copy them all to my local project, and because I’m afraid the list would get out of date quickly, I found another solution.
The Flare project file (.flprj) contains an XML structure listing all the External Resources you have mapped to your project, so I could use that information to synchronize only the files that were mapped.
Said and done, here’s a script that looks at the XML of the Flare project file and copies any External Resource files that are newer than your local files.
Synchronize External Resources Automatically in MadCap FlareSynchronize External Resources Automatically in MadCap Flare To test the tool, you can just run the Exe, and it will prompt you to select the Flare project you’d like to synchronize (remember to check out the relevant files if you’re using source control).
If you’re satisfied with how it works, you can set it up to run in a batch file. The command line syntax is
Let me know if you have questions or comments! Ideas for improvement are always welcome 🙂