ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: thierry horsin <horsin@free.fr>
To: ntg-context@ntg.nl
Subject: Re: Running mtxrun in a continuous batch mode
Date: Fri, 6 Nov 2020 09:47:01 +0100	[thread overview]
Message-ID: <200332d2-52c2-854d-2f0c-bce0f1f011f3@free.fr> (raw)
In-Reply-To: <CAMD5SRN22WZcZJuw6c8Kga0saqrQ4XSspEgFvB99f+DtLFX0Tw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 3418 bytes --]

Hi Ramkumar,

Maybe you could have some scripts that check when the JSON file is 
modified and if so launches the compilation. I did that sort of script 
in order to have a continuous compilation process by checking every 
second if my current .tex file is modified.

Best

Thierry

On 06/11/2020 09:38, Ramkumar KB wrote:
> 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@xs4all.nl 
> <mailto:j.hagen@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
>     <http://www.pragma-ade.nl> | www.pragma-pod.nl
>     <http://www.pragma-pod.nl>
>     -----------------------------------------------------------------
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 5674 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2020-11-06  8:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  0:55 Ramkumar KB
2020-11-03 11:02 ` Hans Hagen
2020-11-04  3:48   ` Ramkumar KB
2020-11-04 11:24     ` Hans Hagen
2020-11-06  8:38       ` Ramkumar KB
2020-11-06  8:47         ` thierry horsin [this message]
2020-11-06 14:51           ` Aditya Mahajan
2020-11-07  1:29             ` Ramkumar KB

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200332d2-52c2-854d-2f0c-bce0f1f011f3@free.fr \
    --to=horsin@free.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).