From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33290 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: DG Newsgroups: gmane.text.pandoc Subject: Better way to get default datadir Date: Fri, 10 Nov 2023 01:28:43 -0800 (PST) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_47528_1450811268.1699608523358" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9670"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCX7HJWDUADBBTHPW6VAMGQE3SPGPHQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Nov 10 10:28:48 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f60.google.com ([209.85.160.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1r1Nom-0002OH-2F for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 10 Nov 2023 10:28:48 +0100 Original-Received: by mail-oa1-f60.google.com with SMTP id 586e51a60fabf-1e9e1f0edebsf1600982fac.2 for ; Fri, 10 Nov 2023 01:28:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1699608527; x=1700213327; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=zEOFibtdk2OeHGZLRdggm/j0D0jj5nwuSWizKtoIOko=; b=E/H6kC5cwoxg/mh+xKSj2oeFK4GZDswXq7qkB3oeHwff20o4GiwsvwEA/XJeLDurWM 0Juet1m8eog0HqAWqw+pz98uQi0f+mK86CIC9ID2BVl53OAiJkBEUjIsabadYeZyVpLO o50SRXA5AfN77IRa3NhoZIu0x4HElikiet7QHDCf+PhbZBqybrB0JQwCPd8lS2sn94qf Chsc+0fp1kdJNB7WOQX2cRuIDA5+opVCQYD5r2R7uSC1G7WQRewujYBBpwR+xPAN1MoP bRKQNM0PwNwa5gqeAv0ARkIqD6COhRyybhlxLpq2ubOnCJWrXPmqTJ4UiIYi/5D3Jd/X E+GQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699608527; x=1700213327; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=zEOFibtdk2OeHGZLRdggm/j0D0jj5nwuSWizKtoIOko=; b=UvG4XXb1FK7lqj7SpCg10cqbv375KOomvOqDlOzXmf8AG9QZGjrxu343JrtVXa3bL4 g4oI9sY/MWUAaHsGsVQTci8aIRv+nsI6e5nKbvujge+u+Ayo0zMUB1I8iUk/p0tYh2Y+ WPB1svobyWninUq4MfVbSkagvjpYa4vNOsQ7UprojF1dKvng1gAjgRL4AfzjMsZONVsx G/VxhARD02L3PklocaD+sYQ0/5P2XPkalkYbxwKCLIlGZpFoLn0DkJ5D9J5M8NgQb45O iekVxcvsfagEi6PiGB8yqCXKpHv2tr47wnxBXKcZ5mcwxdTDKkAsvhQxQv3SE1CCbM1n clzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699608527; x=1700213327; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:message-id:to:from:date :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=zEOFibtdk2OeHGZLRdggm/j0D0jj5nwuSWizKtoIOko=; b=jLs4E4jiYVF7lXI5vctJ11r3Q9UAZV5ZYChnOgoDXwbSbX0B7UZWB6zewD9vU+PHzN 4IIFfHxp4eJl1S2C3XjIdUZG5YWgfC1FybN+aR0gzmQ1fRSWQPOWonjTVUmKIvbnDRHL 9ipmeCwnUS5kFdXDP8jFk9WTToxHrnLY5/ei7plMkPTxpz2oNBW3QbivoNVWKyiP64wD +B1a8np3d8U+ZGcZKVqBtLSBKWPia6Oq42oZP1JHtBTBES+E14nRGPGBWIOpUBiZ0dri fymdGx6LmsGWDjXeLUt9ItYx2huBri/iwAx3wDhmkrXCyP5ZQa6bQghCUvYhYYG9PM7o Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YypuUgxL4Mtc6qt8569TK4VIBuibNf481aotBesBNxqhADtkOkt MG+dlejpvdxppdhxmh2TeX8= X-Google-Smtp-Source: AGHT+IFyhSgX80Im6KBNH2px8faOwSJQZJn1VQznjGK1xK5rt+eu1mNBw4nTe+KuMD08t6YWid8FqA== X-Received: by 2002:a05:6870:5b97:b0:1f4:8d16:ea08 with SMTP id em23-20020a0568705b9700b001f48d16ea08mr4435459oab.14.1699608526995; Fri, 10 Nov 2023 01:28:46 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:c091:b0:1dd:651a:720f with SMTP id c17-20020a056870c09100b001dd651a720fls427235oad.0.-pod-prod-07-us; Fri, 10 Nov 2023 01:28:44 -0800 (PST) X-Received: by 2002:a05:6808:1b10:b0:3b5:6432:e0ec with SMTP id bx16-20020a0568081b1000b003b56432e0ecmr175725oib.1.1699608523923; Fri, 10 Nov 2023 01:28:43 -0800 (PST) X-Original-Sender: dominik.gerstorfer-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:33290 Archived-At: ------=_Part_47528_1450811268.1699608523358 Content-Type: multipart/alternative; boundary="----=_Part_47529_1787261167.1699608523358" ------=_Part_47529_1787261167.1699608523358 Content-Type: text/plain; charset="UTF-8" I have a script installs templates and default files on multiple platforms. In order to get the default datadir I use sed : pandoc -v | sed -rn "s/User data directory: (.*)$/\1/p" It works, but it is (a) not very elegant and (b) it depends on sed and might fail on windows. My question is: What am I missing? Is there a more direct way to get the default datadir? -- 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/ea89a95c-fd70-429e-ae1f-db343f8bdd19n%40googlegroups.com. ------=_Part_47529_1787261167.1699608523358 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I have a script installs templates and default files on multiple platforms.= =C2=A0
In order to get the default datadir I use sed :

=
pandoc -v | sed -rn "s/User data dire= ctory: (.*)$/\1/p"=C2=A0

It works, but it is (a) not very= elegant and (b) it depends on sed and might fail on windows.=C2=A0
My = question is: What am I missing? Is there a more direct way to get the defau= lt datadir?

--
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/ea89a95c-fd70-429e-ae1f-db343f8bdd19n%40googlegroups.= com.
------=_Part_47529_1787261167.1699608523358-- ------=_Part_47528_1450811268.1699608523358--