[NTG-context] Running mtxrun in a continuous batch mode
Ramkumar KB
ramkumarkb at gmail.com
Fri Nov 6 09:38:42 CET 2020
Hans,
Thank you for the suggestions. Let me try them out and feedback back to you
(as the batch set-up involves > 10,000 docs).
Best,
Ramkumar
On Wed, Nov 4, 2020 at 7:24 PM Hans Hagen <j.hagen at xs4all.nl> wrote:
> On 11/4/2020 4:48 AM, Ramkumar KB wrote:
> > Hans,
> >
> > Thank you so much for the kind response.
> >
> > Apologies that I was not very clear in my initial query. I have -
> >
> > 1. MyStatement.tex, with all the necessary fonts, static text, images,
> > header, footer etc
> > 2. MyStatement.tex reads from a JSON file for certain sections of the
> > document for the dynamic content
> > 3. context MyStatement.tex produces MyStatement.pdf
> >
> > How do I do the above steps 1 to 3 in a continuous fashion such that -
> >
> > * Output is MyStatement_1.pdf (reads from data_1.json),
> > MyStatement_2.pdf (reads from data_2.json) and so on
> > * The tex processing is fast as fonts etc are loaded once (as the Tex
> > template is same for all the MyStatement_n.pdf)
> >
> > From the sample code that you gave, I get a hint that this can be
> > possibly done using ConTeXt Lua Document approach. Is this correct?
> i'd just write a script that calls context like
>
> context mystatement.tex --myjsonsection=1 --batch
> context mystatement.tex --myjsonsection=2 --batch
> context mystatement.tex --myjsonsection=3 --batch
>
> etc .. maybe --once if no multipass is needed, or --runs=2 if you know
> how many runs are needed
>
> to stay in a run and kind of restart is asking for troubles because what
> should be reset? of course i could context make do that buit it doesn't
> pay off
>
> an alternative that you generate one document with all statements and
> use mutool to split of the pages
>
> but anyway, nowadays machines are fast enough to have separate runs (and
> one can run them in parallel)
>
> Hans
>
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20201106/b5a75af0/attachment.htm>
More information about the ntg-context
mailing list