Find the links that occur more than once in any DITA topic file. A link might have been inserted manually as an
related-links tag, or generated automatically during the DITA build through the
collection type attribute or a
For any specified directory, this script checks all of the links in a DITA files and maps. It identifies cross-references that occur more than once, and reports them.
Relationship tables, topicref collections, inline cross-references, and links in the related-links tag are all reckoned.
Download and install Python 2.7.5. Later versions of Python should also work.
- Download this repository as a
.zipfile, extract the contents to any folder, and double-click
- When prompted, enter the full path of the folder that contains the DITA files and maps, for example,
c:\documentation\MyProduct\. The script will scan all of the subfolders of the specified folder.
- When the checking is complete, you see a message on the console:
Press any key to exit.Press any key.
- Go to the folder where the script resides. You see a file called
RepeatedLinks.html. This is the report file for you to read and act upon.
It is assumed that all DITA topic files have the
.dita extension and all DITA map files have the
.ditamap extension. If your files use the
.xml extension, this script will not work in its present form.
Bugs and enhancements
Use GitHub's issue tracking feature.
The script is under GPL 3, which is a copyleft licence. You are free to use and distribute this code as-is. You are also free to modify and distribute this code provided you distribute such modified code in its entirety under the same licence as this one, that is GPL 3.