From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/16555 Path: news.gmane.org!.POSTED!not-for-mail From: BP Jonsson Newsgroups: gmane.text.pandoc Subject: Re: Sort Markdown file by headings Date: Sat, 31 Dec 2016 23:45:02 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114239ceba226e0544fc11a1 X-Trace: blaine.gmane.org 1483224307 26082 195.159.176.226 (31 Dec 2016 22:45:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 31 Dec 2016 22:45:07 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDIY76M674FRB37JUDBQKGQEOATUDUY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Dec 31 23:45:03 2016 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ua0-f189.google.com ([209.85.217.189]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNSOb-0005zG-3q for gtp-pandoc-discuss@m.gmane.org; Sat, 31 Dec 2016 23:45:01 +0100 Original-Received: by mail-ua0-f189.google.com with SMTP id v2sf48547770uac.1 for ; Sat, 31 Dec 2016 14:45:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:in-reply-to:references:from:date:message-id :subject: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=Dvv/4a85W2ZLDMrRyEu/tIX+52X/KWgrPyPGjwzL3vY=; b=EoJ1AzEg6IsgpgYzMKNkEOHdE3DzJ8stTlgGk3rW4lprNbXn+5MOFHwfSWYKn5tDZk iVDqNqXdul7OIslNVgcwvKzGlZ4gY3hOlFkN9LKMzRIl0plqpUHNielf6Kl3Z2ym/PIU 4cM8J92Un3S5LfwjpqHbiidL7Xq1fyQB5935fm0LTrdEDkgt+TbLXcM07HwfNIumjHVy lOojJX5n4eOXS2kkX1BIn+hVrFshQnRYj2VsjnTkKrajU/gMFiILi9oEOEL6XR9oee8Q 6zncmWEe7DTTxPnDxAKOOEWJ7XKhJAq6bC25iKA5oNte+3zploknUunkVXOxrZR/vNub OOKA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject: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=Dvv/4a85W2ZLDMrRyEu/tIX+52X/KWgrPyPGjwzL3vY=; b=i9CbedEbK5Km0hhkQXVN8E6GncmNnpTXpv/C9QHpmhCEV3IBipoEuBOllQHCzdPzNL MpcgjB7yT2A2ddvAA7BHQWQcJeneYJn8rfe23GbEpbKQgHIcLd6OffIHV1PkD/Dmreiz 42nq8ddE502RMO3NN/EfeZVrXt9A8isWkLUZz7Px8VL+arBDMz+pLDcSdI6N9sNZj3kh YhXmItej8632idxBogxr8MFAr9IMTn05roGGwApa37PzVgki7XEQwxt/N1mePd0/aAXa uBCbHNhK1NvQQtWT2vfdrWwCKhAJJTXB1F5AJh4mGDrp3U7wMNKni9zN4xJiQCM6bLXP svtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:in-reply-to:references:from :date:message-id:subject: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=Dvv/4a85W2ZLDMrRyEu/tIX+52X/KWgrPyPGjwzL3vY=; b=q1os6DCflkicfupf8XP4ePfLekyGr1jbkX3S2vtp9BZhB+HcaaNx7PbmLUuS6fFzEt ImNGiBrCpLwT01uDfnK8oR2aLgeyxKUemYA9AMANv4Yiglyrmij1qkAyyEZZEE82ZabS VbH3yPIYV/Uld1T3UtNGV7Bk4ebBvVI5Xkv9M6QVCo6od4pVMcWnYhk22q9hyMAJCOM1 2TG9SmsokErrRwMGSLDu+sh6xvFpb02x/LHlY8Bv7M8oCTUlIcNgYpB/L6mv81VwmPts VK7/KquDpUrG94d6d93MVLF/8wZig28WQTPuIIh7UbZYsNorXL6lTouTUfLU8ApCilfd q8Hg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AIkVDXJtiGrbirSPPUu4mj927R3Un3ipo2E+8VWMQ6MWAUZ78wfFJbQaeUcXfD/6b16F6Q== X-Received: by 10.36.93.129 with SMTP id w123mr103350ita.1.1483224304552; Sat, 31 Dec 2016 14:45:04 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.36.120.146 with SMTP id p140ls10214616itc.14.gmail; Sat, 31 Dec 2016 14:45:03 -0800 (PST) X-Received: by 10.99.167.74 with SMTP id w10mr31026179pgo.56.1483224303810; Sat, 31 Dec 2016 14:45:03 -0800 (PST) Original-Received: from mail-io0-x244.google.com (mail-io0-x244.google.com. [2607:f8b0:4001:c06::244]) by gmr-mx.google.com with ESMTPS id a199si917699itd.2.2016.12.31.14.45.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Dec 2016 14:45:03 -0800 (PST) Received-SPF: pass (google.com: domain of bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4001:c06::244 as permitted sender) client-ip=2607:f8b0:4001:c06::244; Original-Received: by mail-io0-x244.google.com with SMTP id f73so51342269ioe.2 for ; Sat, 31 Dec 2016 14:45:03 -0800 (PST) X-Received: by 10.107.167.11 with SMTP id q11mr45735262ioe.170.1483224303410; Sat, 31 Dec 2016 14:45:03 -0800 (PST) Original-Received: by 10.107.19.143 with HTTP; Sat, 31 Dec 2016 14:45:02 -0800 (PST) Original-Received: by 10.107.19.143 with HTTP; Sat, 31 Dec 2016 14:45:02 -0800 (PST) In-Reply-To: X-Original-Sender: bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com; spf=pass (google.com: domain of bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4001:c06::244 as permitted sender) smtp.mailfrom=bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE dis=NONE) header.from=gmail.com 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.org gmane.text.pandoc:16555 Archived-At: --001a114239ceba226e0544fc11a1 Content-Type: text/plain; charset=UTF-8 It certainly sounds useful but it is hard to tell without looking at the code or some documentation. I'm happy to have a look at the code if you post it to a pastebin like gist for example. /bpj -- waiting for the European midnight. Happy New Year, everyone! Den 30 dec 2016 12:10 skrev "Guido Milanese" : > I was wondering if it is possible to sort a whole markdown file using > headings as keys for sorting, and I found two onle-line scripts, the former > in Perl and the latter in (g)awk (see http://stackoverflow.com/ > questions/25351917/sort-markdown-file-by-heading). > > They are easy to manage (the Perl script seems to me to be a little > better) but limited to the first heading level. For my person use I wrote a > script that supports 2 levels (could be easily adapted to a 3rd level, > however). I would like to know if the script looks useful to others: if so, > I will clean the code, write a short documentation and publish it. The > script assumes a markdown headings syntax using '#' , not '=====' , but > can be adapted if requested. > > Thanks for this great group, I am learning a lot. > > guido (italy) > > > > > > -- > 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/ > msgid/pandoc-discuss/d85df17b-0a35-4504-9ce0-e9875d64996b% > 40googlegroups.com > > . > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAFC_yuScj--%2BspvmMMdfBA4K4smWNjCFmg8nXCTX%2Bavdup9ySw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. --001a114239ceba226e0544fc11a1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
It certainly sounds useful but it is hard to tell without= looking at the code or some documentation. I'm happy to have a look at= the code if you post it to a pastebin like gist for example.

/bpj -- waiting for the European midnight. = Happy New Year, everyone!

Den 30 dec 2016 12:10 skrev "Guido Milanese" = <guido.milanese-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
I was wondering if it is possible to sort a whole markdown file using h= eadings as keys for sorting, and I found two onle-line scripts, the former = in Perl and the latter in (g)awk (see http://s= tackoverflow.com/questions/25351917/sort-markdown-file-by-heading= ).

They are easy to manage (the Perl script seems to me to be a = little better) but limited to the first heading level. For my person use I = wrote a script that supports 2 levels (could be easily adapted to a 3rd lev= el, however). I would like to know if the script looks useful to others: if= so, I will clean the code, write a short documentation and publish it. The= script assumes a markdown headings syntax using '#' , not=C2=A0 &#= 39;=3D=3D=3D=3D=3D'=C2=A0 , but can be adapted if requested.

Tha= nks for this great group, I am learning a lot.

guido (italy)

=



--
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@googlegroups.com.
To post to this group, send email to pandoc-discuss@googlegroups.com. To view this discussion on the web visit https:= //groups.google.com/d/msgid/pandoc-discuss/d85df17b-0a35-4504-9ce= 0-e9875d64996b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://gro= ups.google.com/d/msgid/pandoc-discuss/CAFC_yuScj--%2BspvmMMdfBA4K4smWNjCFmg= 8nXCTX%2Bavdup9ySw%40mail.gmail.com.
For more options, visit http= s://groups.google.com/d/optout.
--001a114239ceba226e0544fc11a1--