View Single Post
Old 03-22-2023, 06:22 AM   #6
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,449
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
I'm afraid I don't really understand. do you have an example of how this would differ from a regular composite column?
The generator function can do things that a template can't, or at least shouldn't. For example, it can keep information in the calibre database and produce images.

Some examples:

1) An "author information" plugin. This plugin would store information about an author such as descriptive text, pen names, pictures, location, languages, book lists, what-have-you. The plugin would register itself as a generator function, which would be called when book details is displayed. The plugin would build HTML of the information based on the current book using authors or some other column, which book details would display.

2) Should DaltonST choose, he could display the output of the Notes Viewer in book details. His plugin would be called when details for a book are displayed. It would return the HTML interpretation of the note that it currently generated. His Entity Manager might have similar possibilities.

3) A "series" plugin that returns information about the current series, for example text that describes the universe, offshoot series, reading order, and the like.

4) A plugin that generates a graph of book ratings with the current book highlighted. The graph could be by genre, series, author, library, or what-have-you.
chaley is offline   Reply With Quote