From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31465 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Meik Hellmund Newsgroups: gmane.text.pandoc Subject: Re: ANSI escape sequences in jupyter notebook output cells Date: Mon, 26 Sep 2022 12:06:55 -0700 (PDT) Message-ID: References: <956e8385-8b5f-49de-a74a-cc62f84be526n@googlegroups.com> <5f877bed-697b-481c-9604-c5d69168eda9n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_38_1885561292.1664219215538" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15876"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDYPJG4RWYHRBUXQY6MQMGQEJ2QU3OQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Sep 26 21:07:02 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f60.google.com ([209.85.210.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1octRV-0003ys-Ub for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 26 Sep 2022 21:07:01 +0200 Original-Received: by mail-ot1-f60.google.com with SMTP id a5-20020a9d2605000000b006554fc97188sf3705012otb.16 for ; Mon, 26 Sep 2022 12:07:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date; bh=PPAOvuS/gVwezv87bfsTkTRmMMPEdLGdLysNkz5CZtI=; b=iMUCXia62Sy7sXHOJyB9IXCoYwHX22AQkq6nY1rs4GWMECZx48/8rKC9vs+D7eIzyf xkpUPY7W+h8zUJ8syd8MZATBPjQHBiIFHcnqDWxWXV4B0AsjdwVsrMOU5Xr0MLBIuXv6 cYWRxhTp0VAVsShpGI0qQGqSSD8wVMQW91XQo0sqk3bguh7lyXe9fp3t0yVaH6gyZNkc ZzEhrIJZfp4wOFsVTVnhq0Rh84AgvkgwD458OYHKUXgClYKn0VpY5WwWzGu4LJno8aIk 215gWGY4//GjRvus837Z7HOcegMt8Hzk3+RC7115LtA6e6l6ofLRt0bzKpWHQVl/GGBy z0Rw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date; bh=PPAOvuS/gVwezv87bfsTkTRmMMPEdLGdLysNkz5CZtI=; b=VcjpE807jeFdOV3eYU4HWaAk3EFaPNC1gSfztzQrfEEBgg/YNpflt7HkdNslZ0sJ5d 5FI8j8dF+uA9Kfsw/4jzJBVRMO/eWiGjN5h52xAlAtCXEM8NFnrtCFjCmL4d8Kept93V v3avSRqgb/WHg9BkRaJKb9qlyfHuwhaVTJ8Ty6HDc6tcF/1LCvh7xp3s9HXuVAzMvECc FuZTrIpMk8YnzJW2fDwWXhCMbjXq14hCvzbht4I7Pa/NJWw9XPi2cDPDhoHwTcXAuEEv QPnO3qyq8d87NWC7fwDPpzthnk7nBmjdFt8k0BMWEUrzV6VG9etn70u6KUyCS0Y/s09+ 5oAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date; bh=PPAOvuS/gVwezv87bfsTkTRmMMPEdLGdLysNkz5CZtI=; b=uNnQZCtNOQd+QYDn6aITtRl+AgKpiczd9JuKhfiIEf1AqTHUEWzQ0IJVmqeODSrtZn 88WmvASw2KnHWrLDojdPg/lrvUwSo/OucCViacJiIS5x6+mDjBPYKw1BROEjGz4StUwe JbaqySIDFee9S/Vu2zip/0BgpL4E1Ns10xquOzWOMkchPOdp/CLt8ozWJAFchTXrc+8N dceZrYgMSQ5JHfhsGrg1EWE9k/Yc9YQ+h3YBhKHm2ion3hwv3Mwgui5R43YhrI8z4UyY yqPBNuvSoCBmsb+iOsqcuBdDoohSOZncTw0k1H3dQPB9Ximlc1KlHB1zoMvCgW+/2xYS A9Lg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf35VAy/Lm7QOF/yVVMd9COzHOmymdPjY8SytpLMg3xylWwR+Ehs i/xSEWoWkBiWL7ApiFLpBks= X-Google-Smtp-Source: AMsMyM7s5dLL50gKKG0IBbXQPpdY7HaCPptwNPJdY4aJFEb5ecoGtNnDtYkEkIpLPsT3A/RigliOuA== X-Received: by 2002:a05:6808:17a7:b0:350:d0af:21a9 with SMTP id bg39-20020a05680817a700b00350d0af21a9mr114125oib.248.1664219220693; Mon, 26 Sep 2022 12:07:00 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:d68e:b0:12c:5f71:73d7 with SMTP id z14-20020a056870d68e00b0012c5f7173d7ls176108oap.10.-pod-prod-gmail; Mon, 26 Sep 2022 12:06:58 -0700 (PDT) X-Received: by 2002:a05:6870:a913:b0:12c:55d6:968 with SMTP id eq19-20020a056870a91300b0012c55d60968mr124874oab.244.1664219216375; Mon, 26 Sep 2022 12:06:56 -0700 (PDT) In-Reply-To: X-Original-Sender: Meik.Hellmund-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.io gmane.text.pandoc:31465 Archived-At: ------=_Part_38_1885561292.1664219215538 Content-Type: multipart/alternative; boundary="----=_Part_39_1174927806.1664219215538" ------=_Part_39_1174927806.1664219215538 Content-Type: text/plain; charset="UTF-8" Hm, I want to use this as a quarto extension. Don't know how to make two pandoc-runs in quarto. So I tried to implement the logic of `--ipynb-outbut=best` in lua: https://gitea.math.uni-leipzig.de/hellmund/PandocAnsiFilter fiddlosopher schrieb am Mittwoch, 21. September 2022 um 19:32:04 UTC+2: > You could perhaps output to native (using the filter and > --ipynb-output=all), then read in the native and output your desired format > using --ipynb-output=best? > > > On Sep 21, 2022, at 3:14 AM, Meik Hellmund wrote: > > > > Ah, thank you! I totally misunderstood the meaning of `--ipynb-output`. > So I can start playing around with a lua filter. > > I want to use this filter with Quarto. Then I will need the original > meaning/effect of `ipynb-output=best`, too. > > Rewrite your ` filterIpynbOutput` function in Lua? > > > > Best regards, Meik > > > > > > > > fiddlosopher schrieb am Dienstag, 20. September 2022 um 20:01:46 UTC+2: > > The ANSI escapes are stripped out of the code block unless the output > format is ipynb OR `--ipynb-output=all` is used. > > So, if you use that command-line option, you could write a filter that > does something with the ANSI escapes. > > > > > > -- > > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/5f877bed-697b-481c-9604-c5d69168eda9n%40googlegroups.com > . > > -- 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/b116a85b-6a23-40ee-9f90-3dd5e29b6a9dn%40googlegroups.com. ------=_Part_39_1174927806.1664219215538 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hm, I want to use this as a quarto extension. Don't know how to make two pa= ndoc-runs in quarto. So I tried to implement the logic of `--ipynb-outbut= =3Dbest` in lua:  https://gitea.math.uni-leipzig.de/hellmund/PandocA= nsiFilter

fiddlosopher schrieb am Mittwoch, 21. September 2022 um 19:32:0= 4 UTC+2:
You = could perhaps output to native (using the filter and --ipynb-output=3Dall),= then read in the native and output your desired format using --ipynb-outpu= t=3Dbest?

> On Sep 21, 2022, at 3:14 AM, Meik Hellmund <meik.h...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>=20
> Ah, thank you! I totally misunderstood the meaning of `--ipynb-ou= tput`. So I can start playing around with a lua filter.
> I want to use this filter with Quarto. Then I will need the orig= inal meaning/effect of `ipynb-output=3Dbest`, too.=20
> Rewrite your ` filterIpynbOutput` function in Lua?
>=20
> Best regards, Meik
>=20
>=20
>=20
> fiddlosopher schrieb am Dienstag, 20. September 2022 um 20:01:46 U= TC+2:
> The ANSI escapes are stripped out of the code block unless the out= put format is ipynb OR `--ipynb-output=3Dall` is used.=20
> So, if you use that command-line option, you could write a filter = that does something with the ANSI escapes.=20
>=20
>=20
> --=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 email to pandoc-discus..= .@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5f877bed-6= 97b-481c-9604-c5d69168eda9n%40googlegroups.com.

--
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/b116a85b-6a23-40ee-9f90-3dd5e29b6a9dn%40googlegroups.= com.
------=_Part_39_1174927806.1664219215538-- ------=_Part_38_1885561292.1664219215538--