From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/106846 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Gerben Wierda Newsgroups: gmane.comp.tex.context Subject: Using command line values in a TeX document; writing a script? Date: Mon, 13 Apr 2020 10:29:31 +0200 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: multipart/mixed; boundary="===============3566613293154300445==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="30862"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Apr 13 10:30:06 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 1jNuTm-0007ua-4q for gctc-ntg-context-518@m.gmane-mx.org; Mon, 13 Apr 2020 10:30:06 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0661D183258; Mon, 13 Apr 2020 10:29:37 +0200 (CEST) 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 mAli9GrQ2V2v; Mon, 13 Apr 2020 10:29:34 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id A38FF18319A; Mon, 13 Apr 2020 10:29:34 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1D8861831A2 for ; Mon, 13 Apr 2020 10:29:33 +0200 (CEST) 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 ceVibpnauQnw for ; Mon, 13 Apr 2020 10:29:32 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=213.125.118.53; helo=mail.rna.nl; envelope-from=gerben.wierda@rna.nl; receiver= Original-Received: from mail.rna.nl (mail.rna.nl [213.125.118.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 7FA80182CEB for ; Mon, 13 Apr 2020 10:29:32 +0200 (CEST) Original-Received: from hermione.rna.nl (hermione.rna.nl [192.168.2.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.rna.nl (Postfix) with ESMTPSA id E0D553D323D4 for ; Mon, 13 Apr 2020 10:29:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rna.nl; s=dkim_rsa2048; t=1586766571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=zg+/DLZXOy8EX9Jsrbv5trOMj31gq5h7m1hspU9fHaU=; b=JrhI+hnTABKeD6HvQe1bJEvIe79X1fU+6nAFWR7W5rch1a6rg6yeyrqqjnIAymMOzaKQn8 w/kd9Nru8QXz+wOI6HO5lc5xWbXeT2WdasLtSkqY106sDNlYfBNLxtbufHtDE0leJxg8SG 9UaH7w1deZ1v1mGOqbPDppg6mh6BVZwqTwpM7VNblrkwY3G0zQmYyZF3u/cQXkADiIW3bO Tj4IgfciMwtPxtrzsHS87R3VrrbaWW+pTpWFEFEhJBYEbcwXSVjbhu9Aj1dcBJ7nrNOVFk G88D22qhX2NSrsUOg7VdogtnemMJG8nRJ7ulKYhkSabysxXwG+ecRWtDetXKnA== X-Mailer: Apple Mail (2.3445.104.14) 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:106846 Archived-At: --===============3566613293154300445== Content-Type: multipart/alternative; boundary="Apple-Mail=_BE220984-6629-4B9A-979E-3F99E9B63316" --Apple-Mail=_BE220984-6629-4B9A-979E-3F99E9B63316 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Currently, I process a file like this: mtxrun --autogenerate --script context test12.tex and in the file test12.tex one sees something like this: \input archimate-mp \ctxlua{moduledata.archimate(=E2=80=9Cmyarchimatefile.xml")} The latter parses the xml file and produces a PDF using generated MP = code. What I would like to do is not have to edit the .tex file when I want to = process another .xml file but just pass the name of the xml file on the = command line. And I would like to pass on a second filename with some = local overrides settings fr my code. All of this needs to be data that I = can use in my programming. E.g. something like: mtxrun --autogenerate --script myscriptname =E2=80=9C = myarchimatefile.xml=E2=80=9D =E2=80=9Cmyhelper.xml" It is OK that this would produce a fixed name output file (e.g. = myparsedxml.pdf), so it is OK to have some generic myparsedxml.tex = (instead of test12.tex as per my example) file that produces a .pdf and = more in the current working directory but resides somewhere in a generic = place. But preferably, this would produce myarchimatefile.pdf I=E2=80=99ve read the manual on mtxrun scripts to see if I can make my = own, but I=E2=80=99m utterly failing to understand what is written in a = way that let me write my own. G= --Apple-Mail=_BE220984-6629-4B9A-979E-3F99E9B63316 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Currently, I process a file like this:
mtxrun --autogenerate --script context = test12.tex

and in the file test12.tex one sees = something like this:

\input archimate-mp
\ctxlua{moduledata.archimate(=E2=80=9Cmyarchimatefile.xml")}

The = latter parses the xml file and produces a PDF using generated MP = code.

What I = would like to do is not have to edit the .tex file when I want to = process another .xml file but just pass the name of the xml file on the = command line. And I would like to pass on a second filename with some = local overrides settings fr my code. All of this needs to be data that I = can use in my programming. E.g. something like:

mtxrun --autogenerate --script = myscriptname =E2=80=9C myarchimatefile.xml=E2=80=9D =E2=80=9Cmyhelper.xml"
=

It is OK that this would = produce a fixed name output file (e.g. myparsedxml.pdf), so it is OK to = have some generic myparsedxml.tex (instead of test12.tex as per my = example) file that produces a .pdf and more in the current working = directory but resides somewhere in a generic place. But preferably, this = would produce myarchimatefile.pdf

I=E2=80=99ve read the manual on mtxrun = scripts to see if I can make my own, but I=E2=80=99m utterly failing to = understand what is written in a way that let me write my own.

G
= --Apple-Mail=_BE220984-6629-4B9A-979E-3F99E9B63316-- --===============3566613293154300445== 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== --===============3566613293154300445==--