ipython/ipython — pull request #3607 by jdfreder (2013-07-11 01:17:08+00:00)
Title: NbConvert: Writers, No YAML, and stuff...

# NbConvert: Writers, No YAML, and stuff...

Running `ipython nbconvert` will read the default config and then apply it to one or more notebooks.
Multiple notebooks can be specified at the command line in a few different ways:

ipython nbconvert notebook*.ipynb
ipython nbconvert notebook1.ipynb notebook2.ipynb
ipython nbconvert # this will use the config file to fill in the notebooks

## Short summary of changes

- Transformer / Filter parameters removed from constructor of Exporter and Export_...() methods
in favor of traitlets added to the Exporter
- Writers added
- *FileWriter* : writes to the user's drive, either in the cwd or a subdirectory (*/nbconvert_build* by default)
- *StdoutWriter* : writes the Jinja output directly to the stdout with no additional headers (may be useful for piping data to other applications)
- *DebugWriter* : pretty prints the resources dict to stdout
A custom writer can be used by setting the *writer_class* traitlet (DottedObjectName) to the namespace&name of the writer
- Ability to specifiy Transformers / Filters via namespace&name (DottedObjectName)
- Notebook names are treated as patterns and are evaluated using glob.glob
- Notebook App now inherits from *BaseIPythonApplication* which allows it to specify a default config file, 'ipython_nbconvert_config.py'
- The coupling of file-related data throughout the api was reduced by taking advantage of the resources dict.
- A ConvertFiguresTransformer and ConvertSvgTransformer were added. ExtractFigureTransformer now extracts figures only (without the ability to renamed the figures).
- nbconvert is more verbose, including usage examples at the commandline
- Small things, like renaming cell_transform to transform_cell, etc...

## Resources dict

Keys
'figures': contains a dictionary of figure filenames & binary data
'unique_key' : (optional) key unique to the single notebook being extracted that allows extract figure transformer to give the figures unique names.
'output_extension' : used by the FilesWriter to write the output with the correct extension

## Footnote

There may be some things missing in this description.
This PR needs a good reviewing.
I'll probably update this description later.

**TODO** : Update readme.rst if necessary...