# Config options in custom exporter for nbconvert

**URL:** https://discourse.jupyter.org/t/config-options-in-custom-exporter-for-nbconvert/12395
**Category:** nbconvert
**Tags:** help-wanted
**Created:** [December 31, 2021, 11:32pm UTC](https://discourse.jupyter.org/t/config-options-in-custom-exporter-for-nbconvert/12395 "2021-12-31T23:32:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![scbarton](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/scbarton/32/137_2.png) [@scbarton](https://discourse.jupyter.org/u/scbarton)
#### Post date: [December 31, 2021, 11:32pm UTC](https://discourse.jupyter.org/t/config-options-in-custom-exporter-for-nbconvert/12395/1 "2021-12-31T23:32:38Z")

</div>

I’d like to write an nbconvert custom exporter for the [textbundle format](http://textbundle.org), to be called from the “Download As” menu of Jupyter. Based on markdown, this format has some specific requirements that are satisfied by the following nbconvert config options:

- JupyterApp.output\_base = “text”
- JupyterApp.output\_files\_dir = “assets”
- FilesWriter.build\_directory = “{notebook\_name}.textbundle”

When running nbconvert from the command line, I can set these options and generate a textbundle using a command like:

```bash
jupyter nbconvert test.ipynb --to markdown --NbConvertApp.output_files_dir="assets" --FilesWriter.build_directory="{notebook_name}.textbundle" --NbConvertApp.output_base="text"

```

**But how can I set these options within a custom exporter called by Jupyter?**

I’ve tried specifying these options using a `default_config` function, for example:

```python
    @property
    def default_config(self):
        c = Config({
            'NbConvertApp': {
                'output_base': 'text',
                'output_files_dir': 'assets'
            }
        })
        c.merge(super().default_config)
        return c        

```

However, these settings don’t seem to be used to generate output. Any suggestions? Thanks in advance!
