From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29891 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Convert from Markdown to PDF and Set File Name From Metadata Title Date: Mon, 03 Jan 2022 10:50:18 -0800 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29091"; mail-complaints-to="usenet@ciao.gmane.io" To: SlyFox , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBFULZWHAMGQE7QKGJGI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jan 03 19:51:05 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f59.google.com ([209.85.161.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n4SQC-0007NJ-CQ for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 03 Jan 2022 19:51:04 +0100 Original-Received: by mail-oo1-f59.google.com with SMTP id k15-20020a4abd8f000000b002dad9892c92sf16042882oop.5 for ; Mon, 03 Jan 2022 10:51:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1641235863; cv=pass; d=google.com; s=arc-20160816; b=z3UM9WVDPPkzaXNHrIbsUeIYP8QGxPeLNba17s/jQeGNiHYLDjFrMVCU3I7pRRbRXt KPqmWTazc2AtEZz9yTVMelnkikinpQOie3vmpWyWIYBCp06N8JVLwCh4ImjT6ss/eADx qqnOBm+r/6tZE4RFlXdMBdclpPLieH/W+Tykehjll2K3mPyBoYKo20kyR61nFR+29nGj Z1MiQEv8zv3TDyl52BQ9TONE/hWT6PQGAIxYE4w7e5YilmtXdF31zW4OIoFnDBRLYIPN d+P13h653ITZ7c5mmZHHbiHw7dvWrcjj01qxgAOAJIKyBIY2qLtjff828dQZt4n2XmUq nRNg== 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:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=idouOENmdrWoJZoNgbzsbtWPqV3IwiGWnqyOeAd2q7Y=; b=UO9V9ltj/F5lxHvtQ05D5EIfAv5kXhT619qeUqLo8KF/UHxvzQxDI4DY1+w+qhNBWp TMeePo4urrg4q9ZheVRJQiM7t8BvC0XqhKz1OmLjNuICDjUxkqqQfbSorMZC+9a7iweL 2zSXvpJRpANSxTAxqUR0LyJxIpFiEtWwEUNLmDeq/B/5wEV/9OMSkBfcE/w8v5ASuTt2 o1S56jpYsg16B8ba2C2E3+fMMtV56U5yWkWLWbsflm2bhoWOD+JYAyjEiL7n+vnDo7GG x/kCGphJkDIKACOiOjDyKjE6kiWchgQtU9RnukAD0x/xl0jCZQ4ccRNcS+rzHpYEerre tCDA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=hrdus1mG; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1033 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version: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=idouOENmdrWoJZoNgbzsbtWPqV3IwiGWnqyOeAd2q7Y=; b=ErNbzGMuThMmXQk6cHNEAxzE2mUWiSJdMVvitNyePlJ0UyXrz/x3mTEFwmwhtDA3OR D+JBLVx7GtmR2XKbNju6HG/YJI6jErHuD/hlS/+M4TgmGnpGa5oboQNksIeTVEqcA5Z+ fDDcYKB34cjQs9L5H3kerCys24TAU3AuifkdTmymLYxaKO8OV96JE/BBuUqAwhunQ905 dX1q4hlrnvVyhFin+BUUsaevGgx7zc7/UBMDY+8Vn5PtyKnJs1qdRy6hldEGqNVpYlkb h1EmuIP6/VZ9h+OV/NUHTmvhdGvV7ZbBFhB6F8i62IxB33B/UESOut1ok9d43PZVzqjH DDGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version: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=idouOENmdrWoJZoNgbzsbtWPqV3IwiGWnqyOeAd2q7Y=; b=Q1731y9EnAstDm6gjWu6Vh1KGr4vIrRWzqtJnq8LDLZ5LLDYUf9TBbB3sXWOjHu97X EB0t3Wr6NthQHl2aL+yDXKccioDQGndfcq1P7V9hE6lxG+u2paGm065/PAnNYnc8Vg0n NBycjuULfsYrUh/aeipnsoeYD82r3LESr7v5kTTCsr5PmN+7BZwZFCk8/OcCMlwieVJc 1KRZKlh2032UO/u3D6dmU4xC2qbKWxZOpxS6MniqZhupxhd7TnGgSC/eRVnBfi1dcX5G CsHUUvEc3e2pQ/BPFQcVRwQDt9eV8WFQtLv0hCD17Z7yY0N4Nt4fzJC4qkGyltqvAP9a h8MQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530JDp6btMv/cVFFQCcx9y2LX1O1lEYMzUj8y91Bu/zVNLYHfTlO v6YEG8LTRtN66qISfdVYL2E= X-Google-Smtp-Source: ABdhPJyTLyf9jIemkgaGV0yqOOHYudTTQHZ1X78WU1gkn/sg86uONutB1BWOu64fxZo8tYJaNjs3bQ== X-Received: by 2002:a4a:982e:: with SMTP id y43mr29827463ooi.57.1641235863413; Mon, 03 Jan 2022 10:51:03 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:2466:: with SMTP id x38ls7103542otr.10.gmail; Mon, 03 Jan 2022 10:51:02 -0800 (PST) X-Received: by 2002:a05:6830:110d:: with SMTP id w13mr30330851otq.348.1641235861983; Mon, 03 Jan 2022 10:51:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641235861; cv=none; d=google.com; s=arc-20160816; b=rT/E2/4Ue92tDLlbiAFA5cY3HBXrCiCrSmTKE54s4kxtSQT2+1DmUbvYrnAUnbPky7 u1uTeNB2EIF+/COZfZur2ERy/n+mCgRIBOeeX6MiQ+bGs9YmS0HV10mjmYEd9ONIiQ52 KwdC0Wj3KUwvwJAo69tHjYwJJaNuI2ELc0L4BvvJKOCyn8raiuLS8F8c+vQ2zWKphKcH 4V+b7Yj0vxFk/NZ4JTWv41Tp9qYi5Lf7zca/9HoeBEsOsLFkrFKwYwe2JW4zX2QjuMjL b4ZjxzwwbNEA2Tmif8G5pMHK0eTPu4y3PNuUYIRbTT8cVYfoDs6bLAaBnlbY766+CSn4 pRoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=O4xLqMDd+lVrrlkkS3B5k6RLpoQxLAB0MeCNAQbFo00=; b=cstmTcXS6MMZYLfB/vimCs77QzNUfY2CKILcxHDtrrnld8fKwsCI2ZtjvwJakaXUKs 8upO8n6HumbYuGr3yowk74uSWoWR5/bziWWdHlUcPP05PLsKImyr3sjsWm2rO2nrj7YZ TlXzLKChhcyuf73Sbzg7VJnsngjrW8SoVbocDUo84AGSShGQIlS1/SG4ZWmX+OZ49D4s LzRdKCrKAFw9vnkJKzqHnTELApkJQTYp4B9HNcoAoXsaCId4qn70pAGafiyQt/dN5tVX xvxce4hWT1CNd5h3+W+nPBZXkLw+/F1zLvus2GDJVupdos5BHWlQNb6x6VxUKF58kOi2 8WFA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=hrdus1mG; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1033 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com. [2607:f8b0:4864:20::1033]) by gmr-mx.google.com with ESMTPS id a10si2250784otk.2.2022.01.03.10.51.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Jan 2022 10:51:01 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1033 as permitted sender) client-ip=2607:f8b0:4864:20::1033; Original-Received: by mail-pj1-x1033.google.com with SMTP id iy13so29461389pjb.5 for ; Mon, 03 Jan 2022 10:51:01 -0800 (PST) X-Received: by 2002:a17:902:bcc2:b0:149:b095:6a75 with SMTP id o2-20020a170902bcc200b00149b0956a75mr11907991pls.163.1641235860544; Mon, 03 Jan 2022 10:51:00 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id e11sm35653960pjh.14.2022.01.03.10.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jan 2022 10:50:59 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 034F3A29D; Mon, 3 Jan 2022 13:50:19 -0500 (EST) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=hrdus1mG; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1033 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:29891 Archived-At: 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-discuss+unsubscribe-/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.