* Using lfs in Pandoc filter (for scanning directories) @ 2022-07-14 10:40 Claudio Di Vita [not found] ` <0b03f580-ac49-4589-98a5-c955514dbab0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Claudio Di Vita @ 2022-07-14 10:40 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1060 bytes --] Hi folks, 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 ? 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. Thanks, Claudio -- 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/0b03f580-ac49-4589-98a5-c955514dbab0n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 1483 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <0b03f580-ac49-4589-98a5-c955514dbab0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Using lfs in Pandoc filter (for scanning directories) [not found] ` <0b03f580-ac49-4589-98a5-c955514dbab0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2022-07-14 13:35 ` Albert Krewinkel [not found] ` <87cze7g5ud.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Albert Krewinkel @ 2022-07-14 13:35 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw 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 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <87cze7g5ud.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>]
* Re: Using lfs in Pandoc filter (for scanning directories) [not found] ` <87cze7g5ud.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> @ 2022-07-15 15:29 ` Claudio Di Vita 0 siblings, 0 replies; 3+ messages in thread From: Claudio Di Vita @ 2022-07-15 15:29 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 2950 bytes --] 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 <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 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. [-- Attachment #2: Type: text/html, Size: 4589 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-15 15:29 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-07-14 10:40 Using lfs in Pandoc filter (for scanning directories) Claudio Di Vita [not found] ` <0b03f580-ac49-4589-98a5-c955514dbab0n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2022-07-14 13:35 ` Albert Krewinkel [not found] ` <87cze7g5ud.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> 2022-07-15 15:29 ` Claudio Di Vita
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).