![]() |
#1 |
Connoisseur
![]() Posts: 69
Karma: 10
Join Date: Jul 2023
Device: none
|
Suggestions for filter replacements dialog
1. Would you think about changing the filter replacements dialog to look more like the delete files dialog with checkboxes and a select/unselect all button? I would like to be able to see and review all the items I do and do not want to change before applying.
2. You display items in reverse order because that is the order you need to delete them in. Could you display them in normal order and run your delete loop from end to start? |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,593
Karma: 5703586
Join Date: Nov 2009
Device: many
|
1. This effectively already exists. You can delete any replacement you do not want to apply with the delete key. And you can scroll through them all before making any decisions.
2. Since finds and replacements can overlap, and impact positional information (ie an upstream replacement changes the position of the downstream, there is no way to pre-find every occurrence and have that position remain valid all throughout the sequence of replacements) otherwise. So the window must show the application order so that you see how overlaps are or are not handled. Last edited by KevinH; 12-02-2024 at 09:24 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() Posts: 69
Karma: 10
Join Date: Jul 2023
Device: none
|
1. I do a lot of OCR proofreading and may have hundreds of possible changes. Sometimes I may want to apply less than half the changes and it would be a lot easier just to select the changes I want. Also there is no way of checking if there is a change I want to apply that I accidentally deleted.
2. Thank you for explaining the problem clearly enough for me to understand. |
![]() |
![]() |
![]() |
#4 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,593
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Hmm ... I can't see how using a mouse and scrolling clicking or unclicking a checkbox, would be any faster than using an arrow key or pagedown and delete key.
It is often more useful to modify the find and replace query itself to be more selective. Splitting them into multiple more refined queries and adding them to a Saved Search group. You can save and load Saved Search Groups to files to be loaded dynamically when you want them. Also, to check for missing, you can rerun the exact same search and walk through the omitted replacements that will now be caught again. Or alternatively, create a CheckPoint beforehand and use Compare to examine changes. Everyone does it differently. That said there are already a number of plugins to help find and fix OCR errors, smarten punctuation, spellcheck etc. Have you tried those before spending time to develop your own? |
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() Posts: 69
Karma: 10
Join Date: Jul 2023
Device: none
|
I use PunctuationSmarten and spellcheck and have a list of regexes I run. (btw is it possible to have an automate list of regexes and have them come up in Filter Replacements instead of just doing them?)
An example of a search that is awkward with the current dialog is changing single hyphens to em dashes. I would much rather select the ones to change than delete all the lines not to change. If you know a better way to do this, please tell me. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,593
Karma: 5703586
Join Date: Nov 2009
Device: many
|
As I tried to explain, if you can visually select which hyphens to change based on context, then split that find replace into a sequence of multiple find replaces that search for the hyphen AND that context and save it as a saved search group.
In addition emdashes are typically offset by a single space on each side according to all modern style guides while normal hyphens are not. So searching for " - " might be an example of one of the more refined searches. This changes the ratio of hits in the search so fewer need to be deleted because it is more are ones you want to convert. Yes it then takes more work to create the find replaces in the first place but they are better for repeated long term use. I will look into how possible check boxes would be to add but no promises. Last edited by KevinH; 12-03-2024 at 09:42 AM. |
![]() |
![]() |
![]() |
#7 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,593
Karma: 5703586
Join Date: Nov 2009
Device: many
|
I took a look at how difficult it would be to move away from using delete (or block delete) to using a checkbox. It looks doable in a reasonable amount of work.
I will put together a version of it and post a demo so that others can see and try this alternative approach and comment. Update: I have this basically functioning. So when I get some free time I will create a demo build. People can then compare the checkbox approach to the delete row approach. Last edited by KevinH; 12-09-2024 at 04:17 PM. |
![]() |
![]() |
![]() |
#8 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,321
Karma: 168808723
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
To disagree, not placing spaces around an emdash (—) is the more common choice in the style guides I've looked at. Basically, unless you are a newspaper or magazine, most academic and other style guides say no spaces around an emdash. OTOH, spaces are generally used around an endash (–).
On yet another hand, I've gotten very paranoid about any automation of converting hyphens/minus signs to anything else since it's "fun" to exclude non-text portions of a file. Epubcheck is not very happy when you have utf – 8 instead of utf-8 or when you convert cover-image to cover—image. Then we have the dim glows who use a double hyphen for an emdash. |
![]() |
![]() |
![]() |
#9 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,593
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Well at least with the replacement chooser filter, you should be able to quickly visually exclude utf-8 cases. That is the whole reason for the replacement chooser.
|
![]() |
![]() |
![]() |
#10 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,593
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Okay, I have made some changes to users to test a Replacement Filter (Chooser) that uses checkboxes to indicate which to apply instead of deletes.
For those who build your own, I have pushed those changes to my personal github repo here: https://github.com/kevinhendricks/Sigil Fo those who do not, I will try and build both a demo Windows installer and a MacOS (both intel and arm64) version for people to test with. Any feedback on if this change is an improvement or not, welcomed. If generally approved, I will push these changes to Sigil master for the next release. |
![]() |
![]() |
![]() |
#11 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,321
Karma: 168808723
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
The check boxes seem to work okay here after shift-replace all to bring up the filter though select/unselect all was my favourite checkbox.
![]() |
![]() |
![]() |
![]() |
#12 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,593
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Demo Build of Sigil 2.4.0 Beta 1 for Testers
Hi All,
For those interested in this potential feature, I have created builds of Sigil 2.4.0 Beta-1 with this "use checkboxes for the Replacement Chooser/Filter instead of delete" change in place. I have posted these demo builds in my personal github repository here: https://github.com/kevinhendricks/Bu...OnMac/releases They are called: Sigil.app-2.4.0-Beta-1-Mac-arm64.tar.xz Sigil.app-2.4.0-Beta-1-Mac-x86_64.tar.xz and my first ever attempted Windows installer build - made on a Manjaro Linux box running a virtualbox VM of Windows 11. It is named: Sigil-2.4.0-Beta-1-Windows-x64-Setup.exe I would very much love to hear feedback on the success or failure with my first Windows build from anyone who tries it. Then to test the new feature open any epub you have, enable Find and Replace choose All HTML Files, and of course put something in Find and Replace, and when ready use SHIFT (held down) and click on the Replace All button. This should fire up the new Replacement Chooser that uses a CheckBox instead of the older one that made you delete unwanted replacements before applying it. You should be able to do contiguous selections and then use the Enter and/or Return keys to toggle bunches of Checkboxes at will, or double click on a single entry to toggle the current checkbox on or off. Feedback by testers here will determine if this newer Replacement Chooser will replace the older one in our next release. These should be fully useable versions of Sigil 2.4.0 (although Beta). Thanks in advance for any testers! Last edited by KevinH; 12-12-2024 at 01:49 PM. |
![]() |
![]() |
![]() |
#13 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,593
Karma: 5703586
Join Date: Nov 2009
Device: many
|
The lack of any response outside of DNSBs build and tests would seem to indicate little interest in this feature one way or the other.
If no one has a negative opinion in the next week or so, I will just include it in master as it was a requested change that no one seemed to disagree with. |
![]() |
![]() |
![]() |
#14 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 447
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
|
Sorry, I've been busy, actually this is very good for my work in Sigil. I've often spent a lot of time just going through a search one step at a time. I just rebuilt (on Linux) this morning and yes I see the checkboxes, and they work a treat! Thank you!
|
![]() |
![]() |
![]() |
#15 |
Zealot
![]() Posts: 106
Karma: 10
Join Date: Jun 2014
Location: Poland, Żory
Device: Prestigio PER3464B, Onyx Lynx, Lenovo S5000 i Tab4-8"
|
Today I installed version 2.4.0 on Windows 10 22H2 and so far I see no disadvantages, only advantages. The checkboxes work fine. In my opinion, it is worth including the fix in the target version.
Thanks, regards bravosx |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
entity replacements gone haywire | lumpynose | Sigil | 29 | 05-19-2019 08:56 PM |
How many Paperwhite replacements? | tmf2 | Amazon Kindle | 31 | 10-26-2012 10:36 AM |
Touch New home screen replacements | Dopedangel | Barnes & Noble NOOK | 2 | 02-21-2012 12:11 AM |
Android Keyboard replacements | techiem2 | enTourage Archive | 13 | 05-04-2010 07:59 PM |
PRS-300 Any word on battery replacements? | DoctorM | Sony Reader | 3 | 03-21-2010 03:32 PM |