run from command line

Greetings,

I’m trying to automate book export. Since it contains several pieces (text, presentations, source code) I’d like to have single command to build it at once.
I’m pretty confident about exporting presentations and source code, but as much confused about export text from Scrivener. Is it possible to Compile book from file right from command line? If yes, how?
Thank you in advance!

Hi,

No, Scrivener has no commandline utilities so you cannot compile from the commandline - given the wealth of options I’m not sure how that would ever be possible.

All the best,
Keith

and is it possible to run from Applescript somehow?

There is no AppleScript support yet, but that is something that is slated for the near future. The complexity problem still rears its head even with a scripting language, though. It would be one thing to trigger a compile using the current settings, or even a preset, and quite another to open up full access to every single toggle and feature—many of which would have no easy way of scripting them, such as defining formatting rules for meta-data at 3rd level file groups, or adding a cover graphic to an e-book.

If you would be satisfied with triggering a preset, that seems like it would be an easy enough thing to script.

1 Like

Ioa,

of course gathering various metadata & applying formatting rules is nice possibility to have, but for now I’ll be quite happy with only one function - compile specified file with my current presets.
Is it possible to implement in some near future beta release?
Thank you in advance!

Not for the near future, no, as AppleScript is a massive undertaking. It is slated for a 2.x update at some point, though, and I really hope to add it before the end of the year but cannot say for certain.

All the best,
Keith

Yes, I should qualify my definition of “near future” as being more like “not five years from now”. :slight_smile: