Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-28-2012, 03:24 AM   #1
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,359
Karma: 1048182
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Sony T2, Kindle Fire HDX 8.9 , Kindle for PC
Question automate stylesheet cleanup ?

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 ?
cybmole is online now   Reply With Quote
Old 12-28-2012, 04:24 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,733
Karma: 2117249
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Create a script with Autohotkey. That will work.
Toxaris is online now   Reply With Quote
Old 12-28-2012, 04:48 AM   #3
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,359
Karma: 1048182
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Sony T2, Kindle Fire HDX 8.9 , Kindle for PC
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.
cybmole is online now   Reply With Quote
Old 12-28-2012, 06:49 AM   #4
GrannyGrump
Persnickity Nitpicker
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
Posts: 508
Karma: 2273324
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.
GrannyGrump is offline   Reply With Quote
Old 12-28-2012, 09:33 AM   #5
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,359
Karma: 1048182
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Sony T2, Kindle Fire HDX 8.9 , Kindle for PC
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 ?
cybmole is online now   Reply With Quote
Old 01-08-2013, 10:04 PM   #6
JSWolf
Suspended
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
Posts: 35,392
Karma: 16147088
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
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.
JSWolf is offline   Reply With Quote
Old 01-08-2013, 10:33 PM   #7
Turtle91
Guru
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
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.
Turtle91 is offline   Reply With Quote
Old 01-09-2013, 06:23 AM   #8
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 8,301
Karma: 36122446
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
"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.
DiapDealer is offline   Reply With Quote
Old 01-09-2013, 06:35 AM   #9
crutledge
eBook FANatic
crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.crutledge ought to be getting tired of karma fortunes by now.
 
crutledge's Avatar
 
Posts: 14,158
Karma: 13282342
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
Quote:
Originally Posted by cybmole View Post
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 ?
I agree. I see no problem with a selection in preferences to tun on/off this function.The user can dialup his/her own medicine.
crutledge is offline   Reply With Quote
Old 01-09-2013, 06:42 AM   #10
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,359
Karma: 1048182
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Sony T2, Kindle Fire HDX 8.9 , Kindle for PC
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
cybmole is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 04:09 AM.


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