From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30969 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: Using lfs in Pandoc filter (for scanning directories) Date: Thu, 14 Jul 2022 15:35:35 +0200 Message-ID: <87cze7g5ud.fsf@zeitkraut.de> References: <0b03f580-ac49-4589-98a5-c955514dbab0n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20590"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRB356YCLAMGQEMCLAJPQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jul 14 15:51:47 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f58.google.com ([209.85.160.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oBzFr-0005Aa-3u for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 14 Jul 2022 15:51:47 +0200 Original-Received: by mail-oa1-f58.google.com with SMTP id 586e51a60fabf-10871dc7b21sf1135688fac.17 for ; Thu, 14 Jul 2022 06:51:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657806706; cv=pass; d=google.com; s=arc-20160816; b=odJT1tw2EtVRdyRK6yOr2nWkCOP96wJDZLRLAcNnfKY3FXPFXOop5g/WQWe92dxKP3 /VmiPRph1SLmlpzpK6KVl8E0MfHyG26y6B888TqbToPi6sQuK9NaEM1y/uD0a5JI/wSR LFMqNph4r6zQPihcll4ZuEpBj4l4jj468TxTwQVKhgsJP+NmQM8Vp+R8N5AtMH/4wO3D npIcoeooOB6DM6OLr3NfIMmVWCKqqIf3uMZae1SJ1zU8dBAtVn0Et/fkETa5VTBT3t4s Bub31gNzx3UQzFSZvjfrxfZ3E1rJqsdPRqZxuFCOYeVFuXlgwwV2h8pq3i8VuZAnh2sU YVTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :in-reply-to:date:subject:to:from:references:sender:dkim-signature; bh=CTr8GeJQDZ9YFja6yF9OpQyakfJztYMo0Tdg6bKm1MQ=; b=BkcfGf6xZngXb4x9o6INh4H9ll6EBWNI3Q19sfXT3qadaUUR+J8KiUMVgXttaf8RYN JXjVtoikgR4clI/r63q4yDwpR5xKkykA/6YWMtbHPLgGngkfzP7TT4Ch6AcVC1sOPWOo AftmusiThf4K7VCujLHcSyNbsYLa/fsrTiYc+4FedHyGgA/h+0rExjxAxvPNnBr2mnb7 QUKAXOXfXE/2EaPeBbne/fVHgAjhvU+ZAQVC7AUYA0XUWjW/mCpY1gfPCrcvSAPOOOus fIZck8/IK3bWQkYvQx9wUnZObTe0jWyUSrEfVg1E8/ucfQwD4CCCqMVftJD+bLA9rM8J ZYPg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.172 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:references:from:to:subject:date:in-reply-to:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=CTr8GeJQDZ9YFja6yF9OpQyakfJztYMo0Tdg6bKm1MQ=; b=VHv1PVIojOp07WkLsJzdPZWdQ/LWPF3oarWGLcZnI6DtqXkuh3vx6dSi1kRbmb1kSa DyvGjFt9VkVzlyaQCSWuD3n0dpTUYesUOdWZYDTfUvVpyjC7aSLpa77fzoZsun/y/9bi StCEAT1W4P5jgoPINEIRaFwO1kxqApgg2URuQTqhkdpfHyYjMn+0gthw+5ww59D9mQZu lbhXMV9eJqn8Q6AtF88WpMFS8rCmYaS9wN1SOdKW2vdkDhwnbwD+B5CweqXkC/71MeKc UZ8GMR665r5jHcjLwk/QJEaWAYCofIzaPudZgrA2kUKfYAe+iubYXdQW7wOhPap4iS7p 3GfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:references:from:to:subject:date :in-reply-to:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=CTr8GeJQDZ9YFja6yF9OpQyakfJztYMo0Tdg6bKm1MQ=; b=Gp/KFMtYBtBF7K9o2MUARaVJKUQTUGJxjaMv694uCdnjZ1cBtddOxSxaHUlJkMzH0h at4KSqSkE/irpUEzA8Hd8gCYiKNLN4bsKK4VLw0L3549AXdQ07jwh05gUHeVADTBHeRX 91nIQypgS12VUe3cZNZ7t/cYTTH238aK7votqHM2DbpW0Kbrqluum15zS52IvS1a1TKO Wo5r17gby/OEsnV0l/VTkz9FY955DitVXz1jyf1J1BQKn2Qpt41Wz1/UoncypX4Qt9pi BubTlBwApKME7QzeqVGCZWv91XPCoq3FWfZO95ijNh7hmx23PcCcFksF1BwzfyzWW+Rp bhEg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora+lfqhc9gkK/0cPkI0z+MRnyJQGVAM91IETkSj1rw/mUUk8GHj6 s91pkT1I6zMdjEHJ9Agv7rs= X-Google-Smtp-Source: AGRyM1vsXjbCXfN72IuhHD3+w22TQzlkvYpTV0aLu6PJPVkD1i1SqNOk82RSz0AvcUElhCYzDsbbKA== X-Received: by 2002:a05:6808:1446:b0:335:97fc:fd7a with SMTP id x6-20020a056808144600b0033597fcfd7amr4481183oiv.46.1657806706045; Thu, 14 Jul 2022 06:51:46 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:b1b:b0:335:3a6d:57e6 with SMTP id s27-20020a0568080b1b00b003353a6d57e6ls40711oij.6.-pod-prod-gmail; Thu, 14 Jul 2022 06:51:43 -0700 (PDT) X-Received: by 2002:aca:1915:0:b0:33a:1044:aae1 with SMTP id l21-20020aca1915000000b0033a1044aae1mr7481426oii.90.1657806703136; Thu, 14 Jul 2022 06:51:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657806703; cv=none; d=google.com; s=arc-20160816; b=vDn3HS3Ktvl4LpJCADRYOQ3AIZphxtWo4Lr6SMy3zrxSC7lcCQFpFc9hGSdf4uiM2X 2ogo/PRso4jNVzWdeYA/6QBFhLYQBf6bQPcXxCya5F3P03Hu+7plq2Nfy9lwu4MymvGc 6dk/BZzCYWAiEHCV++mB5F0hBaqrLQ13RVf0q/b5mIFCwJMQcmvyaNeXyFfDKyR+av4+ IIkMRrE1/PlwyXeYed+YDh95qBYYVt+WHWaqhn+R0YqdAwXNMtTbO6HqRIf7QR0Cae1u qtDzEOfodK5mLWnDrcFrXbS62tdeyknKIPWyEp9EsJ7tbpMAICAbjA5DVscUNGRxAnWP 4i3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:in-reply-to:date:subject:to:from:references; bh=Q5N1HlDwpdGRrXjm3z0vChac9Pwf8XY90DfaJ6IFIS0=; b=z7DKr/oKQh+7n7Pdv0+h2S2mPz/wr2x4CVRZTRCj774KOIwS+DQge1IdLyvtNIIJp0 LFkcRZQdYKbu8SH9FuG38QCOcSfEUbKGV2Nyoczf7zWRraz0pGGWGn/kSUUbdoFIbs6l I4U1r0xEU5KVV35RzD1e1wadsQr1LcuntmOw1W54SfPA/yZxt3dmBk2izISrVHbFHPP3 hdO+M3/hib8pb6hmG0xraRPzLbOB1dhrtlzq/bWjBbt7U90wN6MbKXPHYmBhHCqY9FS+ HKgoLnmCMgfPTUcXGhQpVy56fzvEcEO5seGuVcrTFUtIkVYwQxiB8rBXb3ddZMMkMIfw J1nA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.172 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org. [80.241.56.172]) by gmr-mx.google.com with ESMTPS id g49-20020a9d12b4000000b0061c75baa082si63780otg.2.2022.07.14.06.51.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jul 2022 06:51:42 -0700 (PDT) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.172 as permitted sender) client-ip=80.241.56.172; Original-Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4LkGB33qW6z9sT1 for ; Thu, 14 Jul 2022 15:51:39 +0200 (CEST) In-reply-to: <0b03f580-ac49-4589-98a5-c955514dbab0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.172 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:30969 Archived-At: Hi Claudio, Claudio Di Vita writes: > I created a Docker image from pandoc/latex (the Ubuntu version) to run > my pandoc conversions, thus developing some custom filters. > > Due to new requirements, within a filter I need to scan directories and > looking for files. I would use lfs (installing it via luarocks) but I'm > wondering how I can use it with pandoc. > > Should I install lua separately within my custom Docker image and > instructs pandoc to use such version ? We build the image such that you can simply use the Ubuntu package manager to install Lua libraries. E.g., for lfs, try this: ``` RUN apt-get -q --no-allow-insecure-repositories update \ && DEBIAN_FRONTEND=noninteractive \ apt-get install --assume-yes lua-filesystem && rm -rf /var/lib/apt/lists/* ``` The pandoc versions in our images are built against the system's Lua library, so any system-wide Lua package can be used with pandoc. > Any other suggestions on how to scan directories from a Lua filter ? I > could run a find through pandoc.pipe, but then I have to parse the > output and, in general, looks like a dirty solution. We could think about making more functions from [hslua-module-system](https://github.com/hslua/hslua/hslua-module-system) available in the `pandoc.system` module. See also the discussion in https://github.com/jgm/pandoc/pull/5468 -- Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124