This tool is to rename scaffolds in the target genome so that the sequence names are less than 31 characters. Rename all scaffolds to scaffold_1, scaffold_2, ..., scaffold_N and also output a name mapping file.
Or truncate the scaffold names that are more than 31 characters and replace each invalid character (non-ASCII, '\t', '\n', '\x0b', '\x0c', '\r') with '_' and also output a name mapping file.