![]() |
#1 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
Possible To-Do List for Future Sigil Releases Post Sigil 1.8
For those interested ...
Here is a list of possible To-Do items for future Sigil releases. Under consideration for future Sigil releases
If you have other ideas that you feel would benefit MANY users that would NOT be better as plugins, please let us know. FYI: Based on ideas from Tex2002ans, over the last month or so I have been working offline of a CSSToolbox codebase to act as the backbone for a GUI tool to:
Last edited by KevinH; 10-25-2021 at 06:34 PM. |
![]() |
![]() |
![]() |
#2 | |||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
![]() ![]() Quote:
Quote:
You do bad Accessibility? You don't get access to the amazing TOC Generator! ![]() (Same with Word or LibreOffice's Table of Contents. Don't use Headings properly? Now you can't easily jump around your documents or generate page numbers.) Maybe it nudges people to create better code. I could see this MAYBE being helpful if you wanted to point to a Copyright Page, Title Page, etc., without necessarily having a heading inside. But that's what I use Tools > Table of Contents > Edit Table of Contents for. What were the example use-cases being given? Quote:
![]() And to go into more detail on the CSS tools: These will help you catch and merge exact/similar CSS: Exact match: Code:
.normal { font-size: 1em; } [...] .class98 { font-size: 1em; } Code:
.normal {
font-size: 1em;
}
[...]
.class99 {
font-size: 1.1em;
}
Code:
.normal {
font-size: 1em;
}
[...]
.class100 {
font-size: 1em;
color: black;
}
Before: Spoiler:
After: Spoiler:
Very very helpful when working from not-so-clean documents. Quote:
Saved Searches: Count All In Saved Searches, when you press "Count All" on a Group, Sigil just gives you the total # of hits. Would be nice to get a list of # hits per Saved Search: Code:
Name | # Hits _______________|______________ Group #1 | - Search 1 | 5 - Search 2 | 4 - Search 3 | 0 _______________|______________ Total | 9 Example: I have large groups I run together, like my 12-step "Finereader Cleanup". Getting a breakdown, I could know things like:
Right now, I run all 12 steps, thousands of hits total, but some important replaces may only get 0/1 hits. Side Note: Maybe show this window after a Group "Replace All" too? Or this might get too annoying? * * * And this one, we privately discussed a month ago, but I recently formatted my PMs a little nicer + detailed some use-cases. Here's a little more: Advanced Find/Replace (List-Based) You'd have a Spellcheck List-type menu with:
and 3 sortable columns:
You'd be able to visually see, at a glance, all hits on your searches. Like this regex could "find all Dialogue Tags within a fiction book" + replace with "said": Find: ,” \b(Alex|Bob|Joanne|Suzie|s*he|they)\b (\w+) Replace: ,” \1 said Filter: Code:
Found | Replace | Hits ___________________|________________|______ ,” Alex opined | ,” Alex said | 10 ,” Suzie accused | ,” Suzie said | 9 ,” Joanne agreed | ,” Joanne said | 4 ,” Alex explained | ,” Alex said | 2 ,” Alex ejaculated | ,” Alex said | 1 ,” she beseeched | ,” she said | 1 Filter: Alex Code:
Found | Replace | Hits ___________________|________________|______ ,” Alex opined | ,” Alex said | 10 ,” Alex explained | ,” Alex said | 2 ,” Alex ejaculated | ,” Alex said | 1 Code:
Found | Replace | Hits ___________________|________________|______ ,” Alex opined | | 10 ,” Alex explained | | 2 ,” Alex ejaculated | ,” Alex said | 1 Code:
v Found | Replace | Hits ___________________|________________|______ ,” Alex ejaculated | ,” Alex said | 1 ,” Alex explained | | 2 ,” Alex opined | | 10 With the current Find/Replace methods, you have to go through the entire book and:
Although in many real-life cases, you're also dealing with:
I also believe list form would also help when dealing with complicated regex, because you could visually see before/after without applying. Example regex: UPPERCASE -> <span class="smallcaps"> Search: (*UCP)([[:upper:]])([[:upper:]]{2,}) Replace: <span class="smallcaps">\1\L\2\E</span> Filter: Code:
Found | Replace | Hits ________|_______________________________________|______ BC | <span class="smallcaps">Bc</span> | 100 AD | <span class="smallcaps">Ad</span> | 47 FIGURE | <span class="smallcaps">Figure</span> | 10 ALEX | <span class="smallcaps">Alex</span> | 2 CIA | <span class="smallcaps">Cia</span> | 1 FBI | <span class="smallcaps">Fbi</span> | 1 USA | <span class="smallcaps">Usa</span> | 1 Code:
Found | Replace | Hits ________|_______________________________________|______ BC | | 100 AD | | 47 FIGURE | <span class="smallcaps">Figure</span> | 10 ALEX | <span class="smallcaps">Alex</span> | 2 CIA | | 1 FBI | | 1 USA | | 1
With the list form, you can see patterns, double-check, then selectively apply Replaces (or Replace All just like now... just with more information at your fingertips). Last edited by Tex2002ans; 10-25-2021 at 08:44 PM. |
|||||
![]() |
![]() |
Advert | |
|
![]() |
#3 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,295
Karma: 20171067
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Is it possible to incorporate something similar to Calibre's "regex-function" in the find/replace. It seems to add a huge range of options without requiring individual plugins.
The option I have my eye on right now is being able to use a find/replace to convert strings to different case types (eg Sentence case, or Title Case - yes I know you can already do lower or upper case). Thanks! |
![]() |
![]() |
![]() |
#4 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
Quote:
The new re library is just to update to a rewritten version 2 of the pcre library from version 1 that Sigil uses. That is internal but that change should be invisible to end users. Add a GetInfo box to BookBrowser would add a menu item to BookBrowser to pop up a Dialog showing the semantics set on that file, manifest properties set on that file, file media type, file size , etc. It would allow the user to add multiple semantics to the same file (by id) , and easily change the files manifest properties. Based on MacOS GetInfo dialog in many ways, except for epub files. |
|
![]() |
![]() |
![]() |
#5 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
I thought about that previously, but based on earlier feedback by others, it does not appear to be an often used feature outside of the built-in case provided by calibre. To make it useful you need to pass along storage to act as its memory and a whole bunch of internal environment info, which would be a pain to add and keep, given how easy a basic plugin can be written.
And uppercasing/lowercasing single letters in words is doable with regex right now so a regex function should not be needed to handle that and of course doing this in a plugin is easy as well. But I am open to adding it, if others feel it is an important and often used feature. I just do not want add features just to duplicate what can be done now in calibre via writing python regex functions and in Sigil by writing and running a plugin. Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
@Tex2002ans, (got it right that time!)
I will think about how best to get some kind of count info for each saved search item collected and presented to the user. Perhaps a CountAll SavedSearch function for Automate Lists and log file like in Automate Lists could be used. Alternatively building up a table of results from doing the equivalent of a Find All and just reporting back each and every result of where the find was matched might be useful. Sorting that would give count info easily enough. I will think more on it when I have finished the "CSS Munger" tool project and can see if it is doable and useful or not. Last edited by KevinH; 10-26-2021 at 10:13 AM. |
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73
Karma: 11638
Join Date: Aug 2010
Location: Spain
Device: iPad, Kindle Paperwhite, Kobo Libra 2
|
FWIW this is the stuff I wonder about.
The newly introduced feature of "Automation Lists", how do you see it evolving? I'd like for it to have more Sigil commands exposed such as being able to rename and add files (A suggestion for the User Guide would be a section on valid parameters for the commands). Use of variables as parameters if not already possible should be welcome. A minor petition, many times I end up with 20 xhtml tabs and 1 style sheet -lost somewhere- open. I can close "All other tabs" but I would like to have another option of closing "All other XHTML" tabs so I can keep the tab I am working on and don't lose the style sheet. Saved Searches, if you run a search from the top of a group it will stop in the first subentry that has a match and it won't move forward unless you do the replacement. I'd like it to continue with the rest of matches in all the entries. Code Folding. I'd like to be able to close/hide entire sections of the code, so I can get a clearer view of the structure of the page. Ideally I'd like to be able to also basically hide all text and have a "tag-only" view. I believe that would help me understand the pattern of usage of CSS classes and help refine any S&R. |
![]() |
![]() |
![]() |
#8 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
For automate lists, I honestly do not see it evolving much at all. You can do most of what you want in plugins and plugins can be run from the Automate Lists right now. So there is no real need to extend the parameters of the list just to effectively create our own scripting language when python in plugins works just fine and is an established scripting language.
So plan to write python plugins that do the more specialized things you want and then add them to your Automate Lists. As for renaming files, that can be done with the RERenamer now or via BookBrowser. There is only one valid parameter and it is used on one tool command only that runs saved searches. It is the full name to the saved search. It is covered in the User Guide chapter. So no variables, no macros, and no new scripting language. Use custom plugins and python for that and add them to your automate lists. As for saved searches, if you do no replacement then you are changing nothing. Effectively you end up with a Find All without replacement. Just use that and Find Next (unless you are asking for something similar to what Tex2002ans is suggesting above). Or am I misunderstanding you? Sorry, Code Folding was proposed earlier and it is not going to be added as it makes the more specialized things we do in CodeView editor (with positional tag listing) much harder. As alternatives: - use "Open With" and select an external editor that supports Code Folding. - use Mend and Prettify to indent and clean up the code and enable tag pair highlighting to help you see structure. - use Preview's Inspector tool to see a code folded version of the xhtml being edited in CodeView and even see the exact computed styles for any tag and where they come from. As for "close other xhtml tabs", you do know you can close all other tabs and then right click on any class attribute and select GoToLinkOrStyle and Sigil will happily open the correct Stylesheet in a new tab. Thanks for your improvement suggestions. KevinH Quote:
Last edited by KevinH; 10-26-2021 at 06:54 PM. |
|
![]() |
![]() |
![]() |
#9 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73
Karma: 11638
Join Date: Aug 2010
Location: Spain
Device: iPad, Kindle Paperwhite, Kobo Libra 2
|
Quote:
"GoToLinkOrStyle" that option I always ignored ![]() Regarding saved searches it is something like this. Group 1
I choose "Group1" "Search", the first match is in "Child2" (say 1 match) but I don't want to replace this match so I click "Search" again and it will again match Child2 expression instead of continuing to whatever matches can be on Child3 to 5. Basically searching a whole group has a hard stop at the first subentry that has a match and won't move forward. In the case of searching a group I want the "Search" button to not be limited to cycle between one subentry findings but cycle into all the matches for all the subentries. |
|
![]() |
![]() |
![]() |
#10 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
It is a sequential search. It will search for a match for child1 in each xhtml file until none can be found, then move on to child2, and then rinse and repeat.
I think what you want is the ability to ignore a match made for child1, and then go on to find other child1 matches? Or do you want to abort child1, and move on to child2 immediately (effectively skipping all remaining searches for child1)? |
![]() |
![]() |
![]() |
#11 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73
Karma: 11638
Join Date: Aug 2010
Location: Spain
Device: iPad, Kindle Paperwhite, Kobo Libra 2
|
A sequential search would be OK. I talk about having a flat match space between all childs. As an example I have right now in a book.
Group Code Cleaning --> Count Matches (returns 531) SubExp 1: id & comments (1 match) ..... .... SubExp 11: <em> (525 matches) I click on "Search" in the group and it matches SubExp1 only result. I click on Search again and it stays in the same match while the status bar in Saved Searches shows (Loaded: SubExp1). It only works sequentially between childs if yoiu replace all the matches from the previous childs In my view once I click Search on the Code Cleaning group the full 531 matches should cycle as if they were the results of a single search in the book window. The status bar in the Saved Searches window should still display which child search are you currently running. If a small screen recording could illustrate better what I mean let me know. |
![]() |
![]() |
![]() |
#12 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
So it is not an "ignore" button then? You may be asking for something similar to what Tex2002ans is asking. I am still not sure so a short video would definitely help.
Just so that you and others better understand searching and replacement inside Sigil: Searching a group is not a single result set (ie. it is not a database-like search result set). It always sequentially finds each term in each xhtml file (also sequentially) and either counts them or does a replacement. In replacement mode, it will sequentially replace that item and then start looking from there for the next match. If you decide not to replace, the cursor is not updated and so I think it is re-finding the same match. Moving the cursor forward one character before find next should skip to the next match in that same child (which is what my proposed ignore button would do under the hood). Viewing it like a flat set is not easy as any replacement earlier in a file (or lack thereof) will invalidate all match positional information later in that same file as characters are added or removed from that string / file. This is especially true for the next child in the search group as earlier and later children positional information will be invalidated. That is why children are searched for sequentially in a string/file and a single match at a time. For a single child search in a single file you can build up a file change set and sort them by starting position and apply the changes in reverse order to the file to prevent invalidating other results for that search term in that one file. But this is not possible for other search term replacements from a search group as they may actually overlap or build upon each other by design. In fact with a sequence of regular expressions you can use the first to identify things and mark them and then use the second to examine the resulting marks to decide which to update and change and then in the third clean up any leftover markers generated by the first but not handled by the second. This must be done sequentially but it allows for very very complex conditions in regular expressions to be broken down unto a sequence of much simpler to follow regular expressions. So yes, please show a short video of what is wrong and what you want it to do given the above. Thanks, KevinH |
![]() |
![]() |
![]() |
#13 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
@Coleccionista
Okay, I have been playing with the Saved Search Editor using the Load Search button to load Find and Replace and to try to use the Search Editor Find, Replace, and Replace/Find and Replace All buttons directly. I think I can recreate what you are seeing. I think without using ReplaceAll the first group search child term is searched for and when the search cursor reaches the end it is never reset for the second group search child. The reset only happens if a replacement is made. So I think this is a bug actually. It just never hits for ReplaceAll, it only hits when no replacement is done. I will look into fixing this for the next release. Last edited by KevinH; 10-27-2021 at 06:43 PM. |
![]() |
![]() |
![]() |
#14 | |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2021
Device: Abakus
|
Quote:
a) The are not build for that (being fed from another source than the user) b) there is no communication from sigil to the plugin I'm dreaming of a list of key/value pairs an automated list can send to a plugin. And of course the plugin needs to able to recognize this and than is interpreting the key value pairs instead of displaying a gui. |
|
![]() |
![]() |
![]() |
#15 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
Quote:
There is no requirement for a plugin to use a gui and a plugin does support its own preferences to "remember" things. The plugin console and the plugin iself can autostart and auto close as determined by the plugin xml file. And since plugins are open source, you can easily adapt or change any existing plugin to remove its GUI and hard code its functionality or change it to be based on a settings file you write or control. Exactly what would your list of key value pairs entail and how specifically (with examples) would this be helpful given the above? Last edited by KevinH; 10-28-2021 at 07:31 AM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
New Policy on Translations Included with Sigil Releases | KevinH | Sigil | 2 | 01-29-2025 12:25 PM |
Icon Redesign for future 1.0 Release of Sigil | shorshe | Sigil | 38 | 06-06-2016 11:29 PM |
Sigil on Nook vs Sigil on Kobo vs Sigil on iBook | rosshalde | Sigil | 12 | 11-13-2014 09:34 AM |
Sigil’s Future Direction (Post 0.4.x) | user_none | Sigil | 90 | 10-11-2011 03:28 PM |
Sigil's Future | crutledge | Sigil | 36 | 07-26-2011 06:02 PM |