idxsorter

Name

idxsorter -- Sort and merge indexes

Synopsis

idxsorter [-hklw] [-m {h | c | p}] [-o OUTFILE] [-p {p | b | i | bi}...] [-s {h | c | p}] [--hide-keys] [--show-keys] [--letter-by-letter] [--merge= {h | c | p}] [--ouput=OUTFILE] [--page-order= {p | b | i | bi}...] [--separate= {h | c | p}] [--word-by-word] [--help] [--version] [FILE...]

Description

idxsorter is a command line program for sorting and merging indexes.

The sorted index is written to standard output. Multiple input indexes are merged in a single index.

idxsort provides an easier to use interface to idxsorter.

Options

--hide-keys, -h

Don't output the keys used for every entry. Opposite of --show-keys.

--show-keys, -k

Output the keys used for every entry. The keys are enclosed in {|{ y}} and are appended to every entry (including cross references).

--letter-by-letter, -l

Sorts entries in letter-by-letter order.

--merge=CHARS, -m CHARS

Opposite of --separate.

--output=OUTFILE, -o OUTFILE

Output is written to OUTFILE instead of standard output.

--page-order=CODE, -p CODE

Specifies the order in which different types of page references should be sorted. The option can be given multiple times with the order in which each option is encountered giving the sort order.

Valid CODEs (in their default order) are: p - Plain page range; b - Bold page range; i - Italic page range; bi - Bold-italic page range.

If this option is not given for a particular type of page reference then that type will be sorted after all the ones which have been specified.

--separate=CHARS, -s CHARS

Specifies that idxsorter is not to merge certain items depending on the characters in CHARS: h - don't merge entries with the same keys; c - don't ignore cross references with identical keys; p - don't merge overlapping page ranges.

--word-by-word, -w

Sorts entries in word-by-word order.

--help

Output brief help information.

--version

Display version information.

Example

idxsorter --output=example.sorted.idx -p b -p i -p p --example.idx

Sorts the index "example.idx" using the keys in "example.key". The output is written to "example.sorted.idx". Bold page ranges are sorted before italic ones which come before plain page ranges.

Notes

The output file can be the same as an input file (eg. idxsorter -o eg.idx eg.idx). It is recommended that a copy is made of the original first.