Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-18-2022, 01:06 PM   #46
Mister L
Groupie
Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Posts: 159
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
Quote:
Originally Posted by KevinH View Post
If others are interested:

I am contemplating a Saved Search "Counts Report" button that creates a modal dialog with a table with columns showing:

Test Full Name, Find Regex, Target Files, Count All

for each test in a Saved Search Group, with the option to save the table as a csv file.


This would function as a Count Report for anything you wanted such as table tags, ordered lists, unordered lists, or anything you can create a regex for.

If people are interested in seeing something like this added to Sigil for the next release, please let me know.
Yes please, that would be brilliant.

I would also get a lot of use out of these other proposed features in particular, especially the search excluding tags (even if it can be done with regex, that would be a lot easier):

Quote:
Originally Posted by KevinH View Post
  • Make search and replace of text be handled in text only (excluding tags) (dev team) But note this can be done now via regex now:
    - using this regex prefix before the text to find: <[^<>]*>(*SKIP)(*F)|
    or
    - this regex postfix after the text to find: (?=[^>]*<)
  • Add GetInfo dialog to BookBrowser to add/change Semantics and Manifest Properties on a File (dev team)
  • Add CSSToolbox and GUI to help users create, manipulate, and merge multiple css stylesheets/selectors (@Tex2002ans)
    • merge selectors across separate css stylesheets
    • delete selectors from a stylesheet
    • strip out a set of properties across all selectors and stylesheets
    • compare two selector property lists to find matching selectors across stylesheets
Thank you again for all the amazing work you do I don't know what I would do without Sigil. The new search features are brilliant, very glad you managed to get the bugs sorted out before losing completely your sanity (now to retrain my muscle memory to stop clicking on "restart" when I want "replace/find" ).
Mister L is offline   Reply With Quote
Old 03-19-2022, 10:02 AM   #47
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Okay, I took a shot at implementing a Saved Search "Counts Report" feature. It seems to work fine in my limited testing. But it may need some additional polish.

I have pushed this to master and some version of it will appear in the next release.

If anyone builds from source, I would love to hear feedback on this new feature.

This ticks the Report capability request and the request to see Saved Search Group counts for each saved search in a search group. Therefore I have now removed that item from the potential "To-Do" list in the first post of this thread.

Last edited by KevinH; 03-19-2022 at 10:53 AM.
KevinH is offline   Reply With Quote
Advert
Old 03-19-2022, 12:24 PM   #48
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Do not bother with that patch.

Based on my own testing I added a QTimer singleShot to delay the BookBrowser focus setting so that it always happens last. This has been pushed to master and will appear in the next release.

So if you do want to check that it works for you, please grab and build current master.

Hope this helps.


Quote:
Originally Posted by democrite View Post
Kevin,

Apologies as I haven’t had a chance to try the patch. I was looking around a bit about focus lost on refresh. A few posts might help. This is one though I’m not sure if that works or is the best method. Maybe handling it in the function that does renames? Some event listener?

https://stackoverflow.com/questions/...fresh/24716251
KevinH is offline   Reply With Quote
Old 03-19-2022, 06:20 PM   #49
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: 425
Karma: 77256
Join Date: Sep 2011
Device: none
Thank you very much.

I had only a brief chance to test the previous patch. It seemed to not do much but wanted to test more before reporting.

The new build indeed seems to work with a single rename; perhaps that was the intention as you mentioned.

If you don't feel like it at the moment, or if the approach doesn't come to you, no prob. If someday batch renames of any number can also keep keyboard focus, I just ask to please keep such in mind. Not sure what might be the right way. Maybe whatever else might remove focus, perhaps helpful in other cases too, that where such occurs focused pane is kept track of and then restored?
democrite is offline   Reply With Quote
Old 03-19-2022, 07:03 PM   #50
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Sorry but that will not happen. It just leads to more focus issues in general.

And, fwiw, why is keeping focus on BookBrowser important at all after batch renames? You have to click to multi-select anyway and clicking establishes the focus immediately.

