From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32021 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Merging and converting a Windows folder? Date: Thu, 19 Jan 2023 10:28:40 +0100 Message-ID: References: <8da3b66e-f14a-49d3-9b65-826df906073an@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000085644b05f29a8f99" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13786"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBU42USPAMGQEM277DNQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jan 19 10:28:56 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-vk1-f190.google.com ([209.85.221.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pIRE7-0003NC-Ek for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 19 Jan 2023 10:28:55 +0100 Original-Received: by mail-vk1-f190.google.com with SMTP id n131-20020a1f2789000000b003d93a6e6162sf383467vkn.21 for ; Thu, 19 Jan 2023 01:28:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674120534; cv=pass; d=google.com; s=arc-20160816; b=XKscfiSImlNXnQQXhvVARkT7+Efy8VElCKmvDdVap1zLD2RX684FnSDwHzO//juijn h3l68oQ0/Bu6yoKFzIA0TiS9z7JfLddejDp/owkI/eM+oTrDyDg1UrgC+r93mwiqck64 iscTYwgwDvVqa95RjuzYQSHrzonTeVttMFyDnQcr2o+mywfBnwvQjod7LieF4aqpjluG 7aXhL+M9+T65ta2JchwkzTvTSFKnSxIbe7pSP0yLbO74YaGTf6T1K3Z2EIx6ojMgxCcT ZwIO9jZzjeMEzqfLwGCKTdsXAXN7J4elunaNBmx8x7iFh0OXNy+D72GXyL0eVYLOQEe+ S6fA== 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:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:sender:dkim-signature; bh=ekWKvtnGip/7OWNp6w81+08E/89p96o1Zj6tfrkNluA=; b=VzIjEhAfRMbgBWzNS//AIlJI5p9dbe9sqyObUEFk5UFm29hxNz7ju0FFOvYUA448lR L271DuOTUJHP8Usn/XuYylVR4jLjnX18zV9pTasrqm01kIU2fR3S4551nxCgIW1aRfPC ZjIYne8E6qXAUM1JxWKa/8reAroDNtl76XC80mqlxtXy33pcrgUBLnDA5qVlcXMTlxJ+ J27A7SX2kncS6P3BknILi5m3ppK/a7+aDDK8Ad05IP345Ph14ByGFjqsKDto4+5NTSpn t2vUqLRPaahP2Licdgbfka+I9D1BbAOF8KZkycSwGYAqHC1nh4ul9boZATyZxIPkiAha t64Q== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.128.178 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:to:subject:message-id:date:from:reply-to :in-reply-to:references:mime-version:sender:from:to:cc:subject:date :message-id:reply-to; bh=ekWKvtnGip/7OWNp6w81+08E/89p96o1Zj6tfrkNluA=; b=pCzDmvpag1iete6DZD96KcT8PiPZoaQAGK0CTt+BSzwoVOOFmCr14IpupMsnQHPwVy 2kpXWKfkMsqI3mKjucdjLfWyZfsyUg+/pvyuFzw+F9jFAJkWaxS0Cgiu5s+Ax89OVrcC i99Wowv4gMuUWw2443Kt1piku2icAHeZjMOh6tTFPPyp6cIIInpUhan5+MOSVMooIxRi nQu1EuMyHeXjgsg/WuxFqa6nFu1nWGS+kLIKKIQJxB98BlcxocxdzdFTTBnyopDlnZ/Q pgiTQRrJDSbEC0FbRbqgG/ouKKnF3FYw454z/Uh3B8ijxAfkJeRHP9ZYs3iRjKMh+d6N 7SmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:to:subject :message-id:date:from:reply-to:in-reply-to:references:mime-version :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=ekWKvtnGip/7OWNp6w81+08E/89p96o1Zj6tfrkNluA=; b=hOFhlmFKG6XwVqyk4FNjGtkd0WsFtzNTOBVhcTv3evVX/+T6uSzi8Y6nu3QZuGlxaE GBoVCHT5gCh7o9rgvFM5UMhtQrUIVEnTO5ivVIqNTSsmtnn8Fqbzs6zfwQObwPf5zml6 1eEZFkfOEntix6JrCA0nvleDCAdS0nhddEPqf909/+6fm+u04I+hQEmtK77ARTMypvb1 gBjoCEufbGAafsYjjNo/oA51Y01XN1Y1d8eVWJifOMiOUdISeqhmtP7bVjd9pFkonDN1 El4swc9+/7vZIdRny5WIy37+5YRmznYndbhlmqmcxioQGf Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2kqzs3ItzM5rq8DakwQ0M5ZdiZnQ8KoTyfJxZn72SOtLOKhU/fIv 0VqZovGqgMF+Ia87Sie4XIE= X-Google-Smtp-Source: AMrXdXuxX9TYRSBnT9YS/aswIdXQEE8j/gAw3vfSZTUUghb9QMmjczFWI5j+y0C0B9NGrE3StJfcgA== X-Received: by 2002:a9f:3708:0:b0:5f0:4676:e4f1 with SMTP id z8-20020a9f3708000000b005f04676e4f1mr1264716uad.44.1674120534214; Thu, 19 Jan 2023 01:28:54 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a1f:20ca:0:b0:3b5:df37:23a6 with SMTP id g193-20020a1f20ca000000b003b5df3723a6ls170906vkg.7.-pod-prod-gmail; Thu, 19 Jan 2023 01:28:51 -0800 (PST) X-Received: by 2002:a05:6122:302:b0:3da:1e0a:a864 with SMTP id c2-20020a056122030200b003da1e0aa864mr5982870vko.8.1674120531097; Thu, 19 Jan 2023 01:28:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674120531; cv=none; d=google.com; s=arc-20160816; b=G6TwUEgxvLWuCFKUe55t5BDkYtW0qoDY7Vb22outIY3EiRw8N5l02zuU4kMB4BbqyI wmDzv+1cwyva29HuRFgJzcmdLLn2JIbfuqtrQdByTDxsX6Lmjeh5wU3F4cDhYAdqfRFl WrDuV/u1nvzfkKOFsTjGxYe53MSc329begPBheWtivDpHPb4rHtMoM2STuHmmtLEraOt Typ1l+r/YodLV9COzwA+5rkTesmrjEn5VMrhIXLDR26yvxlhPwCer+KnMbU8pC//FI6Z wkQsRTJdXo7n2cXG0qJSkgSegNH0j/BJ6vslSus+XhNbqbHKh/ltbEyj1G3EPz1Re2FB AdKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version; bh=vqf6l8lsBx6WWm+NoDdHII2DqWhP7yuD5sHTvvz6YCE=; b=Jhg40IIpZFOz4k0vPmVbZPh3eUSJ0eTjtEGJTTNESiNUeV0gpXfyAzztC7ahpaIv9E WPq/boQ9BzOa0ty0Oqe3sgZKkyFcU98fblFKn9a0crxH+SrYBGWZBKrqk2mRMgKWJk3q G3J7yJm7ugILs64ssEdUzwXSjmMA31xOBIqgEF1jBKp3S9KiU7Sj1NXVKFnorCjiHbCB oL5KbK2gCzp4p6uVGalq+747AQ6gTeDCdnGn+obGAPuT1Iv+VGOt933e0Eef/WVgBe3O YL79w+f1N9jZR8yllkCeeTJG3cmPfq5JqRTPlRGh6vRbX/xV5U9CkKh6xC/s1iCZofio uFng== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.128.178 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Original-Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com. [209.85.128.178]) by gmr-mx.google.com with ESMTPS id 140-20020a1f1692000000b003daf0a8001asi2012057vkw.2.2023.01.19.01.28.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Jan 2023 01:28:50 -0800 (PST) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.128.178 as permitted sender) client-ip=209.85.128.178; Original-Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-4b718cab0e4so18434017b3.9 for ; Thu, 19 Jan 2023 01:28:50 -0800 (PST) X-Received: by 2002:a0d:d844:0:b0:4e5:3109:5afb with SMTP id a65-20020a0dd844000000b004e531095afbmr1025975ywe.387.1674120530320; Thu, 19 Jan 2023 01:28:50 -0800 (PST) In-Reply-To: <8da3b66e-f14a-49d3-9b65-826df906073an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.128.178 as permitted sender) smtp.mailfrom=melroch-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:32021 Archived-At: --00000000000085644b05f29a8f99 Content-Type: text/plain; charset="UTF-8" You can just list the files on the command line as multiple inputs and pandoc will merge them automatically: pandoc -o merged.ext chap-1.md chap-2.md chap-3.md (where .ext is .html, .pdf or whatever.) Tip: if the files have different names you can give them leading zero-padded (all with the same number of digits) at the start of the file names: 0010-foreword.md 0020-introduction.md 0030-problem.md 0040-this.md ... 0070-that.md ... 0100-conclusions.md And then you should be able to just say pandoc -o merged.ext *.md and the files should be correctly ordered by the shell. The point of "spacing out" the numbers as I did above is that if you add or rearrange a file you can just change its number to something intermediate instead of renumbering all the files; e.g. if you want to move the "that" chapter to before the "this" chapter you just rename it 0035-that.md. I realize that e.g. in a dissertation you are not as likely to rearrange chapters, but e.g. in documentation, where I work nowadays, it happens with some frequency. I hope this is helpful. /bpj Den ons 18 jan. 2023 15:58Robert Kingett skrev: > I've tried to look online, for both a powershell command and a CMD > command, possibly even a batch file, that would concatenate/merge multiple > Markdown, .MD, files in a directory and then output it as one, merged, > file, but nothing I've found works, so could someone point me in the right > direction? > > -- > 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/8da3b66e-f14a-49d3-9b65-826df906073an%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/CADAJKhCQ0w7VXPPYBvE%3D0qJ7ip1TyMe3bWvJH3oGmF1b4tuBnA%40mail.gmail.com. --00000000000085644b05f29a8f99 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
You can just list the files on the command line as multip= le inputs and pandoc will merge them automatically:

pandoc -o merged.ext chap-1.md chap-2.md chap-3.md

(where .ext is .html, .pdf= or whatever.)

Tip: if t= he files have different names you can give them leading zero-padded (all wi= th the same number of digits) at the start of the file names:

0010-foreword.md
0020-introduction.md
0030-problem.md
0040-this.md
...
0= 070-that.md
...
0100-conclusi= ons.md

And then you shou= ld be able to just say

p= andoc -o merged.ext *.md

and the files should be correctly ordered by the shell.

The point of "spacing out" the n= umbers as I did above is that if you add or rearrange a file you can just c= hange its number to something intermediate instead of renumbering all the f= iles; e.g. if you want to move the "that" chapter to before the &= quot;this" chapter you just rename it 0035-that.md. I realize that e.g= . in a dissertation you are not as likely to rearrange chapters, but e.g. i= n documentation, where I work nowadays, it happens with some frequency.

I hope this is helpful.

/bpj

Den ons 18 jan. 2= 023 15:58Robert Kingett <king= ettspeaks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
= I've tried to look online, for both a powershell command and a CMD comm= and, possibly even a batch file, that would concatenate/merge multiple Mark= down, .MD, files in a directory and then output it as one, merged, file, bu= t nothing I've found works, so could someone point me in the right dire= ction?

--
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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.org= m.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/8da3b66e-f= 14a-49d3-9b65-826df906073an%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://group= s.google.com/d/msgid/pandoc-discuss/CADAJKhCQ0w7VXPPYBvE%3D0qJ7ip1TyMe3bWvJ= H3oGmF1b4tuBnA%40mail.gmail.com.
--00000000000085644b05f29a8f99--