Export Configuration SchemaΒΆ

{
    "$schema": "http://json-schema.org/draft-04/schema",
    "description": "a configuration for exporting an ipynb in ipypublish",
    "type": "object",
    "additionalProperties": true,
    "required": [
        "description",
        "exporter",
        "template"
    ],
    "properties": {
        "$schema": {
            "type": "string"
        },
        "description": {
            "description": "a description of the configuration",
            "type": "array",
            "minItems": 1,
            "items": {
                "type": "string"
            }
        },
        "exporter": {
            "description": "an exporter to be used by nbconvert",
            "type": "object",
            "additionalProperties": false,
            "required": [
                "class",
                "filters",
                "preprocessors"
            ],
            "properties": {
                "class": {
                    "description": "the python class path for the exporter",
                    "type": "string"
                },
                "filters": {
                    "description": "the filter functions to be used by the exporter",
                    "type": "object",
                    "patternProperties": {
                        ".+": {
                            "type": "string"
                        }
                    }
                },
                "preprocessors": {
                    "description": "the preprocessor classes to be used by the exporter",
                    "type": "array",
                    "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                            "class",
                            "args"
                        ],
                        "properties": {
                            "class": {
                                "description": "the python class path for the preprocessor",
                                "type": "string"
                            },
                            "args": {
                                "description": "arguments taken by the preprocessor",
                                "type": "object"
                            }
                        }
                    }
                },
                "other_args": {
                    "description": "additional arguments to be fed to the traitlets Config",
                    "type": "object"
                }
            }
        },
        "template": {
            "description": "configuration to build a Jinja template",
            "type": [
                "null",
                "object"
            ],
            "additionalProperties": false,
            "required": [
                "outline"
            ],
            "properties": {
                "outline": {
                    "description": "the outline schema, containing the jinja template and schema for segments",
                    "$ref": "#/definitions/json_location"
                },
                "segments": {
                    "description": "segments to be inserted into the outline",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/json_location"
                    }
                }
            }
        },
        "postprocessors": {
            "description": "configuration for post-processing of the stream output from the exporter",
            "type": "object",
            "properties": {
                "order": {
                    "description": "the order of application of the post-processors, named by their entry-point",
                    "type": "array",
                    "items": {"type": "string"},
                    "default": [
                        "remove-blank-lines",
                        "remove-trailing-space",
                        "filter-output-files",
                        "fix-slide-refs",
                        "remove-folder",
                        "write-text-file",
                        "write-resource-files",
                        "copy-resource-paths"
                    ]
                },
                "config": {
                    "description": "the traitlets configuration for post-processor classes",
                    "type": "object",
                    "default": {
                        "IPyPostProcessor": {
                            "skip_mime": true
                        },
                        "PDFExport": {
                            "files_folder": "${files_path}",
                            "convert_in_temp": false,
                            "debug_mode": false,
                            "open_in_browser": false,
                            "skip_mime": false
                        },
                        "RemoveFolder": {
                            "files_folder": "${files_path}"
                        },
                        "CopyResourcePaths": {
                            "files_folder": "${files_path}"
                        }
                    }
                }
            }

        }
    },
    "definitions": {
        "json_location": {
            "oneOf": [
                {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                        "module",
                        "file"
                    ],
                    "properties": {
                        "module": {
                            "description": "the python module that the json file resides in",
                            "type": "string"
                        },
                        "file": {
                            "description": "the filename of the json file",
                            "type": "string"
                        }
                    }
                },
                {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                        "directory",
                        "file"
                    ],
                    "properties": {
                        "directory": {
                            "description": "the folder path that the json file resides in",
                            "type": "string"
                        },
                        "file": {
                            "description": "the filename of the json file",
                            "type": "string"
                        }
                    }
                }
            ]
        }
    }
}