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 03-30-2018, 01:47 AM   #46
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Update: The following changes have been made to the plugin(v0.1.4):

* The href ids are now more widely gathered from the following files: xhtml files, toc.ncx, opf manifest and opf guides. These href ids are then compared to existing ids/bookmarks in the xhtml files. The xhtml ids are only removed if they don't exist in the href id list.

-- NCX pagelists and page-map.xml files are not supported by this plugin. If either are detected in an epub then there will be a warning with bailout.

Last edited by slowsmile; 03-30-2018 at 01:50 AM.
slowsmile is offline   Reply With Quote
Old 10-25-2019, 07:15 AM   #47
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Update: Changes to RemoveUnusedBookmarks v0.1.5
  1. Fixed several bugs which, under certain conditions, would give epubcheck errors.
  2. This plugin can now process epub 2 and epub 3 files. My thanks to @democrite for the suggestion.
slowsmile is offline   Reply With Quote
Advert
Old 10-28-2019, 06:58 AM   #48
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Update: Changes to plugin(v0.1.6)
  • Improved html output(layout).
slowsmile is offline   Reply With Quote
Old 10-30-2019, 08:26 AM   #49
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
Update: Changes to plugin(v0.1.7):
  • Fixed a bug whereby if the epub contained SVG wrappers then the SVG code would be corrupted by the plugin, causing epubcheck errors.
slowsmile is offline   Reply With Quote
Old 06-26-2020, 08:01 PM   #50
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
Thank you very much for the update. A request: any chance there could be an option to not reformat HTML?
democrite is offline   Reply With Quote
Advert
Old 06-26-2020, 10:24 PM   #51
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@democrite...I'm not sure what you mean by "an option not to reformat the html". It's usually inevitable that the html output will always change after you run any plugin. In HTML view the output layout from the plugin looks similar to when you click Tools > Reformat HTML > Mend and prettify All HTML Files in Sgil. Can you please be more specific concerning your request or problem?

Last edited by slowsmile; 06-27-2020 at 12:19 AM.
slowsmile is offline   Reply With Quote
Old 07-03-2020, 08:40 PM   #52
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
I am aware that bookmarks (IDs) will be removed but the reformat like as does Sigil with the option you mention I would prefer not to have. I kind of like my EPUBs formatted a particular way and would like to keep it if possible.
democrite is offline   Reply With Quote
Old 07-03-2020, 08:53 PM   #53
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
After running the plugin, this should not effect the text in Preview. And, in Sigil, if you click on Tools > Reformat HTML > Mend and prettify... this will standardize the layout of the html. That's really the best that I can offer.

I'm afraid I disagree with your view. If you would like me to standardize html output layout from the plugin to just your liking then I do not regard that as a reasonable request. I also think that it's more reasonable for the html output layout to be standardized to the normal epub layout(i.e. the layout that you get after running mend and and prettify).

Last edited by slowsmile; 07-04-2020 at 12:10 AM.
slowsmile is offline   Reply With Quote
Old 07-10-2020, 04:37 AM   #54
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
slowsmile,

I am not asking for my or some arbitrary standard reformating of html. If one wants to reformat, there is Sigil itself as you mention. Such a command I do not use. I format my EPUBs to my liking, making easier for me to see hierarchy and various element types as I edit, make corrections, etc. I do not use Sigil's command unless needed and easier than reformatting some commercial EPUB, such as in the case of some publishers that add intra-element line breaks in the case of line breaks at some line length as is done with programming code. I prefer no reformatting at all unless requested and done by the user. I think you use BeautifulSoup? I imagine such a mature library should be able to manipulate code while leaving it as is, just removing IDs. To repeat to be clear, no reformatting at all, just removal of IDs. If such is the case, perhaps that should even be default, as you are aware if one wishes to reformat, they can simply use Sigil. If BS is not capable of such, maybe it is more suitable to request the library to be able to do such.

Your plugin is invaluable. So often, at least somewhat regularly, I have some self-made EPUB or commercial with thousands of IDs for references, footnotes, hyperlinks, etc. After ensuring that they are all properly linked, I like removing unused IDs. Does it make some difference on modern hardware? If there are 10,000+ IDs and many can be removed? Who knows. I feel good knowing performance and RAM usage is as best as can be, even if marginal. Yet maybe it does make a difference. So I use your plugin. The ability to not reformat would be a most welcome addition.

Last edited by democrite; 07-10-2020 at 04:39 AM.
democrite is offline   Reply With Quote
Old 07-10-2020, 07:48 AM   #55
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 76,421
Karma: 136564696
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
delete post

Last edited by JSWolf; 07-10-2020 at 07:50 AM.
JSWolf is offline   Reply With Quote
Old 07-11-2020, 12:44 AM   #56
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@democrite...When I initially copy all your epub html files to be worked on by my plugin I use bk.text_iter() to fetch the files and use bk.readfile() to read the files into data. Then I run the data from each file through BeautifulSoup in the normal way. And it is there that your html layout will get changed -- it's not my plugin code that deliberately changes your html layout. And since I have no control over that, it is for that reason that I cannot "leave your html layout alone". That's also the reason why I usually always reformat the html output layout to look like it does after you run Tools > Reformat HTML > Mend and prettify... which, as I've already mentioned, helps to standardize the html output layout for each file(which most plugin users seem to prefer anyway).

Last edited by slowsmile; 07-11-2020 at 01:16 AM.
slowsmile is offline   Reply With Quote
Old 07-21-2020, 11:52 PM   #57
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 440
Karma: 77256
Join Date: Sep 2011
Device: none
Thank you for the explaination. From looking around a bit, it seemed perhaps possible to use BS without it reformatting. I may look into it further someday.

Btw, since your plugin operates on bookmarks, would you consider removal of duplicate IDs within each file? If for example I use regex to add IDs to footnotes for later linking, sometimes paragraphs can be such that there are dupes.
democrite is offline   Reply With Quote
Old 07-22-2020, 10:21 AM   #58
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: 8,160
Karma: 5450818
Join Date: Nov 2009
Device: many
You may want to take a look at the extras in sigil_bs4 versus normal bs4.

See: https://github.com/Sigil-Ebook/Sigil...s4/__init__.py

For "serialize_xhtml" near line 470 which tries to rebuild the source as close as possible to what was parsed, similar to how Sigil itself does it.
KevinH is offline   Reply With Quote
Old 07-23-2020, 06:46 AM   #59
slowsmile
Witchman
slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.slowsmile ought to be getting tired of karma fortunes by now.
 
Posts: 628
Karma: 788808
Join Date: May 2013
Location: Philippines
Device: Android S5
@democrite...Regarding the removal of duplicates, I doubt if you could do that automatically with a plugin because the plugin will not be able to automatically decide which duplicate IDs to remove. You could perhaps do it using a plugin via a dialog window that specifically allows you to choose the duplicate IDs for removal. But, to be honest, removing duplicate IDs is probably best achieved with a new plugin.

Last edited by slowsmile; 07-24-2020 at 01:31 AM.
slowsmile is offline   Reply With Quote
Old 08-07-2023, 06:03 PM   #60
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
Hi, thanks for creating this plugin - it really helps me clean up retail epubs that use a lot of unnecessary ids. However, I've noticed it isn't able to clean out all unused ids. For example:

Code:
<h1 id="bm4">TITLE</h1>

<h2 id="bm4-s01">SECTION</h2>
In this case, "bm4" is unused, but "bm4-s01" is. If I rename "bm4" to, say, "banana" your plugin will catch it, so it seems to be thinking that, because the "bm4" string is present in the used "bm4-s01" it thinks that they're both in use.

Anyway, I know this plugin is a bit on the old side but is there a chance this could be addressed? Alternatively, is there another similar plugin that will find these ids? Thanks in advance.
Vanguard3000 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing plugin in Calibre removes it from all instances of Calibre oblox Calibre 9 09-09-2016 06:39 AM
iPad Possibility to sync bookmarks through side loaded ePubs (Any iOS software?) andsoitgoes Apple Devices 12 04-13-2012 08:38 PM
Modify bookmarks in epubs silentguy Development 3 08-03-2011 06:37 PM
Sideloaded ePubs, chapters and bookmarks Steven Lyle Jordan Nook Color & Nook Tablet 10 02-05-2011 07:35 PM
Problem (bug) with bookmarks in PDF plugin (2.0 RC2) luite iRex 1 07-12-2010 03:36 AM


All times are GMT -4. The time now is 09:00 PM.


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