![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,989
Karma: 6361444
Join Date: Nov 2009
Device: many
|
Not a big fan of AI but if you want your Preview to act like Sigil's Preview (ie like a webpage viewer), a QWebEngineView widget is needed *not* a QTextEdit.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Plugin] LOI-Generator - edit] plugin to generate a List of Illustrations | KevinH | Plugins | 1 | 01-19-2023 04:31 PM |
Updating plugin fails because plugin file is in use by Calibre? | ownedbycats | Calibre | 1 | 12-03-2022 08:34 PM |
[Metadata Source Plugin] Empty Plugin? (Fake Identifier) | mneimeyer | Plugins | 3 | 11-11-2019 08:07 PM |
[Plugin] QuickPrefsEdit - Edit plugin prefs json files. | slowsmile | Plugins | 3 | 07-25-2018 08:14 PM |
Goodread Perception Expander plugin not shown on plugin list (kobo h2o) | www | KOReader | 4 | 09-28-2017 10:34 AM |