08-13-2021, 12:28 PM | #31 | |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
All Good Points.
Perhaps, as you suggest instead of relying only on ShowMessageOnStatus bar to report things back, we do the following: - when automate is first called we open a non-modal dialog with a log window and a cancel button - show the progress and results of the automate list step by step. Sort of like the log window we generate for plugins. But that will really clutter up the screen with more windows such as a non-modal dialog window plus lots of plugin related dialogs and output. A better and simpler approach might be to modify the ShowMessageOnStatusBar routine to to append things to an automate log file as long as m_UsingAutomate is true. Then once the automate list stops, a read only dialog of all the ShowStatusBarMessages is displayed with a OK button to continue. Sort of like the RepoManager logs. This will all take some thinking and depends on developing a way to know if any non-modal dialog is closed or hidden so that automate operations can effectively block until those dialogs are complete. Thanks! KevinH Quote:
Last edited by KevinH; 08-13-2021 at 12:30 PM. |
|
08-13-2021, 01:21 PM | #32 |
Guru
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
|
I still have to think about the "Legacy" version.
Here Material & Fluent. |
Advert | |
|
08-13-2021, 03:15 PM | #33 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
|
08-14-2021, 12:32 PM | #34 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Okay support has been pushed for the following to master:
- BeckyEbook's fluent and material icons - Support for a Automate Log - Fixed Validation Results to properly report when No Problems Found - Added support for the following C++ MainWindow tools:
Still no support for any non-modal dialog based tools such as SpellCheck, Saved Searches, Reports, EditTOC, EditMetadata but even without them this proof of concept should hopefully prove useful enough for serious users/devs to make use of. For example the equivalent of a Publish button for Epub3 should now be possible: Contents of automate01.txt Code:
# start with Checkpoint save to prevent any data loss RepoCommit # run a basic well-formed test before running any advanced tools WellFormedCheckEpub # prettify any code and fix any remaining html errors MendPrettifyHTML # clean up DeleteUnusedMedia DeleteUnusedStyles # make sure styles are valid ValidateStylesheetsWithW3C # make en epub3 that works with epub2 only readers GenerateNCXGuideFromNav #RemoveNCXGuideFromEpub3 UpdateManifestProperties EpubCheck Save Last edited by KevinH; 08-14-2021 at 12:37 PM. |
08-14-2021, 12:36 PM | #35 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
If you build you own on Linux, Mac, or Windows, please give master a try and let me know your thoughts.
If it looks useable, we can use deploy to create both Windows and macOS builds that we can make available to serious users and testers for more feedback. If this turns out to not really be useful, we can simply strip it out easily enough. |
Advert | |
|
08-14-2021, 02:43 PM | #36 | |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
|
|
08-14-2021, 05:49 PM | #37 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
I only have one minor nitpick: the automation script will fail, if the automation list contains actions that can't be selected for epub2 books. For example: Code:
GenerateNCXGuideFromNav RemoveNCXGuideFromEpub3 UpdateManifestProperties |
|
08-14-2021, 09:25 PM | #38 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Thanks for testing!
Those tools are for epub3 only and should fail on epub2 in my opinion. Just like there are plugins like flightcrew (and other plugins like ePub3-itizer) that work only on epub2 and should fail on epub3. I don't even have a way for epub version specific plugins to identify themselves so checking epub version before running a command/plugin would not be straightforward. Couldn't users just create separate automate lists for epub2 and epub3? The limit of 3 automate list could easily be raised to 10 if that would help. |
08-14-2021, 09:37 PM | #39 | |
Hedge Wizard
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
Quote:
Three lists would probably be enough for me but if people regularly work with both wpub2 and epub3 it might be useful to have a few more lists. |
|
08-15-2021, 12:59 AM | #40 | ||
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Quote:
IMHO, 3 automate lists should be more than enough even for professional ebook creators. |
||
08-15-2021, 10:52 AM | #41 | |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Quote:
The only advantage I could see to supporting dialog based tools is to have an automate list end with one of those but not wait for completion as using any of them requires significant user interaction. I did some looking and EditMetadata, Generate Table of Contents, and Edit Table of Contents appear to be fully modal so progress will block until they are closed anyway. And Create HTML Table of Contents, Spellcheck, Saved Searches (F&R) and Reports are fully non-modal (progress will not block unless we wait for them to close) and you can leave them to edit inside the ebook at will using other Sigil features. Furthermore, closing them is not needed to signify you are done with them as they may remain open until you use them next. So it is a big question as to what value automating these dialog based tools would be anyway outside of ending in one of them to save a single keystroke shortcut, icon press, or menu click. Given how flexible plugins are a lot of more complex conditionalized changes can be made including very advanced replacements in a plugin if needed. So how in general do we deal with these dialog tools that require lots of input from the user itself to happen? Do we try to automate them and if so to what benefit? Are they even needed given that plugins and saved searches on groups can be done and run easily with just a few clicks/keystrokes/icons. Open to any thoughts as to if/why they should be supported and how they will benefit people specifically. I am starting to agree with Doitsu does here but would like to hear from others as well. Last edited by KevinH; 08-15-2021 at 11:11 AM. |
|
08-15-2021, 11:13 AM | #42 |
Connoisseur
Posts: 57
Karma: 10
Join Date: Jul 2021
Device: Abakus
|
Enhance the plugin category from edit/validate/output? Or only plugins which are for validating can be automated?
Just a quick idea... |
08-15-2021, 11:23 AM | #43 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Plugin validation can be epub version specific as well. All plugins are already supported. The question was about the Sigil built-in C++ tools that are Dialog based tools.
|
08-15-2021, 12:07 PM | #44 |
Addict
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
|
I earlier wondered if it would be feasible (or even possible) to optionally set some sort of “auto-confirm” on some of these that wait for input. I stopped myself suggesting it because I realize that’s kind of a risky option to unleash. Personally I’d find it handy.
And I agree that ten automations does sound like a lot, though I could see some benefit wrt folks that might like their automations a little more bite-sized. |
08-18-2021, 03:47 PM | #45 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
The following automation changes have been made:
- Epub3 only C++ tools will now succeed but with a log message that they were skipped when run on epub2. Hopefully this will make just 3 automation lists more feasible. - I have extended the list of known C++ MainWindow Command Line tools with "GenerateTOC", and "CreateHTMLTOC" and have made the "GenerateTOC" automate routine skip the Heading Selector dialog. The full list of C++ MainWindow Tools supported in master is now:
I have also modified the PluginRunner but this impacts macOS users of input plugins only. On macOS input plugins always opened a new Window which would break automation. Now macOS will replace the current book with the one from the input plugin in the same window just as Linux and Windows has always done. This is now similar to how we have implemented Restore from Checkpoint on macOS. All of this was just pushed to master. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Feature requested for Sigil 1.7 | RbnJrg | Sigil | 23 | 08-06-2021 08:44 AM |
Feature Requests for Adding Books | toomuchreading | Library Management | 5 | 03-17-2015 03:15 PM |
Parity feature with Sigil | roger64 | Editor | 8 | 03-17-2014 11:28 AM |
New to "Read in Store" feature: Limited Selection | negris123 | Barnes & Noble NOOK | 4 | 06-09-2011 01:08 PM |
New Inkmesh Feature: Limited Time Free Ebooks | anurag | News | 11 | 02-25-2010 02:43 PM |