From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32354 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Amy_de_Buitl=C3=A9ir?= Newsgroups: gmane.text.pandoc Subject: ANN: pandoc-select-code Date: Fri, 17 Mar 2023 14:12:31 -0700 (PDT) Message-ID: <40756e3f-ae25-4d1c-bfd5-6ec8321dd51dn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2792_2061461477.1679087551089" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8270"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDR454V73YMRBQFP2OQAMGQELSHKE3A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Mar 17 22:12:36 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qk1-f188.google.com ([209.85.222.188]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pdHNL-0001ye-8J for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 17 Mar 2023 22:12:35 +0100 Original-Received: by mail-qk1-f188.google.com with SMTP id e14-20020a05620a208e00b0074270b9960dsf3239701qka.22 for ; Fri, 17 Mar 2023 14:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1679087554; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=mqAzrdVADWhtf/dCu/sijGt/Lx/o4A2x9VZXAXkD58g=; b=d3QRJS1uSqS/UK/qmnxooEEKNdLZJcek31Xu5g2NhjXh+lvtk4H79dE6eYCtYRtqsS 8AcIyHf6f/fggUhZ9FYOTKABv8UDTpPxOV/DNXWprvD2uEpqDd8ClOb18Qj44GSni259 zCCs35dFOUyRXLGBvIYSYmy5+5Ex9jVk2hTIwLuhilmSmewILHuprpC7p0sXDKtfT0Qh XmoQRlYcPKmVCh2vkgk9846xlNvzA52MFteyQslQr+n4qUdyOsN0oP3V9wnRZa/DfC2O 9/GF5iNCgB21AdQ+ProEsNznvfFFcfjKoNqvA6VbyTvEoHAfornr6GpReXWq3rzi72vA jh2w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nualeargais-ie.20210112.gappssmtp.com; s=20210112; t=1679087554; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=mqAzrdVADWhtf/dCu/sijGt/Lx/o4A2x9VZXAXkD58g=; b=fD47DFKiAo086Rs84bk36opUmJuPQAJXzKLw075f4fhRPC2z8IdUtl3Hf2P0pm6UYt y9ARC78mwe+a481g2qpuqyNEjpu2P+XlyCXg/AGFE1vZYmAYHrD8wzzSdUkDwFHQKKuQ hsetT+QLkNQ8t1hxkgIu+yt6bwQ8d9aOfRNJtwdVvLMjpvFg1DxfiTnAYaGOFjcK0vmA 5TGSsesr6fX8SQIMWp5G8+Q5Tk1WbPZg5yUOaAjy+35+tbl8keP+dIe3AmTPgaS71Z0b 4gn0MM68v4Wd6iDfUZp4Uw3C42WLGwoavslZzBEAOmpOJd1jbTQwlZ/skQVjKjDELmMc IDBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679087554; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:message-id:to:from:date :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=mqAzrdVADWhtf/dCu/sijGt/Lx/o4A2x9VZXAXkD58g=; b=eD8Hi3MeT0kJKc9EUvGASkdAkt5eNP+KPHE5wqcPO+R9TAjNlTpI1wASoefQDIH2ux qMITcaFqri7vsoNF3RqR7f4BLfZ8qUwUsWoIUWxX2QqY99ClweZSKaXrQkbUitwZitxg +TZUtxcSs0+C3MowQay3r20JAmNQwz+ptlNOpY/RIOvy827GPN84Yhv+/gSmL6r6Qu1z Ke+4SHF5R8qPV8xByhFmI6nipvStaNafp6bhJJc1c2mHW6GV9ys56jXIRT77ecmWvGqR HQlQc7AwO6woD8ZZFncnFoGaf0Ro9djpMJNeLBMjYxO4ZV9rzWp/03vIPKuaAGCedAbZ dWcw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKUg6NZET38xWpyA8npQZGC/x8RH9ARXcCaAGWbaBPoZ8bx6iSSu KCZwRhK15CkgbEKdXxxEJXQ= X-Google-Smtp-Source: AK7set9f0hBPtNpfMowgvSTpN1YHpU6xQf6ldHmyLgBRqkoXPp8EVNBcnzXABmhzYalGHGQyDIT+uA== X-Received: by 2002:a37:747:0:b0:745:811c:2aea with SMTP id 68-20020a370747000000b00745811c2aeamr4579058qkh.11.1679087554304; Fri, 17 Mar 2023 14:12:34 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:620a:4490:b0:742:7031:69ef with SMTP id x16-20020a05620a449000b00742703169efls1182360qkp.11.-pod-prod-gmail; Fri, 17 Mar 2023 14:12:32 -0700 (PDT) X-Received: by 2002:a05:620a:20c2:b0:745:7bfe:bbf6 with SMTP id f2-20020a05620a20c200b007457bfebbf6mr4559905qka.9.1679087551946; Fri, 17 Mar 2023 14:12:31 -0700 (PDT) X-Original-Sender: amy-x92Y4IBCQKU6Cx7ujrKbww@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:32354 Archived-At: ------=_Part_2792_2061461477.1679087551089 Content-Type: multipart/alternative; boundary="----=_Part_2793_1099724435.1679087551089" ------=_Part_2793_1099724435.1679087551089 Content-Type: text/plain; charset="UTF-8" Announcing *pandoc-select-code*: a pandoc filter to extract only the code blocks. You might use this, for example, to extract sample code from a tutorial. This package has been available from my repo for a while, but I have now uploaded it to Hackage, and also made it available as a Nix flake. I originally developed this filter because I wanted something like literate Haskell, but using Markdown. I wanted to be able to write a Markdown file with Haskell code blocks, and then be able to compile and execute it, or use Pandoc to produce a PDF. Cabal doesn't support that, so one workaround is to pre-process the file using Pandoc with this filter and the --write=plain option to produce a source file that can be compiled. I also use this when I'm updating a tutorial I wrote some time ago; I'll extract the code examples and verify that they still work with the latest software. Hackage: https://hackage.haskell.org/package/pandoc-select-code Repo: https://github.com/mhwombat/pandoc-select-code -- 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/40756e3f-ae25-4d1c-bfd5-6ec8321dd51dn%40googlegroups.com. ------=_Part_2793_1099724435.1679087551089 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Announcing pandoc-select-code: a pandoc filter to extract only the c= ode blocks. You might use this, for example, to extract sample code from a = tutorial. This package has been available from my repo for a while, but I h= ave now uploaded it to Hackage, and also made it available as a Nix flake.<= br />
I originally developed this filter because I wanted something li= ke literate Haskell, but using Markdown. I wanted to be able to write a Mar= kdown file with Haskell code blocks, and then be able to compile and execut= e it, or use Pandoc to produce a PDF. Cabal doesn't support that, so one wo= rkaround is to pre-process the file using Pandoc with this filter and the <= span style=3D"color: blue;">--write=3Dplain option to produce a sour= ce file that can be compiled.

I also use this when I'm updating = a tutorial I wrote some time ago; I'll extract the code examples and verify= that they still work with the latest software.

Hackage: https:/= /hackage.haskell.org/package/pandoc-select-code
Repo: https://github.c= om/mhwombat/pandoc-select-code

--
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://groups.google.com/d= /msgid/pandoc-discuss/40756e3f-ae25-4d1c-bfd5-6ec8321dd51dn%40googlegroups.= com.
------=_Part_2793_1099724435.1679087551089-- ------=_Part_2792_2061461477.1679087551089--