ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Ramkumar KB <ramkumarkb@gmail.com>
To: ntg-context@ntg.nl
Subject: Running mtxrun in a continuous batch mode
Date: Tue, 3 Nov 2020 08:55:19 +0800	[thread overview]
Message-ID: <CAMD5SRM=Ndxvkx=b2t-gogWmgZap_uCujWNHC_739qc9t2vGMQ@mail.gmail.com> (raw)


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

Hello,

I am trying to run mtxrun in a batch process and read the available
documentation here -
https://wiki.contextgarden.net/Running_ConTeXt_without_a_shell

My usecase is being able to create PDF docs based on the input data that
comes in a JSON format (in a continuous batch process). In ConTeXt, thanks
to the Lua engine, I am able to inject a JSON read from a file - and use
the JSON in the tex file (here variable `tab` holds the JSON).

How do I make this as a continuous webservice - in comes JSON and out comes
the PDF ?

\startluacode
require("test-json")
\stopluacode

The name of the document is \ctxlua{tex.print(tab['documentName'])}

Any tips or pointers would be much appreciated.

Thank you,
Ramkumar

[-- Attachment #1.2: Type: text/html, Size: 1974 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-03  0:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  0:55 Ramkumar KB [this message]
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
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='CAMD5SRM=Ndxvkx=b2t-gogWmgZap_uCujWNHC_739qc9t2vGMQ@mail.gmail.com' \
    --to=ramkumarkb@gmail.com \
    --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).