From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30981 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Claudio Di Vita Newsgroups: gmane.text.pandoc Subject: Re: Using lfs in Pandoc filter (for scanning directories) Date: Fri, 15 Jul 2022 17:29:30 +0200 Message-ID: References: <0b03f580-ac49-4589-98a5-c955514dbab0n@googlegroups.com> <87cze7g5ud.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000dc0d9505e3d9af39" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40590"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDOYFIOXRYHRBZUPY2LAMGQEH5F6YDI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jul 15 17:29:46 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-io1-f59.google.com ([209.85.166.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oCNGD-000AOw-NG for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 15 Jul 2022 17:29:45 +0200 Original-Received: by mail-io1-f59.google.com with SMTP id h7-20020a05660224c700b0067898a33ceasf2394384ioe.13 for ; Fri, 15 Jul 2022 08:29:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657898984; cv=pass; d=google.com; s=arc-20160816; b=vsX4xgeUm8j4/obySOmfOcm/6+ZMIL1DoJSspZsMQZba4QLAytAzx6ad0+V9TGK9bq euHH1H9f4MIKnuB9tJ4GzU+11zYt3pAMVt7CpplUFBcX1PUWG4VOkfZizhRpuQfHe85j YkkMllj6FlkoClqhyYfn0F3sGy/NzBSxPAV1YR6oXakJoUYeKWTJtLsbU5AdeXp4yf2U FiXykr6D6Fs9UCJet/mOMDqswMPfyf0o1IFvXrDdkzA/yygbrXXJZ3vDO4OHTxwuLPSz yqF/f0ph+zLh5yU2JkrF2yxi4vXNm5XvDXyB33pUqc3aBhgffJEy4pg+sgm638uyQEoz w4Gw== 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:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=c6jkaUqosIKPolZPhRld3pSIlorwDuTjpEe23DvdAb4=; b=aL3zGA4atNIuQm4gB+efqdp313pPx9uFFPzOYaF0l9ZBK3/L046wLlBr/NbkbrbnUi q3tzfuMZq+d7cAK/3fOYa3BWDD3sXKRsejF2GOIsiocaPljpwl7E9VjEgvUdC/z5oHPw jasfcRBTn3DmHtkjRW/pgm4vkibLhpBIlxPbAWtNmbs2O/4b0hIJbqg6Ggs7tBNLtSZu ToQPG9hSRHEG0mGkSbEjkPGQPL3rIhjBSPW0F2YG6LZ68cou/OIC7c1lrb4Cd/+4pX+9 rFzUucmi2ZUkICpMIeMyHp0ZhGA+yHNSgIGvG68TRXajIJLdZnJdTVv4mrwOOqYzLESC FP5w== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DmOBsFCr; spf=pass (google.com: domain of claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2001:4860:4864:20::34 as permitted sender) smtp.mailfrom=claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to: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=c6jkaUqosIKPolZPhRld3pSIlorwDuTjpEe23DvdAb4=; b=mGLJLM/7/hncFlWnfYOQciuEZYhHmOCkNOcWFxYz3QOCptA0kGLtcMu1S/jipodDOs VMBKKGGVmg/lW0+6DMGktQjFI1fUfbqUUDBhvOdLx7Xj21aQQIEhRwTaikVVK3mh8ed1 vd+NQsVF7sKXmf+8SMVjF+xy+fvmH+U84K8ABjqpk3I9bI/81thQGxVdipI+FupgJt9P wno3dqJpzwS3NdT0mt6xAVwx8hh358VTfdC55H5rQhJlSbhqa+tYLz8GogdqRPyMquTo EcmB6cBFNjMCGBGCZGOHTcvBh+ssTqOcEtTBrFPze+BSAdy7Jvvnq4SRdKlQ7/litbE9 Rs5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :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=c6jkaUqosIKPolZPhRld3pSIlorwDuTjpEe23DvdAb4=; b=TsXi7C+/mg/sUJl+XaZ1Kr8Pvvr78ABSrVDa0SN08EH4uEwmcdg7v2QwO9ug2+SykM yepYff0TXpwPLkwO+vVTo8iqfVOyNHU3SD2bK7H/TSu9PN/4oY9QGyBNs8BPCy9twdkd XtLjC47ZZizLDGK4vOMpqMjPO/uMpno5WZfILc0aIn36vfuch2o8t5Q0rz9niTmjg3c6 x+bEKDnHNlwk0Vr6TeHjhJTH+gRSY10Ydf540nIjutx/2CpB1pQCVIa1YKqJay/pkNmN ncVma51pcvn0GEGp7M8lQCD56cnjpihxALQwBnRu4AMnNZF0aZ3AlhNRDuiPCE0Synph 0xHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to: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=c6jkaUqosIKPolZPhRld3pSIlorwDuTjpEe23DvdAb4=; b=HU0FjLmKYJlw21oNLep3j9uf5S2Rvgore4PC7c/NSnQ3n/xvyaj5RqpRO+XY8vqVtF GEYKfuRF4a7Jkkmu6egcIzdEaBtoOMsRQzkogV8BuHBznb9C8P5q9r1ey5rdaoI/U+Pt IQRpn3GapFr3E9PeFID/w6YJxr17fY2r6qO7ntyokEVDwAJPGJWbv6ZXSkFC6SvHbAvN Tk786q8tnGKcOmfb84JDsH+D9nVbs0fq1waVdh6wgfu6M1zcjhcV0TFsEjoL1FFHN36l 9OYWVQlcJLbPmO7bg6RVpigmhCvlwKtSY/4C65G5e0ZWydf3RV4/bE1l71Uwugh1BuOM TJCA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora90e+GY/HoPT4MNN3XSSduUBcxBU+e0NUxBwPOUSRj1Lg1M8ZNk nIyktJloHdQzoQQJ0MtKG+I= X-Google-Smtp-Source: AGRyM1tqNcFM1HB/bcMOovBwqFdTnFeD7Wf8FZubhwPk/WVByrrRJQ/6EIBkUPbsDF8+oEgA+o0XeA== X-Received: by 2002:a05:6e02:106f:b0:2dc:7233:7423 with SMTP id q15-20020a056e02106f00b002dc72337423mr7805704ilj.76.1657898984689; Fri, 15 Jul 2022 08:29:44 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6638:214f:b0:332:109e:3b77 with SMTP id z15-20020a056638214f00b00332109e3b77ls394685jaj.2.-pod-prod-gmail; Fri, 15 Jul 2022 08:29:42 -0700 (PDT) X-Received: by 2002:a05:6638:aca:b0:33f:5888:ea0f with SMTP id m10-20020a0566380aca00b0033f5888ea0fmr7993215jab.39.1657898981952; Fri, 15 Jul 2022 08:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657898981; cv=none; d=google.com; s=arc-20160816; b=MkxwmdYqrwzMsD35Gaej1j7ObTdPr4G6bpFwPoM1c9WDujHClgvSc3j3Dt8qizMoO9 5t2RWPCOmfYShWrOW/yLOG3V8iUap7qb/UazUtgnu7aaLRBvPqVx0+IK8ILnZv0bR/w0 r4dXNRTcYxI2bP263Zden7sK6v3xWjtjrtKPMFnvwc5t+00oyKjaFkbOtO+OodICYmB8 jXsWdR/sg9BBwsyoJBKImGiqs99l7chiiSdVClkrkmNKTzVZDZRCkGHCExkUaJe2Hvyc tSfyWUbQekOzlTyqtQeZffAaDjft134uY8u/CSgCrVMcvZyzeS0K/35H2eORS7h81Czp xLRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=KfsDGZgefz2G8zDSAaTCdIIPTMXwKkn3DjQWM10mdPs=; b=qUZzkyKritJ0QeY5uN/ncTLOWxrleQZpVaYvkwxDuJBgl3xkyXFKg7YTC44vX7gVgv XP2BFwY44IjniTXtImqChnW2oNxGQ4ob+pK7orUvDFx70WNRberUdqIJb9iHX5n64yn5 LN1XoO/D7Kf75MPmCJ25z1bm/SO+3dOVS/afS4/LoCNbmuP9US371AtL6FRKVowvr5TR saw7adT0QwL5RLzHQmwLVDl2dILdTgqnsNy1UfUFtQ9AAdYFdMpUrAffltg89v8DoAWC f0HazS92a5gyZiVevQ5YHkwHt886X0MCgouxfEs5oQGi16845echs4r7if2T/TCoZEP1 ArLg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DmOBsFCr; spf=pass (google.com: domain of claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2001:4860:4864:20::34 as permitted sender) smtp.mailfrom=claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com. [2001:4860:4864:20::34]) by gmr-mx.google.com with ESMTPS id h17-20020a5e8411000000b00652f6c18b70si151086ioj.0.2022.07.15.08.29.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Jul 2022 08:29:41 -0700 (PDT) Received-SPF: pass (google.com: domain of claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2001:4860:4864:20::34 as permitted sender) client-ip=2001:4860:4864:20::34; Original-Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-10c8e8d973eso6640281fac.5 for ; Fri, 15 Jul 2022 08:29:41 -0700 (PDT) X-Received: by 2002:a05:6870:210b:b0:10b:ed11:4e2d with SMTP id f11-20020a056870210b00b0010bed114e2dmr7943816oae.265.1657898981394; Fri, 15 Jul 2022 08:29:41 -0700 (PDT) In-Reply-To: <87cze7g5ud.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DmOBsFCr; spf=pass (google.com: domain of claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2001:4860:4864:20::34 as permitted sender) smtp.mailfrom=claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:30981 Archived-At: --000000000000dc0d9505e3d9af39 Content-Type: text/plain; charset="UTF-8" Thanks Albert, I was able to add lfs to my Docker image and everything works fine. Having more functions in pandoc.system would be great, but I'm also happy with lfs. I would say that enhancing pandoc.system would be more lightweight Cheers, Claudio Il giorno gio 14 lug 2022 alle ore 15:51 Albert Krewinkel < albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> ha scritto: > 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 > > -- > You received this message because you are subscribed to a topic in the > Google Groups "pandoc-discuss" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/pandoc-discuss/l4os8uJVm1o/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/87cze7g5ud.fsf%40zeitkraut.de > . > -- Claudio claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAMBF16vEydBSts6a_PhU-X5UmVSp92Ek-ryf2LGkMT%3DZD%2BWMGQ%40mail.gmail.com. --000000000000dc0d9505e3d9af39 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks Albert, I was able to add lfs to my Docker image an= d everything works fine.

Having more functions in pandoc= .system would be great, but I'm also happy with lfs. I would say that e= nhancing pandoc.system would be more lightweight

C= heers,

Claudio

Il giorno gio 14 lug 2022 alle= ore 15:51 Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> ha scritto:
Hi Claudio,

Claudio Di Vita <claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 an= d
> looking for files. I would use lfs (installing it via luarocks) but I&= #39;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 \
=C2=A0 && DEBIAN_FRONTEND=3Dnoninteractive \
=C2=A0 =C2=A0 =C2=A0apt-get install --assume-yes lua-filesystem
=C2=A0 && 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/hsl= ua/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=C2=A0 e836 388d c0b2 1f63 1124

--
You received this message because you are subscribed to a topic in the Goog= le Groups "pandoc-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pandoc-discuss/l4os8uJVm1o/un= subscribe.
To unsubscribe from this group and all its topics, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87cze7g= 5ud.fsf%40zeitkraut.de.


--

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://gro= ups.google.com/d/msgid/pandoc-discuss/CAMBF16vEydBSts6a_PhU-X5UmVSp92Ek-ryf= 2LGkMT%3DZD%2BWMGQ%40mail.gmail.com.
--000000000000dc0d9505e3d9af39--