I can understand the need to keep focus when doing a sequence of single renames in a row (what that last change was for) so your hands never have to leave the keyboard. That at least makes some sense.
KevinH is offline   Reply With Quote
Advert
Old 03-19-2022, 08:25 PM   #51
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: 425
Karma: 77256
Join Date: Sep 2011
Device: none
Hands never leaving the keyboard same for batch renames. E.g. select some section of files like front matter, rename, select next set such as chapters or section, rename, repeat.

Renaming all xhtml and having them display in order elsewhere like in Finder helps a lot. Such as for the moment I use sed for particular batch operations.

Unfortunate. Maybe someday you’ll change your mind or think of some nice way. Thanks for trying.
democrite is offline   Reply With Quote
Old 03-19-2022, 11:33 PM   #52
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Why on earth would you need the file names to show up in Finder in the same order as they are listed in the spine? The spine order determines everything, not the file names themselves.

Even given your unique work flow to edit files outside in unzipped epub folders, why rename files? Sed and most command line tools can work on files in any order.

I know of no one else that renames files to force a filesystem to show them in spine order.

So, please ... if want to make suggestions, focus on things that general users (many people) might need, not things specific to your unique workflow.
KevinH is offline   Reply With Quote
Old 03-20-2022, 03:42 AM   #53
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: 425
Karma: 77256
Join Date: Sep 2011
Device: none
Regardless of that, many I think may do multiple batch renames or re-renames, or even one and then wish to keep keyboard focus. The specific reasons I mentioned I think are not relevant. I wouldn't have mentioned such if I thought it was useful only to me.

Last edited by democrite; 03-20-2022 at 03:48 AM.
democrite is offline   Reply With Quote
Old 03-21-2022, 10:34 AM   #54
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Thoughts on: Add GetInfo dialog for BookBrowser

I wanted to collect some feedback on the following potential new feature:

Add GetInfo dialog for BookBrowser

The idea is to add a "Get Info" pop-up (right-clicked) menu item to BookBrowser that when a file is selected and this menu is used the following information is collected and displayed in a dialog:

