View Single Post
Old 05-25-2025, 08:38 AM   #1956
compurandom
Wizard
compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.compurandom ought to be getting tired of karma fortunes by now.
 
Posts: 1,018
Karma: 500000
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
Quote:
Originally Posted by kamowski View Post
Hello,
I mainly use PDF documents in Calibre. I need a plugin that checks a PDF document and marks, in a separate column, whether the document contains a TOC or not.
I have a script that detects the presence of a TOC in a PDF document, but I don't know how to turn it into a plugin. I'm not a programmer, and I created this script using AI.
Can anyone me create a plugin from it?
Thank you!
I am a programmer and this has been on my todo list for a number of years.

Too many projects right now to get to it, but here's my thoughts...

Calibre has an internal pdf library that it should be easy to leverage to do this.

Not all pdf files with a TOC actually have a TOC. Far more than I like have a "TOC" with a single entry in them, so knowing if it has a TOC is not enough, you need to check if it has more than some threshold number of entries. (Which is still trivial, but...)
compurandom is offline   Reply With Quote