From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29911 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: gnpan Newsgroups: gmane.text.pandoc Subject: Re: Convert from Markdown to PDF and Set File Name From Metadata Title Date: Thu, 6 Jan 2022 10:52:02 -0800 (PST) Message-ID: <647677f8-5407-4880-926c-3ef1c8cfeb92n@googlegroups.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_834_1294196104.1641495122042" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27340"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCMK7GUUXYBRBU7U3SHAMGQET6WC4WQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jan 06 19:52:05 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f186.google.com ([209.85.167.186]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n5Xrp-0006ux-NQ for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 06 Jan 2022 19:52:05 +0100 Original-Received: by mail-oi1-f186.google.com with SMTP id y74-20020aca4b4d000000b002c6fd8df444sf2331440oia.22 for ; Thu, 06 Jan 2022 10:52:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=7EsCaDqOu8wC5G7jtafpwdfsWXWPhy/+855Ct+0SETM=; b=MjH2QP5cDQgT3l5ei0bq3FTS8L5qTcnm19rOesmlV8ObgxCRpnaSHizY/XK8/Xh93T OrxtD5+ca26XPecc10tgbsuCu2w/Lg4CNgXYiFV4RACyfp7BQgLbuNVzq5Ejgfa7BrqR OmxMsp9l922k/UoZMvZpPv9IbA3Io07e03MwIzI5+z2IfpTNY/oZQagoo+SSqmTDeRwb UiSirrfMKddU3byImXH0KAl1xguuHEFNrUmOvAHUYpnK7J6KQPXuH+bO9MRVPNR4+XqC 2l7A7CiYyBdtcIEp46C0tK12LAlJdaChXgAtszaO8zE/vSWyo08Pj+30Iiv8PNtP9J7W zQng== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=7EsCaDqOu8wC5G7jtafpwdfsWXWPhy/+855Ct+0SETM=; b=esDyNsyDuZeF3PRhL9dnOnfWlhZn3wt++eTuAhlFinC7Q7tmcNYF1lMvHSJshE1FkH sFHcZ2FfWr2dH+nakhIfD2LyhOBUquljM3vZDsVzSEe0u7kuUF4y946NSkRdUI53ByfK 9k4dcMugxTW2FrVNzShOSh3TPYbdmGuc9ZHq1S/oLEZcZShZUX+ut4koQPwvA7bqWDIa 7RU7AWvTaj/loGXJmZ0z6DGm+pxicWFl/fd2aQ25NpPc69PDPYXON4tuy0M+EkhO8hMm cZYnQV5L89sE7hozrXVud8wp/wNDjh9SZD81P9Vjz6DO7iHe50RwbxKg0Xn4GyQQg/58 TsEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=7EsCaDqOu8wC5G7jtafpwdfsWXWPhy/+855Ct+0SETM=; b=j0hvI08y6CV/az7DqeiTso4Vjygp8OvrRMZTBWRK9cfvAwIQr7EIbq29/EXYrHcYlX Lv9UoWor33dSjSh2c2hUeHh+mzHG195UZ4JTc64S3ASq2lYritnCYjLzAumu0RCqiS2A x1uoe7eT/4YprdcM+yfY1+IN8w+XHqwBdY2jM1PyVdaoND8v4stV0rrXGVhBSx6RAOtt j07xc0OtC0Dtb5+q8ZBUar7Uyw1lYqujkUcoMEh6f0043IBCn9Q+kijapPIzWRnTQ6+T u2JSqJoa5nJmLWdpW/Xm5r1L6FnOQltLXFwFVJ7+rtQBCocMZRMmEu5+lkglZXIcXTPA ZmJA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531CjxtL+LSI+FgQDmZzwVgNishzen4c+l6BQOvkbjnJxhYvx/MW MkpxtT+ZdQobdth/vGyvUI8= X-Google-Smtp-Source: ABdhPJyOUL9kQe2o5rsdK4dM0ckW3eGCRwstzsgO1GAKo3zh4hCDaoaIFnEElT11bF9NPEu5bhgSxA== X-Received: by 2002:a9d:4b0d:: with SMTP id q13mr8373676otf.50.1641495124122; Thu, 06 Jan 2022 10:52:04 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:438e:: with SMTP id s14ls645096otv.7.gmail; Thu, 06 Jan 2022 10:52:02 -0800 (PST) X-Received: by 2002:a9d:6351:: with SMTP id y17mr42916654otk.105.1641495122672; Thu, 06 Jan 2022 10:52:02 -0800 (PST) In-Reply-To: X-Original-Sender: g.panayotou-Re5JQEeQqe8AvxtiuMwx3w@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:29911 Archived-At: ------=_Part_834_1294196104.1641495122042 Content-Type: multipart/alternative; boundary="----=_Part_835_1188597386.1641495122042" ------=_Part_835_1188597386.1641495122042 Content-Type: text/plain; charset="UTF-8" I think you just need $title$ in the template file, not $title-string$ On Monday, 3 January 2022 at 20:51:04 UTC+2 John MacFarlane wrote: > > There is a way, but it's a bit complex. > First, create a template title.template containing just > > ``` > $title-string$ > ``` > > Then: > > for f in *.md; do pandoc "$f" -o "$(pandoc $f --template title.template -t > plain).pdf"; done > > > SlyFox writes: > > > YAML Metada looks like this > > > > ``` > > --- > > Tag: tag1, tag2 > > title: "Title I want to use" > > Status: active > > Name: "John Smith" > > --- > > ``` > > > > I currently use this command > > > > ``` > > for f in *.md; do pandoc "$f" -o "${f%.md}.pdf"; done > > ``` > > > > How do I set the command so that the file name will be taken from the > title > > metadata? > > > > -- > > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/fd34c62a-0d28-4bc2-a736-9cef71e6423bn%40googlegroups.com > . > -- 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/647677f8-5407-4880-926c-3ef1c8cfeb92n%40googlegroups.com. ------=_Part_835_1188597386.1641495122042 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I think you just need $title$ in the template file, not $title-string$
=

On Monday, 3 January 2022 at 20:51:04 UTC+2 John MacFarlane wrote:

There is a way, but it's a bit complex.
First, create a template title.template containing just

```
$title-string$
```

Then:

for f in *.md; do pandoc "$f" -o "$(pandoc $f --template= title.template -t plain).pdf"; done


SlyFox <iv...@staroversky= .com> writes:

> YAML Metada looks like this
>
> ```
> ---
> Tag: tag1, tag2
> title: "Title I want to use"
> Status: active
> Name: "John Smith"
> ---
> ```
>
> I currently use this command
>
> ```
> for f in *.md; do pandoc "$f" -o "${f%.md}.pdf"= ;; done
> ```
>
> How do I set the command so that the file name will be taken from = the title=20
> metadata?
>
> --=20
> 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-discus..= .@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f= d34c62a-0d28-4bc2-a736-9cef71e6423bn%40googlegroups.com.

--
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://groups.google.com/d= /msgid/pandoc-discuss/647677f8-5407-4880-926c-3ef1c8cfeb92n%40googlegroups.= com.
------=_Part_835_1188597386.1641495122042-- ------=_Part_834_1294196104.1641495122042--