- Full File Name and Book Path
- Media Type
- File Size in Bytes
- Manifest Properties (EPUB3 only)
- Primary Semantic Property
- Additional Semantic Properties (with 'id" assigned for each)
- Linked Resources
- Well-Formed Status [Yes, No, or NA]


* The manifest properties would be shown as a multiple selection pulldown so that I user can manually set/change these properties if they so desire

* The Primary Semantic Property will show the current file level Landmark semantics set and provide a button to add/remove/change them

* The Additional Semantic Property will show any intra-file related semantics/landmarks set with associated IDs. Currently, Sigil does not have a gui way to set multiple landmarks for the same file based on ids.

* The Linked Resources will list a link to each separate resources linked somehow to this file and the media type.

For xhtml files this would include xhtml images, css stylesheets, javascripts, videos, audios directly linked.

For css files this would include other css files, image files, font files, and which xhtml files include it.

For an image, audio, or video file, it would include where it is directly linked from. Same would hold for a javascript file.

---

So given the above, do you think this would be a useful addition to Sigil?

What if anything would you add or remove to make it more useful or better?

Please remember, this feature is not meant to replace the various Reports which can do some of this now.

All Ideas, Thoughts, and Suggestions on this potential feature welcomed.
KevinH is offline   Reply With Quote
Old 03-21-2022, 12:30 PM   #55
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: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Thoughts on Python Function Replacement

I also have a question about the value of the request to add python function replace? Who actually uses this feature in calibre to write their own python routines for anything else other than numbering things?

Things like changing case can already be done, and smart quotes conversion is better done in plugin settings.

As for numbering why could we not just include the match count as an additional subcapture pattern value allowing the user to reference it in any replacement. Or alternatively just create a plugin that does heading renumbering. A heading renumberer plugin would be the most flexible if you allow the a regex to determine what you are numbering.

What else are people actually using it for that would not be handled better by a plugin.

Having a general user write their own replacement functions in python, edit them, debug them, compile them to bytecode, add and delete them, etc is a lot of overhead and code bloat for just numbering things.

So is this still needed assuming we added a general renumbering plugin controlled by a regex?

Last edited by KevinH; 03-22-2022 at 11:09 AM.
KevinH is offline   Reply With Quote
Old 03-22-2022, 06:40 PM   #56
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: 425
Karma: 77256
Join Date: Sep 2011
Device: none
GetInfo unsure what I think but I’ll think about it more. Perhaps a panel instead similar to toc?

One other thing about BookBrowser. Occasionally I work with EPUBs with hundreds of xhtml files. In such cases I may want to use regex rename on some set but selecting them, sometimes many, within a long list is some effort.

Perhaps in other cases, others may want to quickly work with or find some set of files. Perhaps BookBrowser could have some optimal filter control such that for example a flat list of search results could be shown?

It’s not uncommon for editors or IDEs with some file pane to be able to filter. I think it’d be a nice addition.

Minor note. For plugin runs, possible to keep same file selection afterwards? For example with TagMechanic, easier to rerun if selected files remain. If other plugins make use of such, then it could be helpful for successive plugin runs.
democrite is offline   Reply With Quote
Old 03-22-2022, 08:02 PM   #57
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by democrite View Post
GetInfo unsure what I think but I’ll think about it more. Perhaps a panel instead similar to toc?
We already have too many dock widgets in my opinion. And Book Browser is the heart and soul of things. Filtering what it shows is not likely to happen.

Last edited by DiapDealer; 03-22-2022 at 08:07 PM.
DiapDealer is offline   Reply With Quote
Old 03-22-2022, 09:02 PM   #58
The_book
Zealot
The_book began at the beginning.
 
Posts: 100
Karma: 10
Join Date: Aug 2019
Device: none
Quote:
Originally Posted by KevinH View Post
I also have a question about the value of the request to add python function replace? Who actually uses this feature in calibre to write their own python routines for anything else other than numbering things?

Things like changing case can already be done, and smart quotes conversion is better done in plugin settings.

As for numbering why could we not just include the match count as an additional subcapture pattern value allowing the user to reference it in any replacement. Or alternatively just create a plugin that does heading renumbering. A heading renumberer plugin would be the most flexible if you allow the a regex to determine what you are numbering.

What else are people actually using it for that would not be handled better by a plugin.

Having a general user write their own replacement functions in python, edit them, debug them, compile them to bytecode, add and delete them, etc is a lot of overhead and code bloat for just numbering things.

So is this still needed assuming we added a general renumbering plugin controlled by a regex?
I use it in there ways.
1. I use it to Print all matchs, then I can check do I need to improve my regex. I also use Set to combine the same matchs.
2. I use it in match some <span> tag. Maybe because I'm not very familiar with regular expressions, I can not find a good way to match the close tag in html like this.
<span><span class="..." style="..."><span><span></span></span><span></span></span></span>
So I match all, and parse it in Python.
3. I use it to match condition like class="1 2 3 4" class="3 5 2 1" class="2 6 1 3". They must have 1,2,3, but order is not imortant.
The_book is offline   Reply With Quote
Old 03-22-2022, 10:20 PM   #59
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by The_book View Post
Maybe because I'm not very familiar with regular expressions, I can not find a good way to match the close tag in html like this.
<span><span class="..." style="..."><span><span></span></span><span></span></span></span>
Examples like that are precisely what inspired me to write my TagMechanic plugin.

Quote:
Originally Posted by The_book View Post
So I match all, and parse it in Python.
I get why a few find it handy. It just seems to me that the number of users who would know enough Python to successfully use it, but not enough Python to create their own plugin to do the same thing, would be relatively small.

I was excited about the idea of a Python function Replace feature myself at first. But then my excitement waned when I couldn't find all that many practical uses for it.

I'm not opposed to the feature. I'm just not convinced it would be widely used.

Last edited by DiapDealer; 03-23-2022 at 06:53 AM.
DiapDealer is offline   Reply With Quote
Old 03-23-2022, 01:12 AM   #60
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by KevinH View Post
As for numbering why could we not just include the match count as an additional subcapture pattern value allowing the user to reference it in any replacement. Or alternatively just create a plugin that does heading renumbering. A heading renumberer plugin would be the most flexible if you allow the a regex to determine what you are numbering.
IMHO, my AddIDs plugin should cover most use cases and doesn't require any regex skills.
Doitsu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible To-Do List for Future Sigil Releases Post Sigil 1.8 KevinH Sigil 143 02-05-2022 12:08 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


All times are GMT -4. The time now is 04:15 PM.


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