From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31092 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:55:30 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007b54bf05e4a0b3e6" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13422"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCS4HJ6WSAHBBTNF7KLAMGQE65NRXEA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jul 25 14:55:46 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 1oFxcf-0003EY-85 for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 25 Jul 2022 14:55:45 +0200 Original-Received: by mail-ua1-f62.google.com with SMTP id r1-20020a9f2c01000000b00383196b2690sf3346461uaj.18 for ; Mon, 25 Jul 2022 05:55:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1658753744; cv=pass; d=google.com; s=arc-20160816; b=tu0xImjKiSe50PZWWA3C8CVBT8f22ef616lZfBVMka196mmguD/r0f0RA3ItCgQeTK 6C0A2oSJP2YcRe+mNJysFQ6QEPDTJcptQd51pCWxVfnnJQ35Izs7/vYrx3i63FcLDXEf ZEycQaxhez5SbkQpC2Si77ypUw6XbbNQlp9GMxLpknoINXMYuf9+xHEPZyZIzqj5KMUN GC70xOXcnPGAcdaMm4sqmJgJvFjYFJanEI402ms5pylLBlX8rEWiHQ8wmGuScouFs24B UzqzXkllToR70yS2RNhf757yqecC030O6TjMgcehFDO5RSVOee9wjzrb4U83yl5bz7Dv AXPg== 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=ics4FL0TFAe7jkZqRsnWpT6RBAy+Bfh9TzvQkvW+xYk=; b=DcBUEfTvILEH+IAte4U52uv1LQoDv4t85J1/+Q7Ko2ejVCycCoUtDsphmzSNdC2MKO ooIoAyY+7CV/BhymlmYCTKjzQBZk78/PZ7R1gA0Sic+N0jw9eMi3gyG80cdBMCoWErCb 7eleB4oaTqIJYRr10y+TSyfVJ/bWxMn+Zs0+TYUbPXWQqiGehm5ZXG4mxQw+jYO1P8Ei oaeQ7S0VpVmY/CUsMmFenPALA7rkXETxtFtxlSdlYPqX28xFQs9R0Ayy0cJHjcwhpMb8 zgbDs9/rphsPQQF6OEOdsNqq/dqBF4F3Jevm68mkFTk0S84v0Dz1NS4rz7TQM9oPLlwm baog== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20210112.gappssmtp.com header.s=20210112 header.b=0iM8qfDt; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::1132 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=ics4FL0TFAe7jkZqRsnWpT6RBAy+Bfh9TzvQkvW+xYk=; b=fphvpvBozWkwx17BtqUm69yKYtjIBruISF1CvE3wFSqLVjpMarTnaskq0bfh1k5Hb3 YvsIe6YAys7WFiqzhHIsKHq0HHQnrQBnj2IOiGUopAeBNu/wtxGWx69RczHFjJ0nShqL 9WH9RrnT6n+DcNUGvnWrslh2+5aRA6DZGU17uF5xK4RKVn5HtqjO5m7I/sO/Jmfyo5BV I9X+nSNQLuT083muSF3/cGKOyjr36RNuKC4ZUkB4oaON9qpdGXfHGv/k0y8HzCwuS8ze BqTXnK6kjnaYXt/RoGuS2WJKXp9cJzLvhoY95a/JdwZcuiCaRBzqAGnyoyq+fh3noY/C sdgg== 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=ics4FL0TFAe7jkZqRsnWpT6RBAy+Bfh9TzvQkvW+xYk=; b=TYAaxCihSfcQfEtkp8XG3sBErjXV//KvHMreGm91mFHPtsj5JDuIqc7cY8HmmQsOMy oa98R9wDWajVLd3/widKcpCaQIBCQxLxU/Kr1imeU1Xe4BKF67ggeUNRV1O+gRsKtsSW q4Qr+WIoN/49oTPDTVg69gTSUw6kYTjdbFRDXg8FtcX6zVrUoPEkpQ81LggA0H8vVHuT S7RC6yCfzU2hfJ+L776CmniBQ0xLI9CZ3YAH0vhG4MaZTWR5xhAUuy+2QjkyApxjX7cN xh9QohzWXvr/XGOy3qbblD2row3vqu1LHa6FFhKXQN//AGGeXrb0m+HxYNYyAjgS1JgJ BXFA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora9Fj962BP3eumhjDPFLZ7o/RKnyyZLAycXxI+p5oXmhu93xGaTa l3XkA++UFbn/s2afVNbnhPA= X-Google-Smtp-Source: AGRyM1vPLvt+bNvmg3yhoK39OKnZJSdjwgBIDtyylLevfsDCZtYZ6oFgWNtHkndYGXtc8cA3KoQZ6g== X-Received: by 2002:a1f:1b0a:0:b0:376:2ed2:66f7 with SMTP id b10-20020a1f1b0a000000b003762ed266f7mr3241556vkb.26.1658753744305; Mon, 25 Jul 2022 05:55:44 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6102:a89:b0:356:5f65:c81 with SMTP id n9-20020a0561020a8900b003565f650c81ls761681vsg.7.-pod-prod-gmail; Mon, 25 Jul 2022 05:55:41 -0700 (PDT) X-Received: by 2002:a05:6102:512c:b0:358:3e44:3436 with SMTP id bm44-20020a056102512c00b003583e443436mr3085051vsb.5.1658753741260; Mon, 25 Jul 2022 05:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658753741; cv=none; d=google.com; s=arc-20160816; b=WbBwVVJPfY4uNF9FEqsvN4/jxH3esx2kf1Rf5LQFfyhfNdl903dL50A2/Jf0iFcGrk Uln5F+RS7/DBLkwLx6nnDnIDAcCtJIf88eJ8wl97/MALiSJrpQTenZd5U+ogk7ivJ/HK WzV1h3sF6OzDLWkU5CP/mc3zQCt8Jxt1l/ye0zb03onrb8axZaPltBdlNEXhoEiSNosl NmM+SG81JB7hxGmzvWIlYIM/NLNAn/+f+3Jmt77QMujmZNOH+PCdY9T8FANrt9mOIcv7 qBgkyUsnqz7JV6Fzr4w//eesZsQur+1/gj0pOaSaT0BEq0UkZJ0TilQGDEU940tWE2ac wxKw== 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=K+96qFl951sY1O5n5UzUmy9k2UpeJ6wH/K7EiIrmgFY=; b=Vbg1fRcO43AG3XWdcQC3Ev2PGEmw62wv92y3BHutd6Hq84ngcqJ37R3RB/grGyQS8F YyG/roxPtkJ0vTTR1tAJNBOLPiS+3zZrs33NvkHdEbysfJgWmZQq/V9CZxNJcI7a1yVt OPZHcclzOY713DvPaxgGfebz2zCGjJh2FMEOxBbbc2CEfTIePQtrx4AoYvg8hBCfpTBa VkAywyjUyopd51golFn850K9uDl6ljNqYqiHe0MULz9lS+rVZFynKDSrI3+xXdqwtI6p H7nViPBBMp2Bz5xx8YgE4aXRL/4nQfRaMl46pxVLaeLBRonSgCNDgMcjsiwQYnh8aXt5 76ZQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20210112.gappssmtp.com header.s=20210112 header.b=0iM8qfDt; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::1132 as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org Original-Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com. [2607:f8b0:4864:20::1132]) by gmr-mx.google.com with ESMTPS id f10-20020a1f1f0a000000b00374b7d48bf7si467142vkf.4.2022.07.25.05.55.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jul 2022 05:55:41 -0700 (PDT) Received-SPF: pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::1132 as permitted sender) client-ip=2607:f8b0:4864:20::1132; Original-Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-31e623a4ff4so108533867b3.4 for ; Mon, 25 Jul 2022 05:55:41 -0700 (PDT) X-Received: by 2002:a81:60d4:0:b0:31d:9c74:357b with SMTP id u203-20020a8160d4000000b0031d9c74357bmr9967528ywb.418.1658753740651; Mon, 25 Jul 2022 05:55:40 -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=0iM8qfDt; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::1132 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:31092 Archived-At: --0000000000007b54bf05e4a0b3e6 Content-Type: text/plain; charset="UTF-8" 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_xxjdkVBoGTUXRPUgnGXEYAf0JZbAabEWjr%3DwNGq6joD4wg%40mail.gmail.com. --0000000000007b54bf05e4a0b3e6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
something like this perhaps?

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

On Mon, 25 Jul 202= 2 at 13:33, 'Jan Ulrich Hasecke' via pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org= > wrote:
Am 2= 5.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://group= s.google.com/d/msgid/pandoc-discuss/CAEe_xxjdkVBoGTUXRPUgnGXEYAf0JZbAabEWjr= %3DwNGq6joD4wg%40mail.gmail.com.
--0000000000007b54bf05e4a0b3e6--