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

Creating index out of URLS

New Here ,
Jun 13, 2021 Jun 13, 2021

I need to create an index automatically generated with the urls which are in the text. e.g. "London" has the URL https://www.geonames.org/2643743/london.html. London has to be listed in the index. If  "Capital of England" has the url mentioned above assigned it has be also to be listed as London in the index. Thanks for your help.

TOPICS
Scripting
701
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 ,
Jun 14, 2021 Jun 14, 2021

Your description is not entirely clear. Please show how London and its URL occur in the text, and how they should appear in the index. Can a city have more than one URL? 

And 'If  "Capital of England" has the url mentioned above assigned it has be also to be listed as London in the index' -- A script doesn't know that London is the captal of England (it's the capital of the UK, in fact, but never mind that). So how is that relation made explicit in the text so that a script can work out these things?

 

Illustrate profusely.

 

P.

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
New Here ,
Jun 14, 2021 Jun 14, 2021

Sorry I' wasn't able to decribe it clearly. The URL https://www.geonames.org/2643743/london.html is assigned to the word "London" and "Londonium" in the text.

The sript has to regognise london out of the url. London has to appear in the index.

Thank you P.

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 ,
Jun 14, 2021 Jun 14, 2021

It's becoming a bit clearer. So you want to look for all hyperlinks with a URL destination, and create topics from the URL text sources, and insert an index marker at the text source.

 

All URLs? Only those that contain www.geonames?

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 ,
Jun 14, 2021 Jun 14, 2021

Ah, no, the topic name is extracted from the URL. And the script would capitalise the first letter. How about names that consist of more than one word (Greater Manchester, New York, etc.)? How are they represented in the URLs?

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
New Here ,
Jun 14, 2021 Jun 14, 2021

I've talk to my customer, the URLs will be a slightly different to make sure that all the people working on the publication use the same syntaxe. URLs will be assigned to Persons and Location in Word. It will work as follows: the URL assigned to the persone Georg. Fabricius will be C:\Users\Patrick\Documents\01_Jobs\13_Brandenburg_1717\02_Probekapitel\01_Words\Fabricus, Georg This means that Fabricius, Georg will appear in the index. In some other literatur Georges Fabrice will be mentioned in the text and he is the same persone. He will also get the same link as Georg Fabricius assigned. George Fabrice will be listed as Fabricius, Georg in the index. My challenge it to read the last name listed in the URL. I hope I was almost clear ... Patrick

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 ,
Jun 14, 2021 Jun 14, 2021

But C:\Users\Patrick\Documents\01_Jobs\13_Brandenburg_1717\02_Probekapitel\01_Words\Fabricus, Georg is not a URL, it's a file path.

 

It's not getting any clearer -- not to me, anyway.

P.

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
New Here ,
Jun 14, 2021 Jun 14, 2021

Yes a file path will be assigned, they cannot do this differently I have to accept that from customer. The last name in the path has to be listed in the index: Fabricius, Georg

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
Guide ,
Jun 14, 2021 Jun 14, 2021

That seems to me simple to play!

 

Search each url text and index its last word!

 

Right?

 

(^/)  The Jedi

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
New Here ,
Jun 14, 2021 Jun 14, 2021

Hi that is right! Unfortunatly I don't know how to write a script for that 😔

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
Guide ,
Jun 14, 2021 Jun 14, 2021

You're lucky! Peter and I have some Scripting knowledge! …

 

Personally, I've written a (not free) script 4 years ago that could be played here!

 

 

In your case, find url and just keep the last word!

 

If nobody helps you, you can pm me!

 

(^/)

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
New Here ,
Jun 14, 2021 Jun 14, 2021

Thank you

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 ,
Jun 15, 2021 Jun 15, 2021
LATEST

Unfortunatly I don't know how to write a script for that

 

More importantly, you're not able to describe exactly and unambiguously what you want. Or answer follow-up questions such as how spaces are represented in city names such as New York. To that question you come back with examples of file names instead of links and you don't explain how they show up in the InDesign document, and they are people's names, not locations (which in itself needn't matter), and some unexplained variation in names.

 

The script isn't difficult. Writing the script would be quicker than the correspondence about it.

 

So pull your socks up and provide some representative examples of links as they appear in your document and how they should appear in the index.

 

P.

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