From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/109180 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ramkumar KB Newsgroups: gmane.comp.tex.context Subject: Running mtxrun in a continuous batch mode Date: Tue, 3 Nov 2020 08:55:19 +0800 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2757733041435167528==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21213"; mail-complaints-to="usenet@ciao.gmane.io" To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 03 01:56:05 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZkcH-0005PF-HR for gctc-ntg-context-518@m.gmane-mx.org; Tue, 03 Nov 2020 01:56:05 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 98A221A9987; Tue, 3 Nov 2020 01:55:34 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 58Q325RKVjhT; Tue, 3 Nov 2020 01:55:33 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B7DB81A9CFE; Tue, 3 Nov 2020 01:55:33 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8321B1A9CF8 for ; Tue, 3 Nov 2020 01:55:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Uu6I5TQNme29 for ; Tue, 3 Nov 2020 01:55:31 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.181; helo=mail-lj1-f181.google.com; envelope-from=ramkumarkb@gmail.com; receiver= Original-Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 589A51A9987 for ; Tue, 3 Nov 2020 01:55:31 +0100 (CET) Original-Received: by mail-lj1-f181.google.com with SMTP id i2so17166923ljg.4 for ; Mon, 02 Nov 2020 16:55:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=g5aXQtj6ebeC+r+viO2WLLSsHLH86s6QAlN9njee8Jk=; b=bSZqtjbyCLuwmoRVATyi2VRitSF39+RBg+5kkJaV8kWqUFa64b/MsVYkxuCUZj6aWS dDFYChe+DeL26OEBS4TIA7Sh4gzuAggMAaW37Sz1oHBpYKNoAqap2Rfs6F2LALIpbjMC AOc3lqH0GxV/gNqhMhKMAGgTBYCkno2Ymf2psGum2SaJ08iBC9gKgS8VPJlRmizAylx3 mXmU5jrJPq3mPwk+fs3OomDpyGDINaGeBKGgux+ZSN/4BGjVz/pF0QQZcieS13usi35o E3p/qUgn055SZSGd0PG5KYF+0rBMYaWRL1hHdYV9m57ASi+RNDqyPTRI63T5HS7WBVP4 EV2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=g5aXQtj6ebeC+r+viO2WLLSsHLH86s6QAlN9njee8Jk=; b=DIDrWCLFHfIeLLE8NX0EcbjYZYRvhtyUL6idWfR+XIH4uYpwXZVUk4hUIWZfIkGCyt ghtlone3kQDKcpaMWR9N+y+GwKTDc8/0q/elIbTCxhO4V95Va1yoS4tSUp+FZJwjghbD to+Ou6RkYoTA1uq15CjpICCXrD7GVu2t1xWxv/zAAsnG/7LdR0mbg5DOrCXeNcffl7np 7BIBELcGgx8EzqbVnVTjitDM4FIiy3n5lmrB21QegGT9W/xzKDuznPI7OKSrUvuElC3Z iND2OCb6ZyqfmPyWzoYbHXCDb+8Rb39y5WslTffFKCLIUNllbCQIEbTH9wuRBOD4czPt cgNw== X-Gm-Message-State: AOAM533k2bX1iAZjJFE+SO+pvyraQnZsuAmxF4AUREX1FwvR3oZ3EzJY nutaEDfewDc5vWctAxnyIsEz5xNB1SS2+EqSYaeIexr+00dj7A== X-Google-Smtp-Source: ABdhPJzBEp+Sc8gun0spZBEMLVIES2wtZCJ2Cp6t3kH+3byTkeZcf5YmKM/apRvUu4rbnzg+LNy/vI7ITzVTxri+rAE= X-Received: by 2002:a2e:87c6:: with SMTP id v6mr7965234ljj.233.1604364930034; Mon, 02 Nov 2020 16:55:30 -0800 (PST) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:109180 Archived-At: --===============2757733041435167528== Content-Type: multipart/alternative; boundary="000000000000beb23e05b329517e" --000000000000beb23e05b329517e Content-Type: text/plain; charset="UTF-8" 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 --000000000000beb23e05b329517e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,<= div>
I am trying to run mtxrun in a batch process and read th= e available documentation here -=C2=A0https://wiki.contextgarden.net/Runnin= g_ConTeXt_without_a_shell=C2=A0

My usecase=C2= =A0is being=C2=A0able to create PDF docs based on the input data that comes= in a JSON=C2=A0format (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 th= e JSON in the tex file (here variable `tab` holds the JSON).

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

\start= luacode
require("= test-json")
\stopluacode

The=C2=A0name=C2=A0of=C2=A0the=C2= =A0document=C2=A0is=C2=A0\ctxlua{tex.print(tab['documentName'])}

Any tips or pointers would= be much appreciated.

Thank you,
Ramkuma= r
--000000000000beb23e05b329517e-- --===============2757733041435167528== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============2757733041435167528==--