From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30132 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Converting org to ipynb Date: Sun, 06 Feb 2022 17:14:22 -0800 Message-ID: References: <87mtj3ivnl.fsf@fastmail.fm> 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="29719"; mail-complaints-to="usenet@ciao.gmane.io" To: Joost Kremers , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBB6XEQGIAMGQEUOEJOEA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Feb 07 02:14:40 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pj1-f63.google.com ([209.85.216.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nGsc3-0007a9-LW for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 07 Feb 2022 02:14:39 +0100 Original-Received: by mail-pj1-f63.google.com with SMTP id gx6-20020a17090b124600b001b86dfa901dsf5553201pjb.5 for ; Sun, 06 Feb 2022 17:14:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1644196478; cv=pass; d=google.com; s=arc-20160816; b=AeE2hN6TthNtJhpL8MLgmFliafCi07kgdS/nOQATjh7AYkfNxUdWELdR+37S43zVhf 97WHYCcjJ4JRGcD1YbAbVEUQNeyVJHh1hcIQvQo2hAGJxFiGsS8lelRrnlgfmPxTp23l OT+BB40VVMlRazlYtbgBjHsRZG1BHCA7WhKlKt+Te6Tp1MC5Mx1f0MAuM1M2mFimDMFg WLdAcuesC96AFpPYaYUi08PmqtVANciK4c0VvCRYmmvHDtM5W6jmMddUeNS5GKF6kuXK X50TutFpJB/aUBK//aFdIfXkwDJM+EGcKAb+29jxom8OHskMbWFXMZUDObEMaOR+wlX/ QzSg== 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 :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=YBSAFUPRrC0lBGBbvbUk/iyWu6WiCqHKGWpjHbogkV4=; b=DJa+cgE2nDYCPRdzJl7RARFhlKiOWPbWzQGzKp+STUrHLltZ0qU1bhFcFgEHhUOmnn 221FyqW1UEQnqOgeBo6O+WyDOa8k1A0PT/ltSzXlUCzVce3iVgNsLim2aVCrvDCJRE3g GjW4xywhj4oWMQYDVn5zBJ2cYvixeCDSiMnE7ASQJebOfFtCJ/ePji/K+Iok1lUOMAi5 Z+GNGGFon/fHXJIBuCCChEYDZwR/RTAv+E06q9EwCqcn7He310OUmWVGdh8UNevc9jDp qJUBqtztKqum+uj3uuvVfwOLzeoXYN9az2H19dxEtzEWoGpCX5JjZOFOBm2laSqtseXy vS3g== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=gfF1MnXe; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::631 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:in-reply-to:references:date: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=YBSAFUPRrC0lBGBbvbUk/iyWu6WiCqHKGWpjHbogkV4=; b=rVmjEvUOH8mmP2Xw6sdlnnegUTzqICeh/Yo0/y0Ou8EbvCe8eSUDH0FSUEj1tIHe7O PQeL9hSq7zQWsEAYVDc3acX10bG8+V3K9/lfvoZwNDBUj6ALOHkJGdqOkNTtY59i6diE YwPgB/9Qd/iJYFNuagLRi8FEWsPKtnD/YRZU+rtHxQnQO8KZ4tNzOUBzTB33KoBzE0JV EgTnBUUW+ok0tfnO+kFXk1SApaD+y7SKvXzibi6IDNerThjIApY8YC8dt3EGm6w1k29k baWuYL+V/ZzNqRRrq1BFmTHeHbn3mla1+fGqbBlkCNqSCu6dY3C3EI+EbUiIaukazGfq GTmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date: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=YBSAFUPRrC0lBGBbvbUk/iyWu6WiCqHKGWpjHbogkV4=; b=uxLAN5knXzJBDh6lnHirxR2irF4bsFknqFjZZKsP4eSJ4VyivXrn16Js6+CPLTbf3B sX+AyScfsLCKmwcUY9QCbP1rsnSnM2HhxUDuus6/8H4eWF3gl+QBms5ZYFTNsTG6NVx6 9sGbBo2DEjTg8tQAwGsGfw17DixLcafklhydga16S/ZkaUupyvKDNJ7s1HJaPoZ7Yx7Y teuNPKI0Dp9rApfVDwy5IcoyCMaQvPsUqPKyKgRwifyUmn2eJrsNe1g2iF9bdXiBKmFe KVaecliKijx5q3/TqqWz+N/FS2p79azOYyTg2x3zZpqzpL/1YCjJcUzj+BpDoesSvRCL b3Xw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531KSyDLX6XvNtw0awzq6pQ2Jmh67JECFJBM7CzRdE4iO7b1EKfT 22orrmdWXZF5dWshDEuGyr0= X-Google-Smtp-Source: ABdhPJw92u3Qq4ocbdgQ/g5uuaY0FAisyAgWnaDrpgg1gWLdgwWeZ9Gzo86tWqkjv8PepV5GCJ86xA== X-Received: by 2002:a17:90b:240a:: with SMTP id nr10mr15593058pjb.110.1644196478424; Sun, 06 Feb 2022 17:14:38 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6a00:1150:: with SMTP id b16ls3564996pfm.11.gmail; Sun, 06 Feb 2022 17:14:34 -0800 (PST) X-Received: by 2002:a63:3105:: with SMTP id x5mr7515300pgx.583.1644196474242; Sun, 06 Feb 2022 17:14:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644196474; cv=none; d=google.com; s=arc-20160816; b=ih78EJNOJw5p6049lKPMQpDdx3onk0Y02KZKMIgFhoQ2o1HIx4iUIxCWxTRbo413Pv kuKVrwJ/WFqcVYlUBYGjvXz8blLFzPNc/xGxhdonf0ftaSLI6m0+L1wFADRk0MNiCS91 F3xcJ1+R77maGCrhHM+RSbP6HYZIQ1w/tZdPFWfxt03YdT+rYyjC5OcfEP7kfjMH/CjM MSOUR9JIx2zyf29bYRLu7fPZLTfvtSMRwawCvwPwhMAhizj2cOmnai5saRsvv4Q0pmJU EUyj+smec4e3nHzbbwzCXkJU0ZZLTAZTTQA0DCZkLwlAo9C5lIPbpNkB35jQf5tpUPJQ ZudA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=zc6TOiGNfoCoJXL1PkyZ0vd6QWDaoyujuH/Y4xC2Res=; b=vSd3eaMmg6i13PqgMg2BI9bsJF2UB1JEVOfKzvYfSKwhyfXnSf2uXYzwtzmL2y2T3K G1yteaSih1DhBvJXNgsXsqhWQ2UwXCn865EARvJ5sZucDaHgPsAelpwM/9i2kEs6Cx21 JQmaCuEamQsssUR/Vd6fp2LuJ2ZT8OuShmRJ22oLydjCxOtYYt4fyB32+FoRbvWXOmNj 84qWKC1xk82CpxGWbodJjsqI9yqRY0l0S+jmj9vA/3LtJKyzh/BjLclKLuFNLfif+rsE Ose6HSnJMbtVv3F9Z7nUJEhyaX36cNZgJi+KfSkWrLUOlWLd6F0ziwCxs6qAW9AZjIPe z8+A== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=gfF1MnXe; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::631 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com. [2607:f8b0:4864:20::631]) by gmr-mx.google.com with ESMTPS id s3si386927pfg.1.2022.02.06.17.14.34 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 06 Feb 2022 17:14:34 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::631 as permitted sender) client-ip=2607:f8b0:4864:20::631; Original-Received: by mail-pl1-x631.google.com with SMTP id t9so7753755plg.13 for ; Sun, 06 Feb 2022 17:14:34 -0800 (PST) X-Received: by 2002:a17:902:7784:: with SMTP id o4mr13785549pll.173.1644196473726; Sun, 06 Feb 2022 17:14:33 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id n42sm9788112pfv.29.2022.02.06.17.14.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Feb 2022 17:14:33 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 482CBA298; Sun, 6 Feb 2022 20:14:22 -0500 (EST) In-Reply-To: <87mtj3ivnl.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org> X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=gfF1MnXe; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::631 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:30132 Archived-At: Joost Kremers writes: > Is there a way to convert an Org file to a Jupyter notebook that renders the > source blocks as code blocks in the notebook? Pandoc's user manual only talks > about converting Markdown to Jupyter notebooks, and I guess I could convert the > Org files to Markdown, add the `code` class to the source code blocks and then > convert to .ipynb, but that seems a little tedious... You should be able to do it from org, as long as the structure of your org file follows the structure the manual describes for markdown. If you're in doubt how to do that, you could always convert the markdown structure to native, and then find an org structure that produces the same AST. Maybe converting markdown -> org would lead you in the right direction. Sorry, I've forgotten the details of the ipynb conventions; someone else may be able to give more precise advice.