From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31093 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: William Lupton Newsgroups: gmane.text.pandoc Subject: Re: filename variable Date: Mon, 25 Jul 2022 13:57:07 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004bfd6405e4a0b9cf" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20627"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCS4HJ6WSAHBBL5G7KLAMGQEIAM437Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jul 25 14:57:22 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ua1-f62.google.com ([209.85.222.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oFxeE-0005Eh-BB for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 25 Jul 2022 14:57:22 +0200 Original-Received: by mail-ua1-f62.google.com with SMTP id o5-20020ab01505000000b00382efb8efabsf3330355uae.12 for ; Mon, 25 Jul 2022 05:57:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658753841; cv=pass; d=google.com; s=arc-20160816; b=mLhNo85qCBFR25YdkGGjZeNuSL2jJNfUrF6jieDYY2x55DK8y+LOHI3B0E1FNmaJYI XnDWic8dt9UYpwVu8+Pr6w+UQoZ2YLDwiNnDepSpFvoD0iEt3cwtZIf8gAHLrDTGlS29 GyI6B8FnXjXG89TXevmTqG0dE8qfpnNKpXZynD3IfieM3RWhAE6+okurpme9TkqGqqRT SQledLNQo2eVzFalTOle8JGoUKfAOOxQzLsjOII+xWQs1jOtpt+UPIHfB1jhJqR9/VDg 9C297FKGuHogw+Q1IcDXyupaUWoTLLjxHZkLt/T4uTV1Zlxh8F0htJULO1IQ7sa1j4p4 qEwg== 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; bh=W5IsolzFx/arrLumMubYJKSPeFRIMn2ss3fm+DkAKLw=; b=rfd9+rX5mpjVZr6HvkgnDXhLciTTKcnJ5S2biKXbWSm2Xg312LEDJ5cwIoCXCX4wTC shHCbRf2DX+dZBA5wZa0Bo0s5txJyLIC4BvOgq4nd4XC7xDCz6SC222sfBnLcnQiMVIB HenWJyFnAK4Rf/7dSHvWnYAhf/V+npYmCFCjQTl1xGc9VS66EEGunM3fmBwlgd52eQdr e0WLOMqkp7KWmJawTkPjBQprcjo6okL707aEY1Rhaub8LCsrjKDR/G/xBjxXmULEzjz8 WpdPbA8Zy56jMpje+N+3B4Czhe+ucHe+XTE2cpBtDLJaRoWJ/sDuWQHcIh0Nw6gWrDnO 76yg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20210112.gappssmtp.com header.s=20210112 header.b=krnLSVBM; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b35 as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org 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=W5IsolzFx/arrLumMubYJKSPeFRIMn2ss3fm+DkAKLw=; b=PKwvG1YZ0QNhZDy1EOtj5/S5yfavxnadSKZeuFhBZY3izws5LqMRX9Sgc/ziPuOlbG +iakqYNbawvDlNxHg8Jtq569b+Ro8/L3VnTCYppb0iQ3qw91l9xbTWV4wqnIX8pgdrRP np22Io27f0Lti2hNVigDCjfX35HtOXlhTIQzB0PtGy2tccMCPLpF4Nk9Nqplm87Z287E w/UN/Cs9GZ+fa4xzXTyGQrcGoSK0mGA2BCfm/ayuVvj7ZQkQ6WyW2NpKDCEDkDjnVIkH nXYvnRv6ySfzuxTygOQyLBxDpBn+qZtwrgQ8TGYjRq+hTp6Bdz25FMRCL3mPd29mN/PT M32g== 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=W5IsolzFx/arrLumMubYJKSPeFRIMn2ss3fm+DkAKLw=; b=nRC3gHSiw3Pwaf8ZdD9d12VAvtNVzW0Hs6FmAxC2twHTqoHPoM85kPw3Yar90Fci7z RQm12oIpvXpt9rOBRtF9PAhtLj46i7TytfezxLFsuVYJqolHtOs3RW1Ew1P2+a4wbAmE +kLb6sm2pFFGBlRmACpO99Hf/g23aC4XjSjIiv1fSYiwzpjsUFuL+Pjiiw2RSssYwMyJ kLVLPyf7J3+bukqYoQx7J6Y0BKq5Tb3Gvcl/IVeiU5lElvTC7RzmK0dNnDzSXt2lzjSF uHfAC6TnEpyZLIORzgjH6aya7xn0UZkdpIy9ZJq/bHhd9jswhjg0Klpazlwhnn5NFswr 3Myg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora9FxxXaCZrUiaHhrTb4Mc7LQ7nz8YQNwizSsxwZRf4/AsOtiWAh KLeXnvtT2JzX9hmUVy3rdFo= X-Google-Smtp-Source: AGRyM1vpzm19/LhAYGUaEkcPMrAOZEAPWfmKDBzNf0ZfKjeckcd2wgGI0qmatjaNZyDUuquin5STGw== X-Received: by 2002:a67:e0c8:0:b0:358:3fea:a739 with SMTP id m8-20020a67e0c8000000b003583feaa739mr3347913vsl.25.1658753841411; Mon, 25 Jul 2022 05:57:21 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ab0:6709:0:b0:384:791b:e187 with SMTP id q9-20020ab06709000000b00384791be187ls251424uam.1.-pod-prod-gmail; Mon, 25 Jul 2022 05:57:18 -0700 (PDT) X-Received: by 2002:ab0:6046:0:b0:383:eba6:26d0 with SMTP id o6-20020ab06046000000b00383eba626d0mr3273654ual.86.1658753838744; Mon, 25 Jul 2022 05:57:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658753838; cv=none; d=google.com; s=arc-20160816; b=P+74I9CVgM+ml4NCxdCvNbh0dSlAFh8uXyRjAPBfXoNawWMwMF2SQf/MAzrtCLB++E dfTpksxmWZUfF8KkEY2c1JaF5gGAXCu2awlrtrzeyncD0YcOdA3fHtZsCjVYmYSrAvTs 2cMM/ayTiSlZGQcsS0C5K2YVdlwTswz9zeoeFBkXWts05pLySJ0SXGZIK2o08xknADgG q2j4KVu2CYNnuGEVxhg4HlwmBBRvbZyo52X1u9c+4YFkOXHrOSIc4lwccAFYL+P5Hu5z 065D3DeN6n0e/Q+6V/p9h+gpB3WO0r+nB6hN/VSlOSMWcgDorp6ZNbnoz/fwlNCi54Zx 9wxQ== 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=EDAYt4BgUcpPEsK1DbJuvIfxNM+FTOIGa69PT0nwsSw=; b=PY4dZhf4fysGSs1txh2OFNNZ5FG7ZfJxk73DObVcDlvifNnHuZV/9e0GL+eLmvQXU/ UE0wvyyjPJ+SEgFmIOYeJk1ENIizy2JWhSfIN9yjTbPE9crr9MUdY+IWSUMSZMv1XIJT t3u1kMMfaJgRMgvasv2VlaF0qMvtKjgwWfJE2XREWkzp32W8BN9arYfJoznF4KZhKmO0 Mp9N5PstBSI7cbvo5wMcz/DRsFm/m01RiLYU1UETKvBV11Rq1w9Jeq1rMih7Ax5XKL+R 8dBp5Aw0/i50Y34l83zwHohozLfxtOmXIsqiT2yYtvBhAPvf6PyPq7t1nGeI4b7UmIHe rbcQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20210112.gappssmtp.com header.s=20210112 header.b=krnLSVBM; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b35 as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org Original-Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com. [2607:f8b0:4864:20::b35]) by gmr-mx.google.com with ESMTPS id ay36-20020a056130032400b00384b4d1d59asi199356uab.0.2022.07.25.05.57.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jul 2022 05:57:18 -0700 (PDT) Received-SPF: pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b35 as permitted sender) client-ip=2607:f8b0:4864:20::b35; Original-Received: by mail-yb1-xb35.google.com with SMTP id c131so19836615ybf.9 for ; Mon, 25 Jul 2022 05:57:18 -0700 (PDT) X-Received: by 2002:a25:830f:0:b0:66f:cc60:c740 with SMTP id s15-20020a25830f000000b0066fcc60c740mr9412879ybk.117.1658753838210; Mon, 25 Jul 2022 05:57:18 -0700 (PDT) In-Reply-To: X-Original-Sender: wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20210112.gappssmtp.com header.s=20210112 header.b=krnLSVBM; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b35 as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@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:31093 Archived-At: --0000000000004bfd6405e4a0b9cf Content-Type: text/plain; charset="UTF-8" (perhaps also allow digits in the extension, or anything other than dots) but no there's a better way; see https://pandoc.org/lua-filters.html#pandoc.path.split_extension On Mon, 25 Jul 2022 at 13:55, William Lupton wrote: > something like this perhaps? > > local name = file:gsub('%.[a-z]*$', '') > > On Mon, 25 Jul 2022 at 13:33, 'Jan Ulrich Hasecke' via pandoc-discuss < > pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> wrote: > >> Am 25.07.22 um 10:43 schrieb William Lupton: >> > function Pandoc(pandoc) >> > pandoc.meta.output_file = PANDOC_STATE.output_file >> > return pandoc >> > end >> >> Thanks a lot. >> >> I tried to strip the extension like this: >> >> function Pandoc(pandoc) >> pandoc.meta.output_file = PANDOC_STATE.output_file:sub(0, - 5) >> return pandoc >> end >> >> But this only works with a three character extension. >> >> I guess it should be easy to strip everything after the colon with >> regexp, if one is not a regexp illiterate like me. >> >> juh >> >> -- >> 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/e0252aa7-3e87-6381-a1a9-4f67acf7fbce%40mailbox.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/CAEe_xxgM8dPsst5ceKWDfhb0BrR4gNVHC%2B%3DZFTatRHtqrfiG3Q%40mail.gmail.com. --0000000000004bfd6405e4a0b9cf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
(perhaps also allow digits in the extension, or anything o= ther than dots)


