Develop custom backend vs using templates

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Develop custom backend vs using templates

joruib
I have been using AsciiDoctor to write my novel for a time now, and I am approaching the time where I have to make some development.

In particula, I need to convert my AsciiDoc sources into a couple of formats:

* XML with custom tags for archival, this format will allow me to generate other tag-based formats (ePub, HTML,...)
* ConTeXt sources to generate the final document.

My doubt is if it will pay to develop a custom backend or if using templates will do... any thoughts on this will be very useful.
Reply | Threaded
Open this post in threaded view
|

Re: Develop custom backend vs using templates

mojavelinux
Administrator
My recommendation is to use custom templates, esp if the output is an XML-based (or XML-like) format.

When you want to get into a custom converter is when you either have to interact heavily with another library (like Asciidoctor PDF) or you need to create compound output (like Asciidoctor EPUB3).

So start with templates and see where it gets you. Then, you can graduate to a converter if need be. That's exactly the strategy I followed with the Bespoke (presentation framework) converter.

I hope that advice helps.

Cheers,

-Dan

On Mon, Oct 23, 2017 at 2:16 AM, joruib [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I have been using AsciiDoctor to write my novel for a time now, and I am approaching the time where I have to make some development.

In particula, I need to convert my AsciiDoc sources into a couple of formats:

* XML with custom tags for archival, this format will allow me to generate other tag-based formats (ePub, HTML,...)
* ConTeXt sources to generate the final document.

My doubt is if it will pay to develop a custom backend or if using templates will do... any thoughts on this will be very useful.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Develop-custom-backend-vs-using-templates-tp5998.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Develop custom backend vs using templates

gour
In reply to this post by joruib
joruib wrote
* ConTeXt sources to generate the final document.
Just curious how do you plan to tackle that one?

I was (am) always thrilled with the ability of ConTeXt, but (apparent) lack of appropriate docs was putting me on the side.
Reply | Threaded
Open this post in threaded view
|

Re: Develop custom backend vs using templates

joruib
Since it is a novel I have written, it has a simple enough structure to translate it directly into ConTeXt.

There are parts, chapters and scenes, just three levels of structuring... table of contents and very little more.

A generic converter will be a bigger endeavor to undertake, I'm not even trying to do it right now... it is enough for me to convert asciidoc basic elements into ConTeXt tags and let the presentation settings defined there.

As for docs about ConTeXt... The manual and ConTeXt: an excursion have been my main source of information, along with some articles about how to change/set fonts and how to define the page (paper size, margins, etc.)

I find ConTeXt approach much more configurable than LaTeX, but lack of docs is indeed a culprit...