From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30651 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: Pandoc 2.18 - Custom writer working example Date: Thu, 02 Jun 2022 07:27:26 +0200 Message-ID: <87fskn6345.fsf@zeitkraut.de> References: <8528d41a-d6dd-4ca7-b38a-13955a9d1eabn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38976"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBP4X4GKAMGQEKCLBXFQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jun 02 07:33:55 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f57.google.com ([209.85.128.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nwdT0-0009qS-Mn for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 02 Jun 2022 07:33:54 +0200 Original-Received: by mail-wm1-f57.google.com with SMTP id n25-20020a05600c3b9900b0039733081b4dsf2271674wms.7 for ; Wed, 01 Jun 2022 22:33:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654148034; cv=pass; d=google.com; s=arc-20160816; b=eFAk8QVwbxrVIEckCCD7axoVAMijrx6xAYPIyyrFmfDU0JNBgHz+LwXA+P8XnatlD3 aUwDbauquSaOjgfJTHZHgwjLiGYvU0mbmA99lWmhREAp25aUjBYtqHl35/rJNTtH0TNI IetgxOeerXGSf3ZPZ50RNr3Cj0rTKTWOk+A8L/WxYRq7WGC5Ec7N5YS2f70FZjn+2M7h gVnMzTskutubTtdkjBFVWdVN1cm2nzRwLh5CXsn9L/9FWDBtwykpuB3UTgwELolrbiHV iOUw+lKP+wkEiFF8mkMw9IA6Jea8KE7e/u3v9aucS0ytKk2JtJ8RCROPX1RWrunnpV9m d9lQ== 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:reply-to:mime-version:message-id :in-reply-to:date:subject:to:from:references:sender:dkim-signature; bh=crNZr3sqvGA1TVOr/JfKdKzM1YajpojlhJ6ABOq+iWI=; b=TY9Je0+J58k2UAe/jaCrA7dGE8LyHbn1WBabCiCQv730/c3iBMmuYiIB/3ptsfq7Rs sQpo5S/+ujtv58aw0FjZb48KNx7jUPqUNXMWNbGx5Io3OXB1Hzd9LUz7j7PniP+L+Bbl Y3fertfy5Vog8TsJwvFV8So4NuKwOGoBcvmCYJLYdU3xnpn/bGktOeXt1kM+lq2/Gzeq Qev4ZW1tscnB3n3II6Im1U+VDvU7+FfX5BMddVe2uqjCdSWXx1QZQzx9UsZxx7kvPwyo b+Dn8QPp2vB6rASizZZiLO2kQfRyqnmDXLzwgV31j5uD28LpNmrUwCe1Fs4dGFXm4Joa JBgw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.151 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:references:from:to:subject:date:in-reply-to:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=crNZr3sqvGA1TVOr/JfKdKzM1YajpojlhJ6ABOq+iWI=; b=H9ITcKEO9d7T5k9NE10AaLVwpnt4RZaH5f3KB3DaauATs1UrL/exeXeY7/sgOM02Hs uI9U/s7cU1uQurJOgG0HfdGQDXUU1vR9jiKonWaDx984C/Uwwygduhy7R6SwXtJuqJwx srP4fCgSyDi0wcAkJ/Dcc2O2Ju7fSbyrc9nC2mZRgu7z0XxHA6ZvomfkBR2Wquemgkzi LDw77TMVJ5A7XSXW1CllSHbseyhb78jUmDR83xsdOyOzGtS3U76+bOFZKxneeKgWJ/kd sfZMzr70xaC+SSj2xF3/smrf+f+pAjvAT+l+DfMCci3f21aUE0cFtYoBx8gNQy5txf03 lCQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:references:from:to:subject:date :in-reply-to:message-id:mime-version: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=crNZr3sqvGA1TVOr/JfKdKzM1YajpojlhJ6ABOq+iWI=; b=gBCAr7YqNrInKIIUZVwpO6MHK8sGzTJ/O/rX8/nM/wy7tcK6QQXAOvkk0rAuFevU3E mtr3E5WQDbs94wQcGRHYSjBZtVzO4Lfz9tGt+VOGIMgGw5SMSTaquJBFvLW1edooX2eI xrAIpekDeHr7+4bN4gJBh9acL1bjwafQat0qU5fRfTYzp/FvHzDqN0XXysI53RHIU+qs p9fqI9i8Om21u/7OO11LKMjfio3ulpjRJKeNmUSwMXRsN7Snst2UcHrDFozqCg8QpaCx 4m8+HqmQgB6+IfFrih/wt49SxhzxmLn60nDrUwhS1BG6Ngys7Aa9qVAGgZ6Id9PMOsn3 krPw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533IypOxhdCR8tKrAc1j8DEflkPdCFFrIB3Nzto1TsWl//f5z5Cq rWwRXQqYmpYzvJsj99kaH4U= X-Google-Smtp-Source: ABdhPJxLa72uB/F//0FPZKnMAL+9gCMm90Q+1g9obPe0FPi0fCm9S5XxiZEJ7uW5Yd5XDRGjjwkvbw== X-Received: by 2002:a5d:5885:0:b0:20f:f390:c47e with SMTP id n5-20020a5d5885000000b0020ff390c47emr2100221wrf.133.1654148034373; Wed, 01 Jun 2022 22:33:54 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6000:1e0b:b0:20e:7a8a:8c81 with SMTP id bj11-20020a0560001e0b00b0020e7a8a8c81ls7573498wrb.1.gmail; Wed, 01 Jun 2022 22:33:50 -0700 (PDT) X-Received: by 2002:a5d:68c3:0:b0:211:93a9:f29b with SMTP id p3-20020a5d68c3000000b0021193a9f29bmr2004032wrw.589.1654148030042; Wed, 01 Jun 2022 22:33:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654148030; cv=none; d=google.com; s=arc-20160816; b=vpPrH+ky+caFRmC5+51qlZzF6Cd+Mu1e7Uox4tCAE2AoPqYaS7f5ZB9q0QxQRCLapJ mNzfy9ba5colek/fQNxhKGJ8Ifv2HxEAYnu+39OpapOb/vDT40tTIhDvRZIO8gVr2Nbd mTuepJe636I4cP1YvOHbk99PqJhRklbPigg1ESjgLIppwG69vrsT3ojbV0lDT8oWR4gU 7QJuIyMAe8VJ6FMlC+hyfI1rjZFONJ75iR1xB51FeEjLiQMtqR4S3n8vsRuAQ/9G/GHr EMdQcwCH3u7ZWiHb406NvNwe0bIa5DaUZ8iVX+7UYhEo4CEoz4TYHdLbmhz1PoaIjq0l vlTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:in-reply-to:date:subject:to:from:references; bh=d6X0SGHiCqf4xm4/Bkw6cBgTnnhN+42ki48uxGePPUk=; b=MTQhVH2J3X63X/CreehEIsxBPVzY74EGW+gC3R/sprBq6GX5WvGQ3eBSuHMJ9mb+wL OwtDYbHj1rjG+iENEDYx3o98iX+zadS+qfKROF8gfxsJE6wlPIn9gtvH33GV1kiZYlDH hO2VSEtiADXVD8k5jr74+kc5e3LjNX+yn3W8f0GLzJXGG9sHbiQc8o7+23HRWAlfW2hB g9hmDp1VnKi0wMF1FdVqfN+SspvZKwh3aQD64QqAIOq3zF4+k1Mf7gJq+qc85S0McHNt TSaTkykEANHA9QzIyNT5HiaZfjIXvD6pDPdYgEVh4BNm0nziodRaivKw7iO3V5+h8a6j qDRA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.151 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org. [80.241.56.151]) by gmr-mx.google.com with ESMTPS id k23-20020a5d5257000000b002102f9fcd7bsi141375wrc.0.2022.06.01.22.33.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 22:33:49 -0700 (PDT) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.151 as permitted sender) client-ip=80.241.56.151; Original-Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4LDF6z0L8qz9sRx for ; Thu, 2 Jun 2022 07:33:47 +0200 (CEST) In-reply-to: <8528d41a-d6dd-4ca7-b38a-13955a9d1eabn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.151 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@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:30651 Archived-At: Felix SOEDJEDE writes: > In Pandoc 2.18, custom writers were added: > https://pandoc.org/custom-writers.html#new-style > > I tried to use it but it's not working and I don't know if it's an > error or I'm using it the wrong way. > > [...] > > Command used "pandoc --standalone --verbose --lua-filter=sample.lua > --output=output.md sample.md" Pandoc expects the custom writer to be given as the argument of `-t`/`--to`/`-w`/`--write`. pandoc --standalone --verbose --to=sample.lua ... > Does anyone have a minimal working example for "Doc" or "Writer" I > could use? Here's a custom Markdown writer. It's an experiment designed to show how a new writer might be structured. It's a bit slow though. https://gist.github.com/tarleb/5a9c3fbfa47b0e6d3643efd8af2994b9 -- Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124