[IPython-dev] A thought about nbconvert

Brian Granger ellisonbg at gmail.com
Fri Nov 16 12:24:55 EST 2012

I like the idea of using cell metadata to filter the things that appear in
the converted notebook.  What about creating a metadata field called tags
that is a list of tags that cell has.  That would allow to to include and
exclude different tags upon conversion.  We could do:

export and exclude tag=['solutions'] to create a notebook without the
solution to problems for example.

On Thu, Nov 15, 2012 at 11:48 PM, Matthias BUSSONNIER <
bussonniermatthias at gmail.com> wrote:

> Le 16 nov. 2012 à 00:46, David Warde-Farley a écrit :
> Hi David,
> > Hey Paul,
> >
> > Hmm. So, two things:
> >
> > - If I were to add it to the "simple" metadata editor (as is currently
> the case with slideshow stuff, I think?) wouldn't that force a key name?
> This is one of the reason the Metadata UI is not moving forward right now.
> it is not made only for slideshow.
> I would like to make it easily extendable.
> My first thought was that you could register a callback that get the
> current cell as first argument, and the div of the clicked button as second.
> So that you can do whatever you want (just toggle a value) or completely
> open a jQuery dialog.
> The problem is  when does the metadata extension append ? is it through a
> Js plugin, or anytime a notebook is launched.
> The main problem with the second one is that it is hard to extend both
> already instantiated  metadata UI toolbar and class prototype.
> Also if the metadata is modified by something else than the button, how is
> the button state updated ?
> Eventually this UI might be used for touch device (cut, copy, past,
> run)... so we surely want to be able to at least partially load it. (hence
> jsplugin is hard)
> unless you only hide part with css.
> (this is also something I want to talk to brian, because right now js
> plugin are always loaded and you might want to load them only at some point)
> As for the key name, you could use your own prefix.
> like stuff things in `nbconvert.conversionOption.whatever`,
> `nbconvert.conversionOption.anotherStuff`
> > - similarly, fine-grained behaviour (code but not output, output but not
> code) seems hard to accomplish in a generic way.
> You can also use 'notebook' and 'worksheet' level metadata.
> this can be a global flag, which is 'merged' into each cell metadata at
> convert time to avoid all the
> `if metadata.nooutput or worksheet.metadata.nooutput :`
> But if there is no global flag from command line, I'm fine with it, it
> could be a done programatically. As I wrote on the other PR let's build a
> good module, and having command line tool will be convenience.
> --
> Matthias
> >
> > Thoughts?
> >
> > David
> >
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu and ellisonbg at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20121116/d3911759/attachment.html>

More information about the IPython-dev mailing list