10-28-2021, 06:00 AM | #136 |
Well trained by Cats
Posts: 29,817
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I forget to select all files and have to do it all over. use the Reports tool (results) to smarten the selection Choose Div, and all (only) classes for Div are there to choose from. There would be a time penalty for the first run per Sigil Edit Book Session |
10-28-2021, 09:21 AM | #137 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Saved searches (or default to last run settings) are the only things I'm considering at this point. This plugin was always designed as an interactive, gui program. As such, I have very little interest in adapting it to work "silently" as part of an automation list.
|
Advert | |
|
12-15-2021, 12:11 AM | #138 |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
If I had known earlier about this, such would have saved me much effort. Thank you for this great plugin.
Some possible suggestions if you don't mind. I too would like some of the things mentioned. Other things if not mentioned yet: - would it be possible to someday successively run the plugin without needing to commit and then launch again? As I've only started using it, that's how it seems to behave, e.g. I need to commit and exit, then launch again. If for example I wanted to change all possible span styles such as italic/bold to i/em or b/strong, and remove others, being able to run whatever is needed in one go, I think that'd be easier. - concerning needing to select files to operate on, might an alternative be some file filter as is available with search and replace? Thinking about other possibilities, I do not know if this is a good model, yet on macOS, various apps have adapted its way of creating filters similar to Finder smart folders, Music playlists and so forth. Attached is a screenshot. One can for example create a filter with any and/or criteria such as name, extension, etc. I do not know if such would be useful in general elsewhere such as for search and replace, I think so though I am used to BBEdit. If so, maybe there could be some global filters used by search and replace that plugins such as this could also make use of. Such may also help if one wishes to perform different operations on different files, and then no need to close, select different files, and run again, multiple times if one might need such. Concerning saved searches plus defaulting to last run, such would be very nice someday. Thinking about Sigil in general, perhaps such is contrary to the design goals. I think this, and maybe some other plugins such as convert to EPUB 3, are essential enough to at least some peoples workflow, that becoming part of Sigil itself might be an idea. Maybe not all will find this forum, and the list of plugins, (if it also exists elsewhere), and merely download Sigil. Many may not know about other many useful abilities that maybe could be part of the core app. |
12-16-2021, 02:54 PM | #139 | ||||
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Quote:
Quote:
Quote:
Thanks for your input! |
||||
12-16-2021, 04:47 PM | #140 | ||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
If I'm working from relatively normal code (like HTML out of Finereader), I have lots of Saved Searches like: Code:
<span style="font-style:italic;"> Code:
<span class="italics">
I do a few runs of TagMechanic to swap all:
Cleaning up Ugly Code For stuff like hundreds of random "calibre123" classes, I do something similar. I go through, renaming them to the basic set ("italics", "bold", ...): Code:
<p>This is an <span class="calibre123">italics</span> example and a <span class="calibre456">bold</span> example.</p> Code:
<p>An <span class="italics">italics</span> example and a <span class="bold">bold</span> example.</p> Side Note: I think the next version of Sigil is going to have some help on this front (at least I made KevinH aware of it). You'd be able to Right-Click a class name in your code, and have Sigil rename the class for you. (Calibre currently has this functionality under Right-Click > Rename this class.) That'd be able to accomplish a piece of TagMechanic's helpfulness right there in Sigil's Right-Click menu! Another Trick I Use with Ugly Code Throwing away useless classes. Let's say there's a <span class="calibre1"> that has a transparent background + black text: Code:
<p><span class="calibre1">This</span> <span class="calibre1">is</span> <span class="calibre1">ugly</span> <span class="calibre1">code</span> <span class="calibre1">that</span> <span class="calibre1">does</span> <i class="calibre99">nothing</i>.</p> Search: <span class="calibre1"> Replace: <span> Code:
<p><span>This</span> <span>is</span> <span>ugly</span> <span>code</span> <span>that</span> <span>does</span> <i class="calibre99">nothing</i>.</p> Code:
<p>This is ugly code that does <i class="calibre99">nothing</i>.</p> Then all that's left is a much smaller set of TagMechanic runs: Code:
<p>This is ugly code that does <em>nothing</em>.</p> Side Note: And on some more random tricks/tips on cleaning up messy documents, I discussed a lot of things in this thread: (RbnJrg asked about cleaning up a real CSS disaster.) That topic spawned about a month of me pondering about it + privately discussing lots of potential power tools with KevinH. A lot of that is now discussed in: This will (hopefully) introduce more advanced CSS cleanup/merging... built right into Sigil. Quote:
Sigil's version works based on what files are selected in the Book Browser. A similar "all files" request was definitely discussed many times over the years. (I don't feel like digging up all the posts, but even I mentioned it a few times). ... Anyway, if you want to run across all files by default, I recommend swapping it over to Calibre + Diap's Editing Toolbag. I don't mind using either method, since I'm already going between Sigil/Calibre during various stages of cleanup. Last edited by Tex2002ans; 12-16-2021 at 05:29 PM. |
||
Advert | |
|
12-16-2021, 05:44 PM | #141 |
Well trained by Cats
Posts: 29,817
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Diap
Could you allow it to persist if IT FAILED TO MAKE CHANGES (cuz the stupid user used the wrong tag type or argument. ) |
12-16-2021, 06:02 PM | #142 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
12-17-2021, 02:06 AM | #143 | |
Guru
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
I try to save the file before doing S&R and even more so using this, so if I royally screw up I can just reload the file and try again. |
|
12-17-2021, 05:48 AM | #144 |
Sigil Developer
Posts: 7,654
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Or just use Sigil's Checkpointing tools. Fast, simple, and safe.
|
12-19-2021, 03:26 AM | #145 |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
Concerning the question of Sigil and already being feature-rich, or this not becoming part of Sigil itself, I disagree. Perhaps little I say at the moment will have any effect. I do not ask for what is etymologically termed de-bate, con-vers-ation, discussion, etc. I merely wish to say something, and perhaps from such, the idea might simmer for sometime and someday the concept of what is an EPUB editor may change.
Consider IDEs, the best code editors, or the best text editors. Perhaps Sigil is not such and should not be. Yet much can be learned from such. Or consider the concept of a text document and how various word processors have evolved over the years; even word processors that may not try to do everything, but what is most used by most people while being pleasant to use -- Apple Pages as one example, consider all that such can do. As for modifying tags, I try to think of what might be the simplest, most elegant, and require the least amount of effort. Such is part of what I think of for each and every feature. For the example of a specific tag, consider how one can easily jump to the CSS definition. Imagine if one could perform any number of operations from merely the cursor point and then some menu command or shortcut: rename class or id, modify (as with what this plugin does), transform to header, div, p, etc., or who knows what. Myself, as I am used to perhaps as the (code) editor with the most features, JetBrains IDEs, much is contextual and much is available from shortcut. I do not ask for as much, yet just as one can select text and apply operations such as styling, operating on tags as such I think would be a big step towards ease of use. I understand such may take some larger changes. But perhaps someday. Related, I have not tried to notice if Sigil does such, or if such is available on other platforms. Yet on macOS, one can set the menu enabled state. So if for example the cursor was not in a place where a menu item was usable, one could analyze cursor point, possible actions, and then call the App Delegate and change menu state. If such is useful here, maybe. Such could improve usability, such if focus was in the file list with some file or files selected, some menu options such as split at cursor could be disabled. I was thinking such could be used for perhaps someday more features such as selecting files, and then a menu or shortcut to merge, delete, rename, etc. Much more could be done; much more could be easily accessible. |
12-19-2021, 08:58 AM | #146 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'd prefer this thread be reserved for plugin-specific requests/complaints rather than esoteric musings of what IDE's should (or could) be, or what the future might bring. Nor do I wish to discuss Sigil in the main in this area. Please keep that in mind in the future. After this, I will remove posts that I feel are not relevant to the use of this plugin, or are not specific requests for tweaks/changes. This is not a Ted Talk area.
Perhaps. But it will be done by someone else, in a different plugin. This one is about as feature-complete as it's going to get. |
01-08-2022, 02:39 AM | #147 |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
Diap, no doubt much has been going on so you may not have gotten to it yet. When you have a chance, an update for Qt 6 would be much appreciated.
|
01-08-2022, 01:43 PM | #148 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Wrong thread. You want the calibre plugin. It's nearly ready for calibre's jump to Qt6. Just doing some more testing.
Sigil (and this plugin) will eventually move to Qt6/Pyside6, but there's no need as yet. |
01-08-2022, 01:55 PM | #149 |
Evangelist
Posts: 425
Karma: 77256
Join Date: Sep 2011
Device: none
|
I'm currently using a macOS arm64 build with Qt6/Pyside6 since such was easier to build. but maybe you won't get around to such for a while. I could go back to Qt 5 but maybe sticking with Qt 6 helps with testing.
|
01-08-2022, 02:37 PM | #150 |
Grand Sorcerer
Posts: 27,552
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I have no plan to get my Sigil plugins ready for Qt6 until such time as the roadmap to the official Sigil Qt6 becomes a little clearer. Calibre is moving to Qt6 within months. Sigil's next official release is still going to be Qt5. The Sigil plugin framework's compatibility utilities (to allow plugin devs to easily support both Qt5 Sigil and Qt6 Sigil with the same codebase) has not been finalized yet. That has to happen before I start working on individual Qt-based Sigil plugins.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[FileType Plugin] YVES Bible Plugin | ClashTheBunny | Plugins | 27 | 01-16-2023 01:25 AM |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 492 | 10-25-2022 08:13 AM |
Plugin not customizable: Plugin: HTML Output does not need customization | flyingfoxlee | Conversion | 2 | 02-24-2012 02:24 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |
New Plugin Type Idea: Library Plugin | cgranade | Plugins | 3 | 09-15-2010 12:11 PM |