![]() |
#196 | |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,717
Karma: 152906060
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
The first time was the nasty surprise since if I hadn't run Spellcheck again, I wouldn't have noticed those missing spaces which might have made the client unhappy. Now that I am aware of it, I can avoid the issue. |
|
![]() |
![]() |
![]() |
#197 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 734
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
|
@slowsmile: Don't give up! Your plugin has potential.
I know you don't want to improve this plugin anymore, but still, I found a few bugs in it, as well as the one that caused spaces to "disappear". The options.py file was also missing the default entry Code:
REMOVE_EMPTY_PARAS = False I was doing a clean test on the example EPUB file attached. I have shown my modifications in the attached image. Note that I called this problem a "last file issue" due to the lack of indentation in the cutils2.py file. This lack of indentation caused the last commands (including space destruction) to appear only in the last (x)HTML file. I think this was the main reason why you could not reproduce the problem described by @DNSB. The main culprit was a single line that was saving the file and, in the process, cutting out spaces. You do what you want with it. Spoiler:
Last edited by BeckyEbook; 12-12-2023 at 04:20 AM. Reason: Deletion of file |
![]() |
![]() |
Advert | |
|
![]() |
#198 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,717
Karma: 152906060
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
@BeckyEbook: Hate to be the bearer of bad news but I added a second XHTML file to my test epub and running the 0.5.6 code, I lost the spaces in both files. Not to mention that 0.5.6 pops up a notification that an update 0.5.5 is available due to the version checker code only checking that the installed version is not equal to the downloadable from message 1 version. If I change the != on line 84 of plugin.py to >=, the message disappears.
Code:
if is_connected: # check for new plugin versions latest_version, installed_version = updateCheck(SITE_URL, PLUGIN_PATH) if latest_version and latest_version >= installed_version: options.NEW_PLUGIN_VERSION = True options.MSG_NEW_VERSION_AVAILABLE = "A new version of this plugin is now available from MR - v" + latest_version |
![]() |
![]() |
![]() |
#199 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 734
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
|
Oh, I would be happy to check your file.
You can send me a piece via PM. This problem is indeed not a major issue, but other fixes in the plugin are worth improving. |
![]() |
![]() |
![]() |
#200 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,717
Karma: 152906060
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Probably easier just to attach the file here. Oddly, I forgot to remove my default selections when I ran CCPlus 0.5.6. When I cleared all selections, the spaces weren't removed unlike with 0.5.5. The options that I've found to trigger the issue were Remove ad hoc black text color declarations from html and CSS & Remove ad hoc white bg text color declarations from html and CSS. When I ran CCPlus with the options shown in the attached images, it looked good so it appears to be those two color options that cause my issues as a second test with everything selected on the 2nd page of the options also did not cause the missing space issue.
Last edited by DNSB; 12-11-2023 at 04:31 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#201 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 734
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
|
Deleted file.
Last edited by BeckyEbook; 12-12-2023 at 04:20 AM. |
![]() |
![]() |
![]() |
#202 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,717
Karma: 152906060
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Looks good. Those two options no longer trigger the space removal on my test ePub.
![]() I ran the ePub that originally triggered the issue for me through CCPlus and it also looked good. I still manually removed the <i> tags that surrounded the spaces because they were annoying. Last edited by DNSB; 12-11-2023 at 05:35 PM. |
![]() |
![]() |
![]() |
#203 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@BeckyEbook . . . Although your effort creating a new version of the plugin is appreciated, having two different downloadable plugin versions on the same thread could cause some version confusion as well. After all, the main release(and all plugin updates) for all plugins are always on the first post aren't they? And, currently, my plugin version is at v0.5.5. But now you have posted a new and different plugin version as v0.5.7 elsewhere in this thread -- which also appears to be considerably smaller in file size than my version -- in your post.
So to avoid any plugin version confusion, could you please release your version of the plugin, with your changes, as a separate and new release and under a different plugin name. And after you have released your new plugin version on MR, could you also remove your downloadable version of the plugin from your post above. Hopefully, doing that will help to avoid any future version confusion on this thread. In case your wondering why I'm asking you to release your new version under your own name it's because I don't know what changes you have made to the plugin code. As to me not fixing @DNSB's problem, I still think that a "clean-up" plugin has no business turning itself into a "fix-bad-code" plugin. That's really why I would prefer keeping my plugin version separate from your plugin version. And don't worry, I'm not upset or anything. I'm just a little worried that there are now two different, downloadable release versions of the plugin by two different people on the same thread. That should never happen. All advertised releases, updates and downloads should always be in the first post to avoid any version confusion. So whether you decide to use my cleanup plugin in a different way with a new release or not, I would really like you to remove your plugin download link from your post above as quickly as possible to help avoid any future version confusion in this thread. Thanx. Last edited by slowsmile; 12-12-2023 at 04:12 AM. |
![]() |
![]() |
![]() |
#204 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 734
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
|
Sure.
I am not part of the target group for this plugin, so I prefer not to publish it in a renamed version. I simply wanted to check why the tagged spaces were being removed. I took it purely as a challenge. |
![]() |
![]() |
![]() |
#205 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@BeckyeBook . . . My thanks to you for deleting the file so quickly. And I do understand your urge to help solve @DNSB's <span> problem. But for me I regarded the problem as self-inflicted bad code probably caused by using a poor Epub converter. And, as I keep saying, this plugin is for "clean-up". It isn't a "fix-it" plugin.
Last edited by slowsmile; 12-12-2023 at 06:19 AM. |
![]() |
![]() |
![]() |
#206 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 435
Karma: 7446396
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe
|
Quote:
An example would be creating an empty checkbox by using a border around a space. Since most EPUB renderers do not support form elements, you can't use an actual HTML checkbox. Perhaps this would be better done by using a custom font with a checkbox character, but that doesn't mean that using a border around a space is wrong...just unusual. |
|
![]() |
![]() |
![]() |
#207 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@nabsltd . . , Alright, you've convinced me -- with sincere apologies to @BeckyeBook. I'll implement and fix that problem with another plugin update as quickly as I can. After fixing the selectable "Remove empty spans" option, the plugin user will be able to select that option, which will act to remove or delete all instances of <span> tags that contain no text in the html. I'll get that change done hopefully by tomorrow.
My thanks to both @BeckyeBook and @nabsltd. |
![]() |
![]() |
![]() |
#208 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,717
Karma: 152906060
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Thank you. As you said, it's lousy code but in my experience, a lot of epub creators would not recognize good coding practices if they bit them on the butt.
|
![]() |
![]() |
![]() |
#209 |
Witchman
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
|
@DNSB,
@BeckyeBook, @nabsltd, I've put in all @BeckyBook's fixes and I've just tested the new fixed version of the plugin. I just want to clarify and confirm how the new plugin version behaves now. When I run the new plugin with the "Remove empty spans" option selected with this epub code: Code:
<p><span>This is a plugin test run</span></p>
Code:
<p>This is a plugin test run</p>
Code:
<p>This <span> </span>is a plugin test <span class="P1"> </span>run</p>
Code:
<p>This is a plugin test run</p>
Is everyone now happy with the new plugin's behaviour? I will be releasing the plugin tomorrow morning, so please let me know your thoughts before then. Last edited by slowsmile; 12-13-2023 at 04:13 AM. |
![]() |
![]() |
![]() |
#210 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 734
Karma: 2296998
Join Date: Jan 2017
Location: Poland
Device: Various
|
For me, this is OK.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 01:25 AM |
Problem with my ScrambleEbook plugin and the Plugin Updater tool | jackie_w | Development | 14 | 01-19-2017 10:49 PM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 02:24 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 12:11 PM |