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 11-21-2020, 10:28 AM   #226
CalibUser
Groupie
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: 186
Karma: 62230
Join Date: Jul 2015
Device: Sony
@thosp: Thank you for letting me know about this bug. This has been fixed and the updated plugin has been put in the first post of this thread.
CalibUser is offline   Reply With Quote
Old 05-24-2021, 09:44 AM   #227
thosp
Member
thosp began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Dec 2014
Device: laptop & tablet
Incorrect Character Change

Greetings,

I ran the plugin against a file containing, "Texta / Textb"

and it changed it to, "Texta I Textb".

That is incorrect, isn't it?
thosp is offline   Reply With Quote
Old 05-25-2021, 06:25 AM   #228
CalibUser
Groupie
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: 186
Karma: 62230
Join Date: Jul 2015
Device: Sony
Quote:
Originally Posted by thosp View Post
I ran the plugin against a file containing, "Texta / Textb"

and it changed it to, "Texta I Textb".

That is incorrect, isn't it?
@thosp: The plugin is not perfect and a number of assumptions were made for changing text/symbols that may seem to be incorrect.

The plugin assumes that a "/" separated by two spaces should be the letter "I" as this was one of the frequent errors in ePub files that were converted from pdf files. It will not change a "/" if it is not surrounded by spaces.

So although the plugin is amending "Texta / Textb" incorrectly, it is making the change that it was programmed to do. If I amend the code to ignore " / " then it will not detect any " / "s that should be an "I".

It is not possible to amend the plugin so that it can work out whether a " / " should be changed to "I" or not. On balance, I will leave the plugin to change " / " to "I" as "I" in the pdf is commonly converted to "/" in the ePub.
CalibUser is offline   Reply With Quote
Old 05-25-2021, 11:27 AM   #229
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: 5,929
Karma: 4217884
Join Date: Nov 2009
Device: many
One idea is to do what Doitsu does in many of his plugins which is to use the plugins Prefs to store user-editable preferences so that the user can enable that change or not.
KevinH is offline   Reply With Quote
Old 05-26-2021, 06:55 AM   #230
CalibUser
Groupie
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: 186
Karma: 62230
Join Date: Jul 2015
Device: Sony
Quote:
Originally Posted by KevinH View Post
...use the plugins Prefs to store user-editable preferences so that the user can enable that change or not.
Thanks for the suggestion. However, for some changes this would be long-winded to implement. In the worse case situation I would have to split up the following code to allow each term to be selected/rejected:

Code:
	if cDetermineQuotes.OpenQ == "‘":
		CorrectText("Corrected apostrophes in wrong direction", r'[ ]?‘(ad|ave|bout|eard|em|er|cause|cept|im|is|old|ome|ow|specially|Taint|til|tis|twas)(\W?)', r' ’\1\2')
	else:
		CorrectText("Corrected apostrophes in wrong direction", r'[ ]?‘(?i)(\d\d|ad[n]{0,1}|app[yines]{0,5}|appen[eds]{0,2}|ard[er]{0,2}|arf|alf|ang|as|at|av[ein]{0,3}|bout|bye|cause|cept[ing]{0,3}|copter[s]{0,1}|cos|cross|cuz|couse|e[emr]{0,1}|ell|elp[edling]{0,5}|ere[abouts]{0,5}|eard|f|fraid|fore|id|igh[er]{0,2}|ighness|im|is|isself|gainst|kay|less|mongst| n|nd|neath|nough|nother|nuff|o[o]{0,1}|ood|ome|ow|op[eding]{0,3}|oney|orse[flesh]{0,5}|ouse[ds]{0,1}|pon|puter[edrs]{0,2}|round|scuse[ds]{0,1}|spect[sed]{0,2}|scaped|sides|tween|special[ly]{0,2}|stead|t|taint|til|tis|twas|twere|twould|twil l|ud|un|urt|vise)(\W?)', r' ’\1\2')
However, if enough users want this feature then I will consider it.
CalibUser is offline   Reply With Quote
Old 05-28-2021, 09:56 PM   #231
democrite
Addict
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: 300
Karma: 77002
Join Date: Sep 2011
Device: none
I understand such would require a fair amount of work. As I believe I suggested something like such before, someday yes, yes I say yes.
democrite 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
Tidying Up My Kindle selectortone Calibre 2 07-17-2013 11:35 AM
developping a Plugin for Presentation files abdlink Plugins 4 04-15-2013 12:27 PM
Plugin to fix fb2 files oviksna Plugins 3 01-28-2013 09:53 AM
Tidying Up My Library JayLaFunk Library Management 2 09-20-2011 10:12 AM
Calibre 0.7.50 can't see plugin files mb_webguy Calibre 5 04-29-2011 04:41 AM


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


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