Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-13-2010, 01:27 PM   #1
Coleccionista
Connoisseur
Coleccionista began at the beginning.
 
Posts: 67
Karma: 40
Join Date: Aug 2010
Device: iPad, Kindle Paperwhite
Automatic Open & Save

You all know how Sigil even if you don't make any change to the epub rewrites the content.opf file and reorganizes the content into OEBPS , Text and Images folders.
I'd like know if there is any way I can automate the "open&save" of numerous files (in several folders) with Sigil.
I am running Windows and I know that you can command certain programs from a script (notably MS Office) and others have command-line options to perform different tasks.
If it's not possible in Windows but it's possible in Linux I'm also interested

Basically I want to use Sigil to clean unwanted/unused files from many ebooks and doing it by hand it's not feasible. If you know of a different program that's OK too.
Coleccionista is offline   Reply With Quote
Old 12-13-2010, 05:59 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Coleccionista View Post
You all know how Sigil even if you don't make any change to the epub rewrites the content.opf file and reorganizes the content into OEBPS , Text and Images folders.
I'd like know if there is any way I can automate the "open&save" of numerous files (in several folders) with Sigil.
I am running Windows and I know that you can command certain programs from a script (notably MS Office) and others have command-line options to perform different tasks.
If it's not possible in Windows but it's possible in Linux I'm also interested

Basically I want to use Sigil to clean unwanted/unused files from many ebooks and doing it by hand it's not feasible. If you know of a different program that's OK too.
There is now a plugin for Calibre (7.32) that opens the epub in editor of your choice.
theducks is offline   Reply With Quote
Advert
Old 12-13-2010, 06:37 PM   #3
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,637
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by theducks View Post
There is now a plugin for Calibre (7.32) that opens the epub in editor of your choice.
Marvellous though it is that won't help him with automation though.

Looking at the source code for Sigil, there is a comment as follows "undocumented, unsupported *-to-epub console conversion. USE AT YOUR OWN PERIL!". So bear that in mind if you give it a go

It works like this:
sigil.exe %1 %2 %3
%1 - Absolute path to the input file
%2 - seems to not be used, put anything as a placeholder like foo
%3 - Absolute path to the output file

e.g.
sigil.exe d:\input.epub foo d:\output.epub
kiwidude is offline   Reply With Quote
Old 12-14-2010, 06:06 AM   #4
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by kiwidude View Post
Marvellous though it is that won't help him with automation though.

Looking at the source code for Sigil, there is a comment as follows "undocumented, unsupported *-to-epub console conversion. USE AT YOUR OWN PERIL!". So bear that in mind if you give it a go

It works like this:
sigil.exe %1 %2 %3
%1 - Absolute path to the input file
%2 - seems to not be used, put anything as a placeholder like foo
%3 - Absolute path to the output file

e.g.
sigil.exe d:\input.epub foo d:\output.epub
For the life of me I can't remember what the second argument was supposed to achieve. I remember that it was doing something, but now it's clearly unused.

Either way, the disclaimer needs to be stated more forcefully:

This feature officially does not exist and never will. It might cease to exist (even unofficially) at any time. It might produce garbage. It might eat your children. It might cause demons to come out of your nose. It's undocumented and unsupported! I don't want to hear even a hint of a bug report about it. USE AT YOUR OWN PERIL!

Did I mention you shouldn't use it?

Last edited by Valloric; 12-14-2010 at 06:14 AM.
Valloric is offline   Reply With Quote
Old 12-14-2010, 07:39 AM   #5
Coleccionista
Connoisseur
Coleccionista began at the beginning.
 
Posts: 67
Karma: 40
Join Date: Aug 2010
Device: iPad, Kindle Paperwhite
Ok, I will stay clear of the hidden evil inside Sigil unless I really must use it

I am going to try to script the interaction with PowerShell or if it does not cut it I'll give AutoIt also a try.

Thanks all for your comments.
Coleccionista is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Petition to Amazon and B&N to Be More Open ebookrights Barnes & Noble NOOK 14 12-13-2010 11:23 PM
Petition to Amazon and B&N to Be More Open ebookrights Amazon Kindle 4 11-23-2010 12:56 PM
Open and save an epub in sigil - won't load in Freda p1000 Sigil 1 08-01-2010 01:32 PM
Hello From Virginia & New Open Source Software lprichar Introduce Yourself 3 06-06-2009 08:13 PM


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


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