Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-16-2021, 11:50 AM   #106
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: 38,004
Karma: 150500000
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by CalibUser View Post
@RbnJrg: I think your suggestion would need a different plugin; it is relatively easy to insert a new page in an ePub using Sigil, but I think your suggestion would require the ePub to be unzipped so that an existing page could be modified to incorporate the svg wrapper and then zipped up again.
Given that Sigil already needs to unzip and rezip the html/xhtml files to edit them?. It is not as if @RbnJrg was asking Sigil to insert the image into a random unopened for editing epub. Hmm... I don't think he was asking for that capability...
DNSB is offline   Reply With Quote
Old 12-16-2021, 01:54 PM   #107
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,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by CalibUser View Post
@RbnJrg: I think your suggestion would need a different plugin; it is relatively easy to insert a new page in an ePub using Sigil, but I think your suggestion would require the ePub to be unzipped so that an existing page could be modified to incorporate the svg wrapper and then zipped up again.
Many thanks for your answer. I think I did not explain myself very well. I have this .xhtml page:

Click image for larger version

Name:	Image1.png
Views:	219
Size:	164.7 KB
ID:	190859

As you can see, there are two paragraphs of text. And between them, I want to add a svg wrapper, so the output would be something as:

Click image for larger version

Name:	Image2.png
Views:	236
Size:	544.7 KB
ID:	190860

What I'm seeking is that the wrapper is inserted where I have the cursor, not in a new .xhtml page; in the example I would have the cursor here:

Click image for larger version

Name:	Image3.png
Views:	216
Size:	169.1 KB
ID:	190861

Can your plugin do something so?
RbnJrg is offline   Reply With Quote
Advert
Old 12-16-2021, 02:38 PM   #108
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,878
Karma: 5449552
Join Date: Nov 2009
Device: many
Cursor position is not passed to any plugin. So the only possibilities is for any plugin to do this would be:

1. The Plugin will add image file to epub and copy the required svg and any xhtml pieces needed to your clipboard, so that the user can just paste it once the plugin returns.

or

2. The user adds a unique placeholder to tell the plugin where you want the svg to be inserted. Something like:
Code:
<!-- PLUGIN INSERT SVG HERE -->
You could create a clip to insert that easily anyplace you want

Then the plugin would have to be modified to look for that placeholder and replace it with the required svg.



Either of these approaches could work to accomplish what you want but this up to the plugin dev if to implement if they want.

Last edited by KevinH; 12-16-2021 at 02:40 PM.
KevinH is offline   Reply With Quote
Old 12-16-2021, 06:21 PM   #109
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,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by KevinH View Post
Cursor position is not passed to any plugin. So the only possibilities is for any plugin to do this would be:

1. The Plugin will add image file to epub and copy the required svg and any xhtml pieces needed to your clipboard, so that the user can just paste it once the plugin returns.

or

2. The user adds a unique placeholder to tell the plugin where you want the svg to be inserted. Something like:
Code:
<!-- PLUGIN INSERT SVG HERE -->
You could create a clip to insert that easily anyplace you want

Then the plugin would have to be modified to look for that placeholder and replace it with the required svg.



Either of these approaches could work to accomplish what you want but this up to the plugin dev if to implement if they want.
Thanks Kevin. Any of those possibilities are ok to me; perhaps, the first alternative is easier to implement. In fact, so far what I'm doing is to let the plugin create a new .xhtml sheet with the svg wrapper, to copy it, to paste it in the place where I want it to be, and finally to delete the sheet created by the plugin.
RbnJrg is offline   Reply With Quote
Old 12-17-2021, 01:47 AM   #110
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
Quote:
Originally Posted by RbnJrg View Post
option to insert the svg wrapper not in a new .xhtml file but in the page (file)
What I do is create an SVG file and then copy the code between the divs, paste to the file where I want to put the illustration; then delete the original SVG file.

I add a class to the div wrapper:
div.breakavoid {page-break-inside: avoid;}

Or for smaller images you could use one with margins, to separate it from text, or size it.

PS -- I see from later posts you already worked that out, but leaving this as the div styling might be useful.

Last edited by AlanHK; 12-17-2021 at 01:51 AM.
AlanHK is offline   Reply With Quote
Advert
Old 12-19-2021, 08:21 AM   #111
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: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
@RbnJrg: I have updated the plugin to paste an image with svg tags into an ePub, following the suggestion by KevinH.

You can apply a div class to the wrapper, if required, as suggested by AlanHK.
CalibUser is offline   Reply With Quote
Old 12-19-2021, 10:39 AM   #112
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,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by CalibUser View Post
@RbnJrg: I have updated the plugin to paste an image with svg tags into an ePub, following the suggestion by KevinH.

You can apply a div class to the wrapper, if required, as suggested by AlanHK.
Thank you very much CalibUser!
RbnJrg is offline   Reply With Quote
Old 03-15-2022, 10:03 AM   #113
Acopdegarrotix
Junior Member
Acopdegarrotix began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2013
Device: Kobo Glo HD, Kobo Sage
Possible bug?

I'm getting this error when trying to run this plugin under Sigil 1.9.2 (Windows x64).

I checked some versions back and I've found out that the last version working was 1.8.0.

Tank you very much in advance.

Ernest
Attached Thumbnails
Click image for larger version

Name:	Captura de pantalla 2022-03-15 145446.png
Views:	178
Size:	22.7 KB
ID:	192779  
Acopdegarrotix is offline   Reply With Quote
Old 03-15-2022, 03:36 PM   #114
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,626
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
If you don't want to wait for the official update, edit plugin.py with a text editor and change line #46 from

Code:
import tkinter.ttk as tkinter_ttk	#Needed for ttk. commands
to:

Code:
import tkinter.ttk as ttk	#Needed for ttk. commands
Doitsu is offline   Reply With Quote
Old 03-15-2022, 04:01 PM   #115
Acopdegarrotix
Junior Member
Acopdegarrotix began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2013
Device: Kobo Glo HD, Kobo Sage
Thank you very much, Doitsu! It worked OK.

Acopdegarrotix is offline   Reply With Quote
Old 03-17-2022, 05:39 AM   #116
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: 201
Karma: 62362
Join Date: Jul 2015
Device: Sony
@Doitsu: Thanks for sharing this solution with the Sigil community.

I have updated the plugin in the first post of this thread.
CalibUser is offline   Reply With Quote
Old 09-05-2022, 08:45 AM   #117
mona123
Junior Member
mona123 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2022
Device: Kobo2
First thanks for great plugin. I am trying to convert my old .jpg comics to epub format so I can read them on my Kobo. Had a aproblem with fullpage view of .jpg files which this plugin solved. My problem now is that I can insert only one .jpg file at time. Is possible to insert multiple files at once (I need to insert 100 pcs for one comic). Thanks in advance.
mona123 is offline   Reply With Quote
Old 09-05-2022, 09:14 AM   #118
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,131
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Welcome to MR!

That functionality is already available...you just need to do a little manual work first

- Add all the images to Sigil using "Add Existing Files"...hopefully you have them named appropriately so they show up in the proper order: eg. img-001, img-002, etc.

- Run the plugin - you should see all your images in the select image window

- Select the first image in 'Select image'
- Select 'At the end' in 'Select position' dropdown
- push the 'Insert' Button (nothing will happen! It's OK)
- Select the next Image in 'Select image'
- push the 'Insert' Button (nothing will happen! It's OK)
- repeat the previous two steps until you are done with the images you want to insert
- push 'Close' button when done

All the images will be inserted: 1 per-page

I'm not sure if there is an upper limit to how many images you can do at once...I'd probably do 10 at a time to begin with....
Turtle91 is offline   Reply With Quote
Old 09-05-2022, 02:08 PM   #119
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,626
Karma: 23190435
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by mona123 View Post
First thanks for great plugin. I am trying to convert my old .jpg comics to epub format so I can read them on my Kobo.
AFAIK, if all images are sequentially numbered, you could simply zip up the image folder, change the file extension to .cbz and convert it to an .epub file with Calibre.
Doitsu is offline   Reply With Quote
Old 09-05-2022, 03:49 PM   #120
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,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
By the way, in Sigil 1.9.20 under Arch Linux, the plugin is not working any more; the insertion can't be completed, the dialog is showed but does nothing.
RbnJrg is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 02:49 AM.


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