From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30019 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "'Saku Laesvuori' via pandoc-discuss" Newsgroups: gmane.text.pandoc Subject: Re: Include Git Hash in PDF Date: Thu, 20 Jan 2022 17:20:54 +0200 Message-ID: <20220120152054.bl2xemvivq5zeeqc@X-kone.localdomain> References: <98ea588d-45d4-1d50-5d30-c7d676728c23@mailbox.org> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e6dfjobakhboelda" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15551"; mail-complaints-to="usenet@ciao.gmane.io" To: 'Jan Ulrich Hasecke' via pandoc-discuss Original-X-From: pandoc-discuss+bncBCL4ZZGNZULBBWP3UWHQMGQEQFUUDEI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jan 20 16:21:00 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f62.google.com ([209.85.128.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nAZFE-0003va-Oa for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 20 Jan 2022 16:21:00 +0100 Original-Received: by mail-wm1-f62.google.com with SMTP id l20-20020a05600c1d1400b0034c29cad547sf7106522wms.2 for ; Thu, 20 Jan 2022 07:21:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1642692060; cv=pass; d=google.com; s=arc-20160816; b=duxCWUdAbDhnV70zHJW32RdEl2bjeSlsL8oL7aIuWE9PizydVaxdpMw08+8jNgc1MP AqJDSZdr32Q4C2DiZvN3LzblUX52EivVIEYdGSZ5C+diaAG2pnyToQyv0DvQpoFrlfaO F9+Jx1FRHHqLqQnjOI4ZmEuQQ278RoFJ4Jg00LQk/5rZh0hqWecgxUlpWXbDPyXTVjme 10vMo6a/GWD+Op9l/2AuKlyByAXw5n8D25ofp5p37Fa0PYaSXTxaOnaV6lvlRe+Lgz9l /HikrbsL31Sc1Bad5w5w4JXO7vkzJjoEUO4EnFenVfQBpSPC4FXsj2fMmcvdU76t8scX Fqpw== 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:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:dkim-signature; bh=Go8QS2L+XKA3CF4S/35rvH3mJ8hYZvvZNsY3Uiha8fI=; b=SL+NEIskhKCH+Lhy2F+DJaTaHoz9ZykwSal+k/jbIwuAU5XPTMOdANVb7zAUoUaF8z Hzo8pdkSmT7welpocQIzVog0DpfR6TTVvpVrORxJTDcAcdM4Wksq/2XQymEQQ5aCVXKe SlDGSAmpjkxXTr7EphB/8zn/0OzkuKlC/jven8G6caGLcd0wVZolJnsUw2nkcYfQor++ +BvVGpiANV2xid2HL7F/pxbZXcGQOkyPbgmyUw4quoMNoa0VOF3tN8ntsq/+prEV6vGC OpoiuiJ4h8lLImHqb90pjtw6r0R7OHrZUqaW6bdNzjG3Y0PxlLLV+QVmLaFbJzmTNSch PEBw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@laesvuori.fi header.s=mail header.b=AadO2IuY; spf=pass (google.com: domain of saku-fz/45XiaGUo8FY+3fohqFA@public.gmane.org designates 75.119.130.101 as permitted sender) smtp.mailfrom=saku-fz/45XiaGUo8FY+3fohqFA@public.gmane.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=laesvuori.fi DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-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=Go8QS2L+XKA3CF4S/35rvH3mJ8hYZvvZNsY3Uiha8fI=; b=Idi0+VuW70U2uxpxHR4TRU7NxSeG2qR5/EVTnA26iifVCvu37GSWvljzhN44o6hpO4 fIst9lAMZ09OlOAykkdWx5XIox7ImoYN66zkFloTTPuelPJkLEo5hSJQYHT2HBYxaiAY w45yxK6gmjO1rRwbhnTcwjgiwZMUfCPLj9V7WjZfczMNDEEzi/bR2nN2XQackObe18nJ Y5+221pgCWXHm70p7dXdOIPo1Esd6vlC2PeNXmUjuRHK2LEehlCJ5qBrdPeI5I9G9PQv whGwZ0kRGrLhZVygtY6gJD116+GZrqhbpo4/3x8vj4K5ihdQKFUGwpbk/JlnqHTC7Xs/ tFNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-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=Go8QS2L+XKA3CF4S/35rvH3mJ8hYZvvZNsY3Uiha8fI=; b=MEckbG4pLqB0S0fD5Mj+IMc+tAHOKNepVq5lNtFANfu3jQa+wYhgQN31GSBw/W5bAU HHhr5394B5PF+XL+x73doUsx7lS+MoziCaLlHp7XtL8VuBvBUj8zYkg/NLuOX0Q6HbX0 7k5JPt5RcSgNGT5cwXtlsO7upWT3jqOAL1OY7oKTjkU1gWNQKlvTYw2IkDJslIQ2DMmy CRw4vl/3jUvIvdXP6JENNfyOljp6ol99YvFzhCOxCqN0a0K2rl650GAlXDfTalgfEwyQ Qju5pEj+jb+MJwdAyHqT4UbfjvCv4BucHQBDRh3gqqN/hy6UvUfFNyPZI1ak7XUkNFiF q1Fg== X-Gm-Message-State: AOAM530MMsxwgGcGa5iJYUsKEgd7fvaDYAGL3mGnVt2MbQsuBMbTZRod othQRatPTWClSY45gcCGmPk= X-Google-Smtp-Source: ABdhPJwi2R71B81uT3d8ddX0iXlN4yGj8PBZvQFUVAd5IRPVXdOAPFQE4TetX+EFTc6WU6njTAcG9Q== X-Received: by 2002:a7b:c7cf:: with SMTP id z15mr9387349wmk.189.1642692060352; Thu, 20 Jan 2022 07:21:00 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:adf:e390:: with SMTP id e16ls341908wrm.0.gmail; Thu, 20 Jan 2022 07:20:57 -0800 (PST) X-Received: by 2002:adf:f9c5:: with SMTP id w5mr8611412wrr.362.1642692057157; Thu, 20 Jan 2022 07:20:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642692057; cv=none; d=google.com; s=arc-20160816; b=MWnN6mkN4rw1kdXLhxiT4fof7R/qx3omBvFmAmuTlQh4fQbtV7SdNtvl5UDfRTzX5Y 4cLeEq+Jef++1WguGShelv/aYRdbOuHT0zOHp0mxnibsf2GneZmlRz6xdP0+BSspw5K3 Zh2WM+wNVIGg3DGjBUtGal69U1EJmRUv1MjreH/o/Luy+DmeOXMi+qPHK/mK9cIYVpQL 8WKrwkrpYooAvyuNXbGM7wwU6ZYRcHicjpKMSFgLflchaRICJ3BTBhCDcp9WaIbJQUWv tvcPSx1LOanOZQt0dgvmkY106DRkygxRAoUoN9OA/u3EfP8WyAcCh0+G21hT06d//4IB DmWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:dkim-signature; bh=W4gujvGj1YtCiYM4pH46iclObtAoQpltwWRBdvW0X/Y=; b=jFryOaSXAQkjSv4D2wjEfR2Nh9DYfmuj/uxQd9s3TM/B6jCXXfpNUQRacJNpm+DFUb 0NvzvBAWe1dr59hFGQ6e3brblTiUoCfPSonb4rLNbyYdL9TbN7VJUk/sLlLQTicfgnPF u8jHe9XDaNJQ8HfMX9ZDURqcqsSJ1tR8BWqmTv6nupgQGTlXdX6Ntf7hhzwokN7D7WqR FpzgB2dSlQX9wN7t6QvKR2bncV3xYGHMuPlwpxJ6CyAZ18c03Lkzn3ysyJ9g5Xr6jstW faJ+UrhnYLnNinPQReoghe6xcEYqr3N/+32wYyHam7D0kRhC1kOgktqk9hhzeITzLvTW N/og== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@laesvuori.fi header.s=mail header.b=AadO2IuY; spf=pass (google.com: domain of saku-fz/45XiaGUo8FY+3fohqFA@public.gmane.org designates 75.119.130.101 as permitted sender) smtp.mailfrom=saku-fz/45XiaGUo8FY+3fohqFA@public.gmane.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=laesvuori.fi Original-Received: from mail.laesvuori.fi (vmi571514.contaboserver.net. [75.119.130.101]) by gmr-mx.google.com with ESMTPS id o17si625713wms.1.2022.01.20.07.20.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 07:20:56 -0800 (PST) Received-SPF: pass (google.com: domain of saku-fz/45XiaGUo8FY+3fohqFA@public.gmane.org designates 75.119.130.101 as permitted sender) client-ip=75.119.130.101; Original-Received: from X-kone.localdomain (88-113-24-127.elisa-laajakaista.fi [88.113.24.127]) by mail.laesvuori.fi (Postfix) with ESMTPSA id 851853416B5 for ; Thu, 20 Jan 2022 16:21:02 +0100 (CET) Content-Disposition: inline In-Reply-To: <98ea588d-45d4-1d50-5d30-c7d676728c23-cl+VPiYnx/1AfugRpC6u6w@public.gmane.org> X-Original-Sender: saku-fz/45XiaGUo8FY+3fohqFA@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@laesvuori.fi header.s=mail header.b=AadO2IuY; spf=pass (google.com: domain of saku-fz/45XiaGUo8FY+3fohqFA@public.gmane.org designates 75.119.130.101 as permitted sender) smtp.mailfrom=saku-fz/45XiaGUo8FY+3fohqFA@public.gmane.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=laesvuori.fi X-Original-From: Saku Laesvuori 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:30019 Archived-At: --e6dfjobakhboelda Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline > I tried to evaluate "git rev-parse HEAD" in a build script and hand over the > result to the build process by setting a custom variable to the hash string > via --variable hash=${git rev-parse HEAD}. In my template I have $hash$ The syntax for including command output in a shell command line is $(cmd), not ${cmd}. ${cmd} expands to the value of the shell variable cmd instead of executing cmd. Your command line should thus look like $ pandoc ... --variable "hash=$(git rev-parse HEAD)" > I stored the hash in a file and tried to include it with -B, though this > would not be a good solution if it worked at all. Do you have $include-before$ somewhere in your template, if not then pandoc doesn't know where to include the contents of the file.