05-25-2018, 11:23 AM | #46 |
Grand Sorcerer
Posts: 28,042
Karma: 199464182
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Mend is the replacement for HTMLTidy. The difference being that Mend doesn't break anything or randomly eat any content (or create any extraneous css) like Tidy used to do. It fixes broken xhtml (and it knows what headers are required for epub2 vs epub3).
If you've not disabled Mend on Open/Save in your preferences (and I don't recommend anyone disable it), then you've been using Mend every Open/Save. Last edited by DiapDealer; 05-25-2018 at 11:25 AM. |
05-25-2018, 11:32 AM | #47 |
Grand Sorcerer
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
@AlanHK: If you only work with epub3 files, you could temporarily patch plugin.py as follows:
change line 326: Code:
xml += '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n' Code:
xml += '<!DOCTYPE html>\n'
Code:
self.bk1.addfile(uid, basename, xml, mime) Code:
self.bk1.addfile(uid, basename, xml, mime, 'svg')
|
Advert | |
|
05-25-2018, 08:36 PM | #48 | |
null operator (he/him)
Posts: 21,006
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
05-26-2018, 01:25 AM | #49 | |
Guru
Posts: 677
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
It looks like the plugin creator CalibUser hasn't been here for 6 months. So unless someone adopts it it may never be updated. I've got no experience with Python so couldn't undertake it myself, even it was kosher to do that. I do use it. Probably it has fixed problems like this I was unaware of. Just in this case I did an epubcheck immediately after I ran the SVG plugin, as I'm more cautious with epub3 and recheck frequently before saving so I can isolate and undo any errors. Last edited by AlanHK; 05-26-2018 at 01:33 AM. |
|
05-26-2018, 08:06 AM | #50 |
Addict
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
Epub2 and EPub 3
Hi,
I have tried to update the plugin to cope with epub 2 and epub 3 books (attached). However, the plugin enters a loop so that when the plugin finishes running it runs again. As I have been coding in another language for the last 6 months I may have confused that code with Python and done something stupid. Can anybody spot my error? Thanks Last edited by CalibUser; 05-26-2018 at 08:30 AM. |
Advert | |
|
05-26-2018, 09:10 AM | #51 |
Sigil Developer
Posts: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
|
No error. This will happen the first time you install a plugin (this bug was fixed in master). After installing a plugin the first time, simply close out of Sigil and restart it to work around this problem.
|
05-26-2018, 09:42 AM | #52 |
Addict
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
Thanks, Kevin, I did not realise this bug existed.
I have uploaded an updated version of the plugin to the first post in this thread. The plugin will work with both epub 2 and epub 3 books. Thanks to Doitsu for identifying the changes needed - this saved me time. |
06-29-2018, 03:05 AM | #53 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Hi
Image numbering Thank you for this very useful plugin. I found that the numbering of images of the plugin differs from the one of the file manager. This could be confusing and requires extra care from the user when he (she) wishes to insert many images. I think that the numbering which should be used by the plugin should be the same as the one used by the file manager (right screenshot). see ePub3 screenshots for clearer explanations: Last edited by roger64; 06-29-2018 at 03:11 AM. |
07-01-2018, 07:28 AM | #54 |
Addict
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
@roger64: I'm glad you find my plugin useful.
I looked at the issue your raised but must admit that I don't understand it. When 'Import image' is selected it shows a list of files that are available in the selected folder on your hard drive (including any numbers that are in their filenames). If you select a file from this list and click 'Insert' then the relevant file is imported into Sigil using exactly the same name as the original file on the disk. If this included a number then this is included in the filename of the imported file in the 'Images' section. Are you finding that the number in the filename is changing when it is imported into the ePub? Could it be that the images are listed in a different order in the 'Images' section of the ePub to that in the folder and this is causing confusion? Another thought - I have only tested this on Windows 7 as I don't have access to other computers. Are you using a different OS? |
07-01-2018, 11:24 AM | #55 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
I am using Linux. Follow the numbers one by one please.
The screenshot on the left shows the numbers begin with the waist down then the head down, while on the right it goes from head to foot. Each image keeps its own number but why display them in that broken order? |
07-01-2018, 09:03 PM | #56 |
Witchman
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@CalibUser...I think roger64 is asking if you could just do an ascending top down sort of the image filenames before they are displayed in your dialog.
|
07-02-2018, 02:35 AM | #57 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
Thank you slowsmile. Human communication is tough at times...
Let me count sequentially (i.e. reading from top to bottom), plugin-wise: 001, 010, 011, 012, 013, 014, 015, 016, 017, 018*, 002, 003, 004, 005, 006, 007, 008, 009 To compare with Sigil 001, 002, 003, 004, 005, 006, 007, 008, 009, 010, 011, 012, 013, 014, 015, 016, 017, 018* *The book contains 18 images so there is no 019. Take the first number (three digits) of each of these two lists above which is the same 001 (luck!). The number following immediately this number 001 (I mean on its right) is NOT the same for the plugin than for Sigil. One of them may be wrong. Last edited by roger64; 07-02-2018 at 04:08 AM. |
07-02-2018, 02:41 PM | #58 |
Addict
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
Ah, I see what you mean. Thanks for clarifying, slowsmile.
I will look at this as soon as I can, although I may not get time to do it this coming weekend. |
07-03-2018, 02:13 AM | #59 |
Wizard
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
|
You are welcome. Thank you for taking care of this detail.
|
07-08-2018, 10:10 AM | #60 |
Addict
Posts: 202
Karma: 62362
Join Date: Jul 2015
Device: Sony
|
I have updated the plugin so that the list of images are shown in alphanumerical order.
The update is attached to the first post in this thread. |
|
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 |