View Single Post
Old 10-02-2025, 11:21 AM   #1
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,870
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Help with a plugin

I don't know anything about Python, not even how to build a Sigil plugin. But I'm building one using AI, and it's doing very well so far, and it's working with PySide6. However, I've run into a problem where all attempts at a solution have failed. The plugin I'm building is to format chapter headings in an ePub. The plugin should include the ability to format everything, from images in the desired position, size, and alignment, fleurons, choosing the font family, size, style, margins, color, decoration, etc., etc., etc. (whether I'll actually achieve it is another matter, but so far, everything is going well).

The plugin also includes a preview of how the heading will look based on the choices made in the GUI. And this is where the problem arises: there's no way to preview an image when I select it as the heading background. Or rather, it's possible to preview it, but poorly, since the image repeats itself and I couldn't get the AI ​​to figure this out on its own (the style it applies is correct, but the plugin can't render it correctly).

And this is where I need help, figuring out how to achieve that error-free preview and give the AI ​​those instructions (and if there's some code to train it with, even better). So far, the AI has used a QTextEdit to simulate the preview, but I'm not sure if it's the best option (as I said, I don't know anything about Python or Sigil plugins). So, I'd appreciate any suggestions that might help me move forward in this regard.
RbnJrg is offline   Reply With Quote