From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/16642 Path: news.gmane.org!.POSTED!not-for-mail From: BP Jonsson Newsgroups: gmane.text.pandoc Subject: Re: [Feature Request] Filter with arguments Date: Mon, 9 Jan 2017 12:26:36 +0100 Message-ID: References: <434dc10f-02a1-4bbc-a41c-3a29398ca635@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d56e6fe9d2d0545a7a3b6 X-Trace: blaine.gmane.org 1483961205 17783 195.159.176.226 (9 Jan 2017 11:26:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Jan 2017 11:26:45 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDIY76M674FRB3PGZXBQKGQEJVU5T4I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jan 09 12:26:41 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ua0-f187.google.com ([209.85.217.187]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQY5x-0003RA-6N for gtp-pandoc-discuss@m.gmane.org; Mon, 09 Jan 2017 12:26:33 +0100 Original-Received: by mail-ua0-f187.google.com with SMTP id i68sf70261uad.1 for ; Mon, 09 Jan 2017 03:26:38 -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=qRUIdc6kNbHu2WGKwMsdQPxKBoXgFFiyN09TvGhHjDk=; b=scz3rr6zyiH4yvkVKw9q0gFDIA2H4aGGJm+XTYsBiuLQI8maN/7vV+fQAnqzNC2eNI zj9dqvDEfa+AAWt1GWoM/eTxQkt941D0KEGbH0bsCiCq9bW7rJWVHgIqjFoLtP3LPwG+ QX4W/g/j071u3c8kbkNPQl80e2PXIBk4SrKPuDCK9kIlsi5zz0BR54FNOFfrp3zsFTob uo8Zv0YQSiSlRiGZLxhANwg+YeEyMUPtmnVntYTMnMePbywhqWdnj+0Qy6cn1JYKw8Ba 6v+wnCsPYz2AG8foB6TjCBr964TuvEfUbZ8srQwdFU121F4u4nAKYRtF5pohhPehCnui QFEQ== 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=qRUIdc6kNbHu2WGKwMsdQPxKBoXgFFiyN09TvGhHjDk=; b=hV7g7uhhL+S+fc3xYs01rslWexb4VfxCMyepi2SSW3I6+rna1bgN8wxNaYlSSy9YOA /hZdVL03S48dGjctKIMaMQ1EzTSvdXdwxarwVm4idmWY0IR+/Xc7BwWr/KyJur53unLH 77qRYgbv80mdl96f8/YMZlCbRrMjAGZHEOUCa2Hpc80eRP/vIfTGaM5mXkwsqbBgMb1F 6whwq3Nj+GJcphc+Jc99qbX/1EAXR73CFZalzCLZSyckI4Uc/EnUhl/zna45uR7lqgLW RX8ALad18PnuZzPcrK/4Y3FF/UO1HtDdA/JNcAdLFJL6JsNoKep2g6kS3mpnU5iSvTpm HYCQ== 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=qRUIdc6kNbHu2WGKwMsdQPxKBoXgFFiyN09TvGhHjDk=; b=VQkEXAiWu/G6lOMpUq6fCIh74++DO9jPXqnBaMmgMJ43qnhiByXSV1YKingHJD1qFY gf/WsE1VWRY0clgQ3dAj5SBEyhrKYxegs9aYmXdbLcxOFLOEhUSZY/0D5FRYYQMLuMJB HF7OwTYZZGKDQFGqEYUasdcQokmlYImE73Act7AIKlqNOrqd1W560sG731Q8ZhjyvB7C LKKZH0uiUedCT5lWLhsGzHsYnfxl5UIk58zkny/93zj2pnUPl9hS6PhEpNX0mCskG+QN JREZWZA8/23NHsJ1jB+kMGtMSsTNAeGtJLJpnZebaDKlJW0F217XKJtUXTSPSoWNXq2N jIzA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AIkVDXKfL8RVERBGCJy6KZBcOgmXOYV7AWQKMczO/bgXvL2OvON3YRS/u5OZmfB0drgGeQ== X-Received: by 10.157.17.167 with SMTP id v36mr794803otf.12.1483961197637; Mon, 09 Jan 2017 03:26:37 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.3.235 with SMTP id f98ls5899899otf.16.gmail; Mon, 09 Jan 2017 03:26:37 -0800 (PST) X-Received: by 10.200.50.24 with SMTP id x24mr3636471qta.44.1483961197221; Mon, 09 Jan 2017 03:26:37 -0800 (PST) Original-Received: from mail-oi0-x242.google.com (mail-oi0-x242.google.com. [2607:f8b0:4003:c06::242]) by gmr-mx.google.com with ESMTPS id g193si1013837ita.3.2017.01.09.03.26.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2017 03:26:37 -0800 (PST) Received-SPF: pass (google.com: domain of bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4003:c06::242 as permitted sender) client-ip=2607:f8b0:4003:c06::242; Original-Received: by mail-oi0-x242.google.com with SMTP id j15so11317836oih.0 for ; Mon, 09 Jan 2017 03:26:37 -0800 (PST) X-Received: by 10.202.91.212 with SMTP id p203mr4442573oib.110.1483961196779; Mon, 09 Jan 2017 03:26:36 -0800 (PST) Original-Received: by 10.157.42.231 with HTTP; Mon, 9 Jan 2017 03:26:36 -0800 (PST) Original-Received: by 10.157.42.231 with HTTP; Mon, 9 Jan 2017 03:26:36 -0800 (PST) In-Reply-To: <434dc10f-02a1-4bbc-a41c-3a29398ca635-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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:4003:c06::242 as permitted sender) smtp.mailfrom=bpjonsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=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:16642 Archived-At: --001a113d56e6fe9d2d0545a7a3b6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable There clearly are situations where metadata are the best option, but I realize that there are situations where they may be unsuitable, depending on the nature of the filter, the data and the way the data is used by the filter. For now if you think that the metadata get in the way later the filter which uses them can remove or alter them. As for filter arguments making things easier/harder for this or that wrapper it pretty much depends on how the wrapper interacts with pandoc and/or filters and how (manner and form) filter arguments are passed to filters. Clearly the possible need of wrappers to see some/all filter arguments need to be taken into account. /bpj Den 8 jan 2017 21:51 skrev "Kolen Cheung" : > Just to mention another disadvantage of -M option that I haven=E2=80=99t = included > in the summary above: if the options is specified in this way, it will > =E2=80=9Cburn-into=E2=80=9D the document. But one of the application I ne= ed is to go freely > in a round trip (converting pandoc Table to CSV CodeBlock in one pass, an= d > convert the CSV CodeBlock back to pandoc Table in another pass). But sinc= e > the -M metadata will accumulate, this is a no-go at least for me. Because > of this, I now see why @jgm recommends using environment variables among > the currently working methods. But the potential difficulties for Windows > users is still a concern. > > And the new suggestions of -F FILTERNAME[=3DFILTEROPTIONS] seems cleanest= . > For ugly filter name: -F "My Cool Filter.py"=3D"--some --cool --arg". Don= =E2=80=99t > know if this will make the life of pandoc-mode or panzer and alike easier > too. > =E2=80=8B > > -- > 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/434dc10f-02a1-4bbc-a41c-3a29398ca635% > 40googlegroups.com > > . > For more options, visit https://groups.google.com/d/optout. > --=20 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 e= mail 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_yuRuuDDfbok7Gds-kdj_ySqvpF0psnTUn0-TRvdEhRUs%2BQ%40mail= .gmail.com. For more options, visit https://groups.google.com/d/optout. --001a113d56e6fe9d2d0545a7a3b6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
There clearly are situations where metadata are the best = option, but I realize that there are situations where they may be unsuitabl= e, depending on the nature of the filter, the data and the way the data is = used by the filter. For now if you think that the metadata get in the way l= ater the filter which uses them can remove or alter them.
=
As for filter arguments making things easier/ha= rder for this or that wrapper it pretty much depends on how the wrapper int= eracts with pandoc and/or filters and how (manner and form) filter argument= s are passed to filters.
Clearly the possible need o= f wrappers to see some/all filter arguments need to be taken into account.<= /div>

/bpj


Den 8 jan 2017 21:51 skrev "Kolen Cheung" <christian.kolen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:

Just to mention another disadvantage of -M option that I haven=E2=80=99t included in t= he summary above: if the options is specified in this way, it will =E2=80= =9Cburn-into=E2=80=9D the document. But one of the application I need is to= go freely in a round trip (converting pandoc Table to CSV CodeBlock in one= pass, and convert the CSV CodeBlock back to pandoc Table in another pass).= But since the -M metadat= a will accumulate, this is a no-go at least for me. Because of this, I now = see why @jgm recommends using environment variables among the currently wor= king methods. But the potential difficulties for Windows users is still a c= oncern.

And the new suggestions of -F FILTERNAME[=3DFILTEROPTIONS]= seems cleanest. For ugly filter name: -F "My Cool Filter.py"=3D"--some --cool --arg". Don=E2=80=99t know if this will make the life of pandoc-mode or panzer = and alike easier too.

=E2=80=8B

--
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/434dc10f-02a1-4bbc-a41= c-3a29398ca635%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://group= s.google.com/d/msgid/pandoc-discuss/CAFC_yuRuuDDfbok7Gds-kdj_ySqvpF0psnTUn0= -TRvdEhRUs%2BQ%40mail.gmail.com.
For more options, visit http= s://groups.google.com/d/optout.
--001a113d56e6fe9d2d0545a7a3b6--