Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
7

Index - any scripts to automate tagging?

Community Beginner ,
Feb 27, 2024 Feb 27, 2024

Hi all,

I've been working on indexing several documents, and am trying to find out if there are any scripts or other methods out there to automate the process. It would be so much easier if you could give InDesign a full list of terms and it will automatically tag them for the index, rather than finding and tagging each manually.

I did find a few scripts but they seem to be for much older versions.

I don't know anything about creating scripts myself.

Any leads/advice welcome! thanks!

TOPICS
Scripting
940
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 27, 2024 Feb 27, 2024

This eschews the normal index feature, but will generate an index from a word list

 

https://creativepro.com/files/kahrel/indesign/index_from_wordlist.html

Translate
Community Expert ,
Feb 27, 2024 Feb 27, 2024
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 27, 2024 Feb 27, 2024

so, from the sounds of it, there's no simple solution?
Or, you can add the terms, but still have to run the "add all" for each term separately?

Note that I need to work with the InDesign index generator so that all the links and such will work for ebooks/ehanced PDF.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2024 Feb 27, 2024

Do you work on Mac or a PC? 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2024 Feb 27, 2024

This eschews the normal index feature, but will generate an index from a word list

 

https://creativepro.com/files/kahrel/indesign/index_from_wordlist.html

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 27, 2024 Feb 27, 2024

Yes, I've seen this.
Again, I need to make sure the index terms are properly linked to the terms throughout the document, so this wouldn't work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2024 Feb 27, 2024

@brian_p_dts, @P28476046v7uw 

 

But @Peter Kahrel's script is adding topics and references using built-in Index mechanism?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2024 Feb 27, 2024

No it doesn't. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 28, 2024 Feb 28, 2024
quote

No it doesn't. 


By brian_p_dts

 

I'm sorry, but have you seen the code? 

 

Or my understanding of JavaScript is so bad?

 

... 

new_topic = docs[i].indexes[0].topics.add (word_list[j]);

... 

new_topic.pageReferences.add (found[k], PageReferenceType.currentPage);

... 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 28, 2024 Feb 28, 2024
LATEST

Ah, had been a while since I actually used it. I thought it eschewed it. Or I may be thinking of another one of his. My bad.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 27, 2024 Feb 27, 2024

I tried out the script, and it does indeed work! Yay!
Unfortunately it wipes out any exisitng index tagging so won't work on this particular project, but will on any that I'm starting an index from scratch.

So, solved! Thanks a bunch

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 28, 2024 Feb 28, 2024

@P28476046v7uw

 

You need to change to "false" this:

 

// Replace index?

 var replace_index = true ;

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines