Scrapping references from Table of contents

I have before asked a help on how to pass the user prompt to the next varialb.

Thank for @DanThomas, I am now able to successful collect references from Table of Contents of PDF books. Now, I want to push the system a little further. I want KM to calculate and concatenate the page numbers.

The table of contents have 3 elements:

1. Title
2. Author
3. page number

I manually copy these three elements into my clipboard and then, use the macro made from the linked page to paste the clipboard into Jabref.

The table of contents has the pattern:

Title 1-------page 20
Author 1
Title 2 -------page 40
Author 2
Title 3 ----- page 70

The macros is working fine. But, the page number is inserted as a single item: eg. 20, or 45. I want to get the page numbers to appear in ranges.

What I want is for KM to calculate and concatenate the page number of the first entry to look: 20-39. For the second entry to have 40--69. etc.

is it doable?

I am not sure if the above description is clear. Just ignore it. I will narrow down the problem; and return back.

1 Like