Add page references to imported topics

You can import into a document the topics from another document:

import topics

This imports just the topics, though, not any page references. The script adds page references to all topics.

Strict matching

The script looks for the literal topic text: whole-word only, case-sensitive, a character-by-character match. That means that the topic Bas-Armagnac gets page references to Bas-Armagnac, not to armagnac, Armagnac, or bas-armagnac.

Case-sensitivity can be changed by modifying line 7 of the script so that it reads

var case_sensitive = false;

Terminal and non-terminal topics

By default, the script adds page references only to terminal topics. That is to say parent topics are ignored, so that of the topic dogs and its subtopics:

import topics

only the terminal topics Border and Highland are referenced:

import topics

If all intermediate topics and the main topic need to be referenced as well so that the result is as follows:

import topics

then you need to change a setting in the script. Open the script and go to line 6. Change true to false so that the line reads:

var terminals_only = false;

Unused topics

After finding adding page references to the topics, the script collects all topics for which it couldn't find any matches in the document and lists these unused topics in a new document.

Use

The script has no interface -- just run it.


Useful script? Saved you lots of time?

Consider making a donation. To make a donation, please press the button below. This is Paypal's payment system; you don't need a Paypal account to use it: you can use several types/brands of credit and debit card.

Peter Kahrel's paypal account

Show script (right click, Save Link/Target As to download)

Back to the main page on indexing

Back to the main script page

Installing and running scripts

Editing a script

Questions, comments? Get in touch