08-04-2021, 03:28 PM | #1 |
Sigil Developer
Posts: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
|
A thread to collect and focus the conversation about the possibility of adding a limited automate feature to run a list of plugins plus some limited Main Window tools in sequence.
-- snip -- If it helps ... I am still thinking about adding a green publish button that will automate a number of user selected tasks that could/would include running Update Manifest Properties. Either way is is just a single menu item or key shortcut so feel free to run it whenever you want, but forcing it to run anytime before the final save is just a waste. Last edited by KevinH; 08-21-2021 at 01:59 PM. Reason: Extract Automate posts into one place for ease of access |
08-04-2021, 04:41 PM | #2 |
Addict
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
|
Assuming I understand this correctly, I'd love this feature and the idea of it is pretty exciting.
|
Advert | |
|
08-05-2021, 11:36 AM | #3 | |
Sigil Developer
Posts: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Quote:
When "publish" gets pushed, the checked "activities" will be run one by one stopping at the first failure with a Message Box allowing telling the user what failed. My problem is what activities to include and it what order. This list would need to include plugins obviously so devs can write their own plugins or use others plugins as part of this process. So some things for the list not in any particular order: - run multi-language spellcheck dialog - run basic well-formed check - run Mend - run Prettify - update manifest properties - validate stylesheets via w3c - run epubcheck - run flightcrew - run a specific saved search list - do a file save - create a checkpoint - run FolderOut - open metadata editor - generate NCX/Guide for epub2 only readers - delete unused media - delete unused css selectors - generate reports - run AccessAide to improve Accessibility - run ePub3-itizer - open current epub in ReadiumReader - open current epub in EpubJSReader - open current epub in BibiReader - run other user plugin 1 - run other user plugin 2 - run other user plugin 3 So as you can see the list is already long and we would still need to add other things and then figure out how to allow the user to: - specify the exact list they want to work with - change the order of their activities - add and remove activities So a lot more thought and planning will need to go into this type of feature. I was hoping to add it for a Sigil 2.0 release so we still have time. I would like people's thoughts on how best to handle all of this as simply as possible that still provides something useful. If anyone has any thoughts they would like to share please do. Last edited by KevinH; 08-05-2021 at 11:39 AM. |
|
08-05-2021, 02:03 PM | #4 |
Addict
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
|
Running a bunch of plugins in order alone would be pretty amazing. Automating that, maybe the TOC/metadata stuff + epubcheck and I personally would be happy as a clam. that list sounds awesome.
|
08-05-2021, 02:22 PM | #5 |
Sigil Developer
Posts: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Generically, it may be more useful to replace the big green "publish" button with a small "Automate" toolbar with lists of activities to automate.
Making a plugin call other plugins is probably doable but they would need to be of the same plugin type (edit vs input vs output vs validate) to keep the interface straight and get a result back into Sigil if needed. There's a lot to consider as every activity including plugins would have to return a success or failure indicator of some sort. It would be nice to somehow allow some of the C++ based Sigil tools be run from within a plugin, but that is very hard given our Sigil and current plugin design. So we will be better off creating a C++ routine to run a user configurable list of activities that can include invoking plugins. We just have to figure out the best way to do that and make it easy for people to configure and customize. Last edited by KevinH; 08-05-2021 at 03:29 PM. |
Advert | |
|
08-05-2021, 03:54 PM | #6 |
Bibliophagist
Posts: 35,307
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Please! There is a string of actions I run when opening a epub and another string when I save an epub so a menu that allowed me an open and save option would be much appreciated.
|
08-05-2021, 04:15 PM | #7 |
Connoisseur
Posts: 87
Karma: 1133066
Join Date: Sep 2007
Device: ipaq
|
WOW!
I've got a brutally simple workflow that I would love to see reduced to essentially a single click: run kindleimport Add cover (first) MetaDataEditor - grab title for file-saveas file-saveAs title Reformat HTML - Mend and prettify all move to main book file S&R: <hr/> -> <hr class="sigil_split_marker" /> Split at Markers edit styles.css: Prepend the following to the top: h2 {page-break-before: always;} p {text-indent: 1.5em; margin: 0; widows: 1; orphans: 1;} Save Lather, rinse, repeat |
08-05-2021, 06:06 PM | #8 | |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
08-05-2021, 09:00 PM | #9 |
Wizard
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
08-10-2021, 02:32 PM | #10 |
Sigil Developer
Posts: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Your idea of running a sequence of plugins in order seems to me to be a good starting point for any more advanced automated lists type project.
I will start playing around with a way to get a return value (true or false for success or failure) from a plugin so that we know to continue to the next plugin in the list or not. Plugins themselves already return a value but the plugin running codes does not pass it back. Then as a proof of concept, a text file with a list of plugin names to run (one per line) could be read from a "automate01.txt" file stored in Sigil's Preferences folder. We could perhaps start with support for 3 different "automate0X.txt" files so multiple lists exist simultaneously: one for open, one for save, and one for common editing for example. We then add an Automation toolbar with 3 icons (each one dedicated to an automation list). Would something this simple be of interest to others? KevinH Last edited by KevinH; 08-10-2021 at 05:02 PM. |
08-10-2021, 04:15 PM | #11 |
Bookmaker & Cat Slave
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
08-11-2021, 04:44 AM | #12 |
Connoisseur
Posts: 57
Karma: 10
Join Date: Jul 2021
Device: Abakus
|
#metoo
|
08-11-2021, 09:28 AM | #13 |
Sigil Developer
Posts: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
|
One question ... a validation plugin can succeed but there could be errors detected.
How should this impact the automate list behaviour? If a validation plugin in the list succeeds but returns errors, shouldn't the automation list stop? If not, the next plugin in the list would continue and work on a known incorrect epub. |
08-11-2021, 11:49 AM | #14 |
Addict
Posts: 311
Karma: 3196258
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
|
Perhaps it should pause there for input (proceed/cancel)?
|
08-11-2021, 12:19 PM | #15 |
Grand Sorcerer
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I agree. I don't know how feasible it would be, but the ability to continue (ignore) or abort in the event of a validation error would be optimal, I think.
|
|
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 |