Hi there,
There will definitely be a way to achieve what you want to do. As somebody that is unfamiliar with Flare, I will give you a couple of tips to get you started:
- Each output/buildable document is defined by a Flare target (*.fltar)
- Targets contain a link to a Flare TOC - table of contents file (*.fltoc). The TOC contains the list of actual topics that will be included in the generated document.
- Targets also allow you to define the glossary file (*.flglo) and whether a glossary will be auto-generated.
All of the aforementioned files are XML, so they are easy to evaluate and generate on the fly programatically. Based on your description above, there are two ways you could achieve this (I'd recommend the latter if you have an automatic build):
- Interactive via a standalone tool or Flare plug-in
- As a part of the automated build
If I were to do this from scratch, I would create a tool that allows you to pass in the name of the Flare target as a parameter. The tool would then be configured to run before the target is built. When run the tool would:
- Evaluate the Target file to extract the:
- Name of the TOC file.
- Name of the glossary file
- Any conditions applied to the target that would exclude content from being built
- The tool would then evaluate the TOC file to obtain a list of topics to evaluate (excluding any that have been conditioned out.
- The tool would then evaluate each individual topic (again excluding any xml elements that have been conditioned out). From here, you can search for whatever it is that you specifically use to define whether a glossary item should be included or excluded.
- Finally, recreate the *.flglo file to contain the glossary entries that you want to show for this particular target.
- Build the Flare target. The glossary that you created should appear in the output that you have built.
A couple of other things to be aware of:
- Not all Flare targets define a TOC. If a TOC is not defined, the Primary TOC will be used. The primary TOC used to be contained within the Flare project file (*.flprj) but it doesn't appear to be there in my projects. Perhaps somebody else can point out where this information can be obtained.
- The Analyzer folder contains a SQLite database file. Depending on how you define what should be included in the glossary, you may be able to query this database, rather than the individual topic files.
I hope this helps. Feel free to ask any additional questions that you may have.
"In an ideal world, software should be simple, well designed, and completely intuitive to end users. In the real world, good documentation is king."