On Mon, 25 Jul 2022 at 13:55, William Lupton <wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org> wrote:
=
somethin= g like this perhaps?

local name =3D file:gsub('%.[a-= z]*$', '')

On Mon, 25 Jul 2022 at 13:33, 'Jan Ulri= ch Hasecke' via pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> wr= ote:
Am 25.07.22= um 10:43 schrieb William Lupton:
> function Pandoc(pandoc)
>=C2=A0 =C2=A0 pandoc.meta.output_file =3D PANDOC_STATE.output_file
>=C2=A0 =C2=A0 return pandoc
> end

Thanks a lot.

I tried to strip the extension like this:

function Pandoc(pandoc)
=C2=A0 =C2=A0pandoc.meta.output_file =3D PANDOC_STATE.output_file:sub(0, - = 5)
=C2=A0 =C2=A0return pandoc
end

But this only works with a three character extension.

I guess it should be easy to strip everything after the colon with
regexp, if one is not a regexp illiterate like me.

juh

--
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 pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/p= andoc-discuss/e0252aa7-3e87-6381-a1a9-4f67acf7fbce%40mailbox.org.

--
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/CAEe_xxgM8dPsst5ceKWDfhb0BrR4gNVHC%2B= %3DZFTatRHtqrfiG3Q%40mail.gmail.com.
--0000000000004bfd6405e4a0b9cf--