Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 09-11-2023, 06:45 PM   #166
philja
Groupie
philja began at the beginning.
 
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
Quote:
Originally Posted by KevinH View Post
The problem is sandboxing an app like Sigil that uses PageEdit as an external editor, that uses OpenWith to open lots of third party editing tools chosen by the user including gimp, svg editors, etc, etc, and third party python plugins that can run lots of OS commands and tools (including java) just makes no sense at all. The flatpak version is quite handicapped and limited.

The right way to effectively "sandbox" an app like Sigil is to run it in a VM with a full set of other tools that can be employed with Sigil (like PageEdit, gimp java, etc etc) to make a VM playground tool).

Have you thought about running a Manjaro VM (or some other linux VM that properly updates things like Sigil) on your linux box and not running flatpak?
I have no particular affection for flatpak (or snaps for that matter - I replace Ubuntu's snap Firefox with one downloaded directly from Mozilla) but I was tired of always running the vastly outdated version of Sigil offered by the distro. And I didn't feel up to making my own build although someone on this forum did say help was available.

So when the Sigil website downloads pages indicated that there was a flatpak version that was always up to date, I went in that direction.

Maybe I should reconsider making my own build - it might be easier than undertaking a new and unknown venture of a VM, about which I know nothing.
philja is offline   Reply With Quote
Old 09-12-2023, 08:16 AM   #167
philja
Groupie
philja began at the beginning.
 
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
The plugin tells me each day that an update is available - and it's a lie. I don't mind the plugin checking daily but it should tell the truth.

In post #156, I indicated that after installing the update, Sigil still registers v0.2.1.4 as 0.2.1.3 and that the plugin's xml file still shows version as 0.2.1.3.

I've corrected that locally in my version but could another potential problem arise from the way the new version's file is named? It is called "InsertImageSVG_02.1.4.zip" rather than the usual "InsertImageSVG_0.2.1.4.zip".

Would that cause a look-up discrepancy in the update module?
philja is offline   Reply With Quote
Advert
Old 09-12-2023, 11:00 AM   #168
diego77
Member
diego77 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2018
Device: kobo aura one
Same here. Installed 0.2.1.4, and it's 0.2.1.3 instead.
diego77 is offline   Reply With Quote
Old 09-12-2023, 12:08 PM   #169
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
They probably just didn't update the plugin.xml file. Rest assured that it IS a new version with fixes included.
DiapDealer is offline   Reply With Quote
Old 09-12-2023, 12:11 PM   #170
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,040
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by philja View Post
I've corrected that locally in my version but could another potential problem arise from the way the new version's file is named? It is called "InsertImageSVG_02.1.4.zip" rather than the usual "InsertImageSVG_0.2.1.4.zip".

Would that cause a look-up discrepancy in the update module?
No. Anything after the underscore in the zipfile name is ignored. The version number is pulled from the internal plugin.xml file. The only requirement is that the internal folder name (and the plugin name in plugin.xml) match what comes before the underscore. We added the ability to add version info after the underscore so people (devs and users alike) could quickly tell archives apart at a glance. But that portion is purely cosmetic.

Last edited by DiapDealer; 09-12-2023 at 02:12 PM.
DiapDealer is offline   Reply With Quote
Advert
Old 09-12-2023, 01:55 PM   #171
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,536
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by DiapDealer View Post
They probably just didn't update the plugin.xml file. Rest assured that it IS a new version with fixes included.
That is correct. I took a look at the plugin.xml and the version was still 0.2.1.3 so I updated it to 0.2.1.4 and the update available went away.

I've attached a copy of the plugin zip file with the change to this message. Download and manually install if you so desire.

Edit: The version linked in the first message has corrected the version number so I've removed the file from this message.

Last edited by DNSB; 09-13-2023 at 12:43 PM.
DNSB is offline   Reply With Quote
Old 09-13-2023, 05:45 AM   #172
CalibUser
Addict
CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.
 
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
Apologies for forgetting to update the xml file. I have copied the update from DNSB to the first post in this thread so that the first post continues to reflect the latest version of the plugin
CalibUser is offline   Reply With Quote
Old 09-13-2023, 01:28 PM   #173
diego77
Member
diego77 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2018
Device: kobo aura one
Today I got this error:

Status: failed

Checking for updates...
Published version 02.1.4
Installed version 0.2.1.4
An update for this plugin is available at https://www.mobileread.com/forums/sh...d.php?t=283333
Traceback (most recent call last):
File "/Applications/Sigil.app/Contents/plugin_launchers/python/launcher.py", line 142, in launch
self.exitcode = target_script.run(container)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/name/Library/Application Support/sigil-ebook/sigil/plugins/InsertImageSVG/plugin.py", line 600, in run
CheckForUpdates(root, prefs, url)
File "/Users/name/Library/Application Support/sigil-ebook/sigil/plugins/InsertImageSVG/UpdateChecker.py", line 250, in CheckForUpdates
IsLatestInstalled= checkVersion(root, prefs, url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/name/Library/Application Support/sigil-ebook/sigil/plugins/InsertImageSVG/UpdateChecker.py", line 237, in checkVersion
prefs = ShowUpdateDlg(root, prefs, url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/name/Library/Application Support/sigil-ebook/sigil/plugins/InsertImageSVG/UpdateChecker.py", line 164, in ShowUpdateDlg
DlgFrame = ttk.Frame(top, padding="15 15 12 12")
^^^
NameError: name 'ttk' is not defined
Error: name 'ttk' is not defined
diego77 is offline   Reply With Quote
Old 09-13-2023, 01:45 PM   #174
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 40,536
Karma: 157444380
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
That was my screwup. I replaced the 02.1.3 version string with 0.2.1.4. I've corrected it and will attach the corrected version to this message. Could someone try this version and let us know if it is working for you.

Edit: My first edit was to the unpacked copy in AppData. Looked okay so I then edited the plugin.xml from the .zip file and screwed up. Colour me embarrassed.

Edit: version in first message has been updated so removed file attached to this message.

Last edited by DNSB; 09-14-2023 at 12:25 PM.
DNSB is offline   Reply With Quote
Old 09-13-2023, 02:07 PM   #175
diego77
Member
diego77 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2018
Device: kobo aura one
Now it works!

Thanks DNSB!
diego77 is offline   Reply With Quote
Old 09-14-2023, 06:13 AM   #176
CalibUser
Addict
CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.CalibUser goes to eleven.
 
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
The plugin in the first post of this thread has been updated.
CalibUser is offline   Reply With Quote
Old 09-20-2023, 11:45 AM   #177
philja
Groupie
philja began at the beginning.
 
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
re: plugin not loading image to clipboard

I posted a query on github.com/flathub/com.sigil_ebook.Sigil/issues/23 asking whether the flatpak version was not allowing the plugin to use xclip and xsel.

Last time when I raised an issue there about java, a fix was posted overnight but it's taking a little longer to get a response this time round.
philja is offline   Reply With Quote
Old 09-20-2023, 05:57 PM   #178
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by philja View Post
I posted a query on github.com/flathub/com.sigil_ebook.Sigil/issues/23 asking whether the flatpak version was not allowing the plugin to use xclip and xsel.
It might be possible to change to plugin code to use the built-in Qt6 library for all platforms.
Install the CCTest edit plugin and run it. It should copy 'Lorem ipsum dolor sit amet, consectetur adipiscing elit' to the clipboard. If the plugin works on your Linux machine, it'll be easy to update the plugin code of the SVG wrapper plugin.

Here's the code of the CCTest plugin:
Spoiler:
Code:
#!/usr/bin/env python
 # -*- coding: utf-8 -*-
import sys
from plugin_utils import PluginApplication

def run(bk):
    app = PluginApplication(sys.argv, bk)
    app.clipboard().setText('Lorem ipsum dolor sit amet, consectetur adipiscing elit')
    print('Text copied to the clipboard')

    return 0

def main():
    print('I reached main when I should not have\n')
    return -1

if __name__ == "__main__":
    sys.exit(main())
Attached Files
File Type: zip CCTest.zip (6.6 KB, 315 views)
Doitsu is offline   Reply With Quote
Old 09-22-2023, 12:51 PM   #179
philja
Groupie
philja began at the beginning.
 
Posts: 177
Karma: 10
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6
Quote:
Originally Posted by Doitsu View Post
It might be possible to change to plugin code to use the built-in Qt6 library for all platforms.
Install the CCTest edit plugin and run it. It should copy 'Lorem ipsum dolor sit amet, consectetur adipiscing elit' to the clipboard. If the plugin works on your Linux machine, it'll be easy to update the plugin code of the SVG wrapper plugin.
I installed and ran CCTest edit plugin and it responded with first:
Code:
QT: session management error: could not open network socket
and then a second or so later:
Code:
Status: success

Text copied to the clipboard
I tried pasting into Sigil but nothing appeared. When I looked at my system clipboard listing and history, there was no 'Lorem ipsum ....' to be seen.

What do you make of that? Was it success or did the CCTest only think it was?

I had a quick look inside CCTests's plugins_utils.py and found a DEBUG reference set at DEBUG = 0 so I tried setting that to 1 and ran it again. This time the response gave two pages. The first I couldn't copy but essentially it contained the line about not connecting to a socket. The second page said :
Code:
Status: success

QtWebEngine PyQt5 Python bindings found.
plugin_utilities is using PyQt5
Sigil Qt:  5.15.10
Sigil Qt major version:  5
Python is Bundled: False
Qt translation dir: /usr/translations
Looking for qtbase_en in /usr/translations
Qt Base Translator succesfully installed: False
Looking for cctest_en in /home/pnj/.var/app/com.sigil_ebook.Sigil/data/sigil-ebook/sigil/plugins/CCTest/translations
Plugin Translator succesfully installed: False
Noto Sans,12,-1,5,50,0,0,0,0,0,Regular
Font Weight: 50
Noto Sans,12,-1,5,50,0,0,0,0,0,Regular
Text copied to the clipboard
philja is offline   Reply With Quote
Old 09-22-2023, 01:49 PM   #180
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by philja View Post
What do you make of that? Was it success or did the CCTest only think it was?
Unfortunately, it wasn't a success. At least we now know that the maintainer of the package didn't bundle it with PySide6.

Try changing the code in plugin.py as follows:

Spoiler:
Code:
#!/usr/bin/env python
 # -*- coding: utf-8 -*-
import sys
from PyQt5.QtWidgets import QApplication

def run(bk):
    app = QApplication(sys.argv)
    cb = app.clipboard()
    cb.clear(mode = cb.Clipboard )
    cb.setText("Lorem ipsum dolor sit amet, consectetur adipiscing elit", mode=cb.Clipboard)
    print('Done.')

    return 0

def main():
    print('I reached main when I should not have\n')
    return -1

if __name__ == "__main__":
    sys.exit(main())


If that doesn't work either, try the attached pyperclip-based test plugin.
Attached Files
File Type: zip PCTest.zip (22.5 KB, 329 views)
Doitsu is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wrap in SVG plugin? gezginrocker Plugins 18 07-05-2015 01:20 AM
svg image on top of a background png image roger64 ePub 25 04-24-2015 12:00 PM
Display of a png image linked to a svg image roger64 Editor 6 03-13-2015 07:21 AM
Image wrap test Jellby ePub 15 05-04-2011 03:30 PM
Combining blockquote with image wrap WRB Sigil 1 02-12-2011 08:46 PM


All times are GMT -4. The time now is 08:27 PM.


MobileRead.com is a privately owned, operated and funded community.