From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/95333 Path: news.gmane.org!not-for-mail From: Keith McKay Newsgroups: gmane.comp.tex.context Subject: Iterate through a directory Date: Mon, 4 Jul 2016 16:52:02 +0100 Organization: The PotHole Press Message-ID: <24117c14-e8b0-3bbf-6122-342303400e0c@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5614961224153870926==" X-Trace: ger.gmane.org 1467647573 1328 80.91.229.3 (4 Jul 2016 15:52:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2016 15:52:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 04 17:52:40 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bK6Ap-0002Jb-DO for gctc-ntg-context-518@m.gmane.org; Mon, 04 Jul 2016 17:52:39 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 48E7E10D2F; Mon, 4 Jul 2016 17:52:17 +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 ONGmaPk__VnP; Mon, 4 Jul 2016 17:52:15 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 8A26910D3B; Mon, 4 Jul 2016 17:52:15 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3BB6510D2A for ; Mon, 4 Jul 2016 17:52:15 +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 vhXUTuiviTuU for ; Mon, 4 Jul 2016 17:52:14 +0200 (CEST) Original-Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id C394310D29 for ; Mon, 4 Jul 2016 17:52:04 +0200 (CEST) Original-Received: by mail-wm0-f51.google.com with SMTP id z126so46698185wme.0 for ; Mon, 04 Jul 2016 08:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:organization:message-id:date:user-agent :mime-version; bh=d8RKhzis25dTX4fbtX+ApPou9r+4RLxY1I/z/0n+YFs=; b=qZMLPJikAnf8D6sNW68Vuf8KHiJlAh+fYvwOeYT7/SAlKC2QHB96kL37Obo2CKm6wp K7zKxHV9mCcv9nDYnTBwkxbsY+QC0MHydAZg6n7x6EWSqnEYPtf9DjAD+Lq1mrnXg21k kNZVaa4Bk4mjCZ2URexOYjYDhTw9WIu+2X/TaTIr3fyksoX79G9gJ1jyTxXxH/Gh+yRn hVWZxkW6yWbgYVpmIMJ/gQ0K3wrVzQEiQ4dnfOKqRGheq9pTgPOtBwMMkcj4j9ktd55I svrCt5a2OYMd6POMpnnf4WBYUDZ1kCdGXnLuEFuhfod1hBTJCu4fzxUfdkDrS3rRirwf MTXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:organization:message-id:date :user-agent:mime-version; bh=d8RKhzis25dTX4fbtX+ApPou9r+4RLxY1I/z/0n+YFs=; b=On6iwjFbQco2OQKEf/BgxHJRdz+5cgQvCT6LsIj1WfyPzWpf69cjpYOif8co0X8MCT G/IBqmbZTUFjqd29tDtZHe03tT5OFWfKIZF5VdZL6y0+m6tFhdUlxOZOTyexS3NEqY93 Y5n8Odwn8w1BeH7+Kncfrzq3t3OX7H604/Gc/8uX2cED6PPhsjUC4McWCzc8w2otYUnt 1Si/x5ZxVzDqTviVVjwOZ/H0tdlREJZcXpLnhZOlGWIBgJwBi/L8Cu8sKfDVvNt/L0N8 wyC9TakH3DNebQCcwVJsQg/+2FJYfKSQ5nhht4uO+mG0D7x3djQ3Zkx/UMChD00ovj9J o52w== X-Gm-Message-State: ALyK8tJu/kF2xRg+h7XMapQ92IbUC9FHI/6VDuKDPs1K7pgkNHYa/1XAnymbrBLoTiqIVA== X-Received: by 10.28.209.13 with SMTP id i13mr12045325wmg.93.1467647524130; Mon, 04 Jul 2016 08:52:04 -0700 (PDT) Original-Received: from Keiths-Mac-mini.local (cpc100348-uddi28-2-0-cust7.20-3.cable.virginm.net. [82.41.64.8]) by smtp.googlemail.com with ESMTPSA id i14sm3548831wmg.7.2016.07.04.08.52.02 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jul 2016 08:52:03 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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.org gmane.comp.tex.context:95333 Archived-At: This is a multi-part message in MIME format. --===============5614961224153870926== Content-Type: multipart/alternative; boundary="------------A7E1ED4F41BF4E17FF8E44A2" This is a multi-part message in MIME format. --------------A7E1ED4F41BF4E17FF8E44A2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Colleagues I'm preparing a booklet of figures which are stored in a directory, however their is no structure in their naming. I could go through them all and rename them along the lines of Pict1.jpg, Pict2.jpg etc and \dostepwiserecurse as in the example below \setupexternalfigures [directory={/a/directory}] \starttext \dostepwiserecurse{1}{10}{1} { \externalfigure[Pict\recurselevel.jpg] } \stoptext However, I was wondering if was possible to iterate through the directory using a wildcard and have something like \externalfigure[*.jpg} to make it generic, or would I have to use lua. Best Wishes Keith --------------A7E1ED4F41BF4E17FF8E44A2 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Colleagues

I'm preparing a booklet of figures which are stored in a directory, however their is no structure in their naming.=C2=A0 I c= ould go through them all and rename them along the lines of Pict1.jpg, Pict2.jpg etc and \dostepwiserecurse as in the example below


\setupexternalfigures [directory=3D{/a/directory}]
\starttext
\dostepwiserecurse{1}{10}{1}
{
\externalfigure[Pict\recurselevel.jpg]
}
=C2=A0\stoptext

However, I was wondering if was possible to iterate through the directory using a wildcard and have something like

\externalfigure[*.jpg}

to make it generic, or would I have to use lua.

Best Wishes
Keith
--------------A7E1ED4F41BF4E17FF8E44A2-- --===============5614961224153870926== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============5614961224153870926==--