From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18548 Path: news.gmane.org!.POSTED!not-for-mail From: Kolen Cheung Newsgroups: gmane.text.pandoc Subject: Re: Pandoc Python filter + Table constructor Date: Mon, 6 Nov 2017 03:03:36 -0800 (PST) Message-ID: References: <1be02d85-bd95-4709-82f8-f6a5460930c6@googlegroups.com> <20171104230532.GC97257@Johns-MacBook-Pro.local> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_9816_703123498.1509966216875" X-Trace: blaine.gmane.org 1509966217 13579 195.159.176.226 (6 Nov 2017 11:03:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Nov 2017 11:03:37 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCS252WXTEIBBCMDQHIAKGQEIISMY6Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Nov 06 12:03:31 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi0-f56.google.com ([209.85.218.56]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBfBi-0003JV-Sk for gtp-pandoc-discuss@m.gmane.org; Mon, 06 Nov 2017 12:03:31 +0100 Original-Received: by mail-oi0-f56.google.com with SMTP id n82sf9757861oig.22 for ; Mon, 06 Nov 2017 03:03:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=R/F7xgCWIs78uTC36tOy9gKhQY8b/etagpE61o+yi7Q=; b=GLaEvRG8pK4JE1i0u9b/cHb0KedgAX9tJah/L94PznxNcCVO2pGkm8M1OLjYEfwtG5 li5QrZBr48HbqCRCOLAaKQJ8eWCsJTC075l7eo7CjpgyebHJvAnId3AFF8wQnxTWBr1p D1WeUJHwTRh7PMJt106iNiC/cRJh+HFY8YqksIZ8cSJs8kzZN9lS9nhiVYUJ7GNc+CMh WE9k4JfXzF9bwrMndK65mOuwHx836nRlViXa/PWnAEWhmaVh/g48b5OxRYTJMkN2dxGr abjRHkfNjBNiAu9owR64eQFu8XIJLjHVe/1wgyi3/6UyWWJnrQcucofNZ6+fJksBAjvZ twGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=R/F7xgCWIs78uTC36tOy9gKhQY8b/etagpE61o+yi7Q=; b=oLoQiJ56I2ObEfiQusZKxrZsz10v/QGj390jyzG19z+yN5uHEv+PZZPl2qlblfqLVC CW3FfdL+jGuiG9dQSB5cQjPI3rxFlNV4vOhxSxv56C+cAeeS0tEgZyPAXZPm+jADxqy/ Hj4kg+9sZcxqlcTkqePNHSBpPcsQ2HpdEXaThKUjYTcZpQuw+rkSLQgK8oVSLMYGoUam v5dTC5PLOpU0lKodJp5N0IlJbn3BLM5smwYWzGD1HZfd4vawaqs4GaMGe/2woCIupT92 GhOk3/O1JbQlaHMOvqEn+hkkFd++LBt1g6lOp1HtCGl28zfizjy/03OURFuozARkiDtG BG+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=R/F7xgCWIs78uTC36tOy9gKhQY8b/etagpE61o+yi7Q=; b=m7rLuUb4JQUw8DaNUpIfuAEv1MLLR0fObRbH6P3RjRaMWSVkAF9BXrF3KvWUUJug/u Hv9c/mWB5Z16bxqzZTqS1P9sGUFqPAOPpSsxl7sq0nrkMDIKCv6tw1VarXLGE4nk82/G g6Gso4w5ocIcF8MESDv69f0XObKb4HSFCg+b44zEbR+lYwg4QZhxTzgsoUPqO0q3dpnp gOwfHvQpNqU1UOBoEIEB26s1SoXXwYVn6CJR+YaTqUfpz7PLHlrcMZZLDlCPY05w4c+S Jvtl9cmOZ8aWEnI+frJMLUSl2oZ88Al0d31OFoU4Ikr2D56YHAnlW/GxCN0XAhVzY/WK bexA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJaThX4l3I433l10RrK3go+4I3L5s1WAPMEfy8lGCt5mXqFcCR4ytUlB YjJ+bl4amA1gc9TldNGP7xM= X-Google-Smtp-Source: ABhQp+SOxxbFjT4JgAWRO7u4C/TGA5KdUAevy2rym+RxWQrG+A3fibO3mXsfJOJouEtyOJ9kyr8ocw== X-Received: by 10.157.45.110 with SMTP id v101mr552623ota.12.1509966218286; Mon, 06 Nov 2017 03:03:38 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.202.69.70 with SMTP id s67ls3401169oia.20.gmail; Mon, 06 Nov 2017 03:03:37 -0800 (PST) X-Received: by 10.157.52.218 with SMTP id t26mr552033otd.10.1509966217353; Mon, 06 Nov 2017 03:03:37 -0800 (PST) In-Reply-To: X-Original-Sender: christian.kolen-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.org gmane.text.pandoc:18548 Archived-At: ------=_Part_9816_703123498.1509966216875 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Interesting. I think panflute would be a good fit. Try reading the panflute= documentation first. There=E2=80=99s an example on csv table that can show= you how to manipulate table elements. You can also checkout the source of = pantable.py, which is inspired by the csv example, and is more sophisticate= d. Other examples in the panflute documentation also shows you how to captu= re a certain elements (possibly with attributes) in general. When writing a filter, sometimes it is useful to see the AST of a MWE. Pand= oc has the native and json output, while the filters see the JSON, the nati= ve is more readable. panflute also has a helper script (I think in the panf= lute filters repo) that can print the =E2=80=9Cpanflute AST=E2=80=9D, which= will even be more useful if you use panflute. (panflute basically parses p= andoc=E2=80=99s AST into its own using OOP, or in other words, a representa= tion of pandoc=E2=80=99s AST using Python objects.) --=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/ae54a6c7-f694-4337-87d6-15178ab3f18d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_9816_703123498.1509966216875--