List for cgit developers and users
 help / color / mirror / Atom feed
Subject: Render Jupyter notebook in tree
Date: Fri, 28 Dec 2018 16:54:43 +0100	[thread overview]
Message-ID: <20181228155443.GA15688@STATENS_laptop> (raw)
In-Reply-To: <CAFaR55oYr2cAivw8_C+DRw82pmuYFJKRmG_15T_QzjRSm_bobA@mail.gmail.com>

That could be a nice feature to have. But I'm not sure that
it's something that should be there by default.

Anyway, I personally run a filter which renders out org-mode
files in tree view. It's a bit slow, and lacks a good way to
add CSS.

	...
	extension=${REQUEST_URI: -3}

	case $extension in
		org)
			temp=$(mktemp)
			cat - > $temp.org
			emacs $temp.org \
				--quick \
				--batch \
				--funcall org-html-export-to-html \
				--kill
			tail -n+10 $temp.html
			exit 0
			;;
	esac

	exec highlight --force -f -I -O xhtml -S "$EXTENSION" # 2>/dev/null


On Fri, Dec 28, 2018 at 10:48:22PM +0900, Katsuya Horiuchi wrote:
> Hi all,
> 
> Is there demand to render Jupyter notebooks in tree view?
> I personally would love to see them rendered just like GitHub.
> 
> It can be achieved by calling nbconvert [0] inside the filter.
> Considering there's ongoing discussion on rendering markdown files, I
> think this could add additional value to cgit.
> 
> [0] https://github.com/jupyter/nbconvert
> 
> 
> Best,
> 
> Katsuya
> _______________________________________________
> CGit mailing list
> CGit at lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/cgit

-- 
hugo


  reply	other threads:[~2018-12-28 15:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-28 13:48 katsuya.horiuchi.biz
2018-12-28 15:54 `  [this message]
2018-12-28 16:32   ` katsuya.horiuchi.biz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181228155443.GA15688@STATENS_laptop \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).