![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
![]()
to what extent can the process of:
open book with sigil select remove unused stylesheet classes accept results save book be automated I'd like to do it with minimal (ideally no) mouse movements & actions I'd really like to run it across an entire calibre library of books, but that may be too much to expect ? |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Create a script with Autohotkey. That will work.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
the "for dummies" version, please.
I've got only as far as assigning a keyboard shortcut in sigil, for "delete stylesheet classes". there's no Sigil setting that I can see to turn off the need to confirm delete. |
![]() |
![]() |
![]() |
#4 |
Obsessively Dedicated...
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,202
Karma: 34984330
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
@cybmole, if your on-screen setup is ALWAYS EXACTLY IDENTICAL, the easiest way is to use the autohotkey macro recorder to record your mouse-clicks. you can record a set of clicks, assign a hotkey to run that set of clicks on demand. It's not the most desirable way though, because if you move your screen elements the smallest bit, the cursor no longer clicks the hot-spot.
Very slightly more difficult is to script it to send key combinations, which are actually your assigned keyboard shortcuts (e.g. Ctrl C, etc), and these can include sending "Y" or "N" as a response to dialogs. The language and syntax for the "Basic" version 1.0.48 is pretty straight-forward, and the forum is quite helpful. Then when you get hooked on the wonderfulness of AHK, you can design scripts to interact with specific (named) dialogs and windows. Are you intrigued? I'd be glad to help if you decide to go with AHK, although I am off-line every weekend. |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
i'd prefer a solution using sigil preferences.
what would be helpful are 2 enhancements in future versions 1. an option to toggle off the confirm delete for "delete unused stylesheets" - so that a single hot key shortcut will do that operation 2. an option - within the pretty print/tidy options? - to delete unused classes before saving - which I think is a logical enhancement. to clean all books in a folder would need some command line options ? |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,064
Karma: 144284144
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You can assign this to a function key. If a requester pops up because there are styles that can be deleted, then you will have to at least hit enter if you want them all deleted.
|
![]() |
![]() |
![]() |
#7 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,303
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Just carefully check the list of styles to be deleted. There is a small bug. Sigil will select pseudo elements for deletion even if you are using the primary style.
e.g. p.first p.first:first-letter p.first:first-line Sigil will delete first-letter/first-line even though p.first is being used. Not a super big deal - how many people use pseudo-elements when they aren't supported very well...Just something to be aware of. |
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,353
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
"Bulk" file operations? Perhaps someday. But I don't see this one as being useful enough to become Sigil's very first. I've never gotten the vibe that Sigil was ever going to be anything other than a "one-job/one-epub" application. No confirmation and bulk file operations sound more like something you'd see with library management software. I could be wrong though ... and it wouldn't really concern me if I were.
![]() |
![]() |
![]() |
![]() |
#9 | |
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,301
Karma: 16078357
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
|
bulk operation: sure I'd only ever want to use it once, because I have over 1000 books which were collected before this feature was available. I was thinking of some batch process automation rather than changes to sigil for that but I don't know how to parameterise a command line / loop through a folder of books
I like the idea of cleaning them all, but not manually! i think a preference setting to remove the need for a delete confirmation is reasonable though |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automate Calibre Tagging | ohemeffgee | Library Management | 1 | 11-11-2012 06:56 AM |
Any way to automate editting metadata? | louwin | Library Management | 4 | 04-24-2012 06:58 PM |
Automate Trook Downloads (cron-like)? | spedinfargo | Nook Developer's Corner | 5 | 06-01-2011 02:40 PM |
How to automate Fetch News in Kindle? | remei | Calibre | 0 | 02-04-2011 12:30 PM |
I am looking for a tool that could automate convertion of... | astra | Workshop | 24 | 08-30-2009 06:38 AM |