Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-13-2021, 12:28 PM   #31
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,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:
Originally Posted by BeckyEbook View Post
Ad 1. English names will be the best. translations sometimes change, not complete, etc., so it's asking for trouble. The Automate option is intended for advanced users, so creating "automateXX.txt" script with English names should be OK.

Ad 2. If it is well described in the documentation – a good idea.

Ad 3. Of course, we wait until these dialogs are closed.

Ad 4. Hmmm ... A difficult matter, because in Saved Searches we can do various actions: Find, Replace, Replace/Find, Replace All.

Maybe something as:
* "F&R-Find:GroupNameFromSavedSearches" (calling a search in the whole group, probably quote marks will be necessary)

* "F&R-ReplaceAll:GroupNameFromSavedSearches/Single Sample Replace" (Replace All In Single Search In Saved Searches)

-----

I would add an optional AutomateXX operation report (message box? logfile?):
Code:
Function Name or Plugin Name 1: passed
Function Name or Plugin Name 2: passed
Function Name or Plugin Name 3: passed with errors
Aborted by user
Personally, I built a new version and played around with this option (only plugins so far).
Despite my earlier doubts, it might come in handy for some repetitive operations on each file.

That's why I noticed that I missed a summary/report in which I could see that all the plugins "did their job" without errors. Now I have to look at the statusbar, because it is probably only there that we can see what is going on.

Last edited by KevinH; 08-13-2021 at 12:30 PM.
KevinH is offline   Reply With Quote
Old 08-13-2021, 01:21 PM   #32
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
I still have to think about the "Legacy" version.

Here Material & Fluent.
Attached Images
  
Attached Files
File Type: zip fluent_and_material.zip (6.3 KB, 136 views)
BeckyEbook is online now   Reply With Quote
Advert
Old 08-13-2021, 03:15 PM   #33
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,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by BeckyEbook View Post
I still have to think about the "Legacy" version.

Here Material & Fluent.
Thank You!

I will integrate them tomorrow into master.

KevinH
KevinH is offline   Reply With Quote
Old 08-14-2021, 12:32 PM   #34
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,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:
  • UpdateManifestProperties
  • Save
  • WellFormedCheckEpub
  • MendPrettifyHTML
  • MendHTML
  • ValidateStylesheetsWithW3C
  • RepoCommit (Checkpoint)
  • GenerateNCXGuideFromNav
  • RemoveNCXGuideFromEpub3
  • DeleteUnusedMedia
  • DeleteUnusedStyles
  • StandardizeEpub (Restructure Epub to Sigil Norm)
  • SplitOnSGFSectionMarkers
  • AddCover


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.
KevinH is offline   Reply With Quote
Old 08-14-2021, 12:36 PM   #35
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,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.
KevinH is offline   Reply With Quote
Advert
Old 08-14-2021, 02:43 PM   #36
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by KevinH View Post
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
That routine is great!! Sigil 1.8 will be incredible!
RbnJrg is offline   Reply With Quote
Old 08-14-2021, 05:49 PM   #37
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
If you build your own on Linux, Mac, or Windows, please give master a try and let me know your thoughts.
I just tested this on my Linux machine, and it appears to be working fine.

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
Ideally, the automation tool should check the version number and only execute them, if the current book is an epub3 book.
Doitsu is offline   Reply With Quote
Old 08-14-2021, 09:25 PM   #38
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,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.
KevinH is offline   Reply With Quote
Old 08-14-2021, 09:37 PM   #39
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Quote:
Originally Posted by KevinH View Post
Thanks for testing!


Couldn't users just create separate automate lists for epub2 and epub3?
Sounds workable and fair to me.

Quote:
Originally Posted by KevinH View Post
The limit of 3 automate list could easily be raised to 10 if that would help.
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.
Thasaidon is offline   Reply With Quote
Old 08-15-2021, 12:59 AM   #40
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
1. How should we deal with intl Sigil user/devs in these automate lists if at all?
In other words should we be treating them like shell/bat commands which are all English based like most programming and scripting languages?
I also think that the commands shouldn't be localized.

Quote:
Originally Posted by KevinH View Post
3. How to deal with non-modal dialogs like Search Editor / SpellCheck, Edit TOC, Reports, Edit Metadata, etc? Should we wait until these dialogs are closed by the user before proceeding to the next command in the automate list?
IMHO, it doesn't make sense to automate those tasks anyway.

Quote:
Originally Posted by KevinH View Post
The limit of 3 automate lists could easily be raised to 10 if that would help.
IMHO, 3 automate lists should be more than enough even for professional ebook creators.
Doitsu is offline   Reply With Quote
Old 08-15-2021, 10:52 AM   #41
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,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by Doitsu View Post

Originally Posted by KevinH View Post
3. How to deal with non-modal dialogs like Search Editor / SpellCheck, Edit TOC, Reports, Edit Metadata, etc? Should we wait until these dialogs are closed by the user before proceeding to the next command in the automate list?


IMHO, it doesn't make sense to automate those tasks anyway.
I was wondering about that.

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.
KevinH is offline   Reply With Quote
Old 08-15-2021, 11:13 AM   #42
Binchen
Connoisseur
Binchen began at the beginning.
 
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...
Binchen is offline   Reply With Quote
Old 08-15-2021, 11:23 AM   #43
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,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.
KevinH is offline   Reply With Quote
Old 08-15-2021, 12:07 PM   #44
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
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.
phillipgessert is offline   Reply With Quote
Old 08-18-2021, 03:47 PM   #45
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,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:
  • UpdateManifestProperties
  • Save
  • WellFormedCheckEpub
  • MendPrettifyHTML
  • MendHTML
  • ValidateStylesheetsWithW3C
  • RepoCommit (Checkpoint)
  • GenerateNCXGuideFromNav
  • RemoveNCXGuideFromEpub3
  • DeleteUnusedMedia
  • DeleteUnusedStyles
  • StandardizeEpub (Restructure Epub to Sigil Norm)
  • SplitOnSGFSectionMarkers
  • AddCover
  • GenerateTOC (will create from existing headers without the Heading Editor functionality)
  • CreateHTMLTOC

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.
KevinH is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 02:29 AM.


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