"Compile" format plugins Feature Request

This is a request to add (for us programmers) “compile” format plugins.

The general idea is to segregate the code that produces the various output formats from the rest of Scrivener and develop an externally accessible API to that functionality. This might even clean up the Scrivener codebase a little, though that assertion is only based on my having done similar things like this in the past.

If we had an external API to write output format plugins, we could relieve Keith and Lee from supporting any more obscure formats. Those strange formats that we might want, say a specially filtered ODT file or perhaps a different txt output formatted my way (whatever that might be) or pure LaTeX or native troff or DECset (anyone remember that one?) or an output module written by a professional printing house that interfaces with their production system, all such things would be possible.

Just a general plugins model would be helpful. I could see all kinds of useful tools that could be added via plugins such as advanced language tools (advanced dictionaries, thesauruses etc…) or whatever. I think this would be a great feature!

I’m not sure I would use the word “just” when talking about a general plugin model. I think it is a more difficult undertaking than a compile format plugin. The main difference is that the compile functionality already exists, so it is a relatively bounded problem to compartmentalize the existing code and define an API for its functionality.

But a generalized plugin API is currently undefined and has no existing code already written. We don’t even have a definition of proposed functionality (a so-called “scope document”). I think that makes it a much harder problem.

That isn’t to say that it’s not a good idea to also support a generalized plugin API. I agree with you. I think it’s a very useful feature. I just think it’s a more difficult thing to engineer than an API to existing code. Not impossible, just difficult.

This is something that Lee would like to look into, post 1.0. He’s a bit swamped at the moment just trying to get to release, but taking a look at enabling plug-ins and such is on the list for somewhere down the road.

You can do a little bit of it now–not the big stuff, LaTeX, etc. but the basic “formatting my way”. Compile settings do let you setup the formatting for various elements and document types and levels, so you can manage all of that and then save your settings as a preset which will be accessible to all your projects (and you can even copy that file out of the support folder and move it to another computer or share it with another user, if you’re so inclined). I realize this isn’t nearly the level of what you’re talking about, but just tossing it out there since it’ll be a bit before Lee can look into more heavy-duty customization via plugins.

I know I am in this for the long haul so whenever I make suggestions of major features, it’s with the understanding that they won’t be anytime soon before it is probably even considered so no worries there.