From SIMILE Widgets
The basic process for creating an exporter is:
- Assuming you've started from one of the other exporters, say exhibit-json-exporter.js, replace all instances of the current exporter name and replace it with your new name in CamelCase. For this example, all instances of "ExhibitJsonExporter" would be replaced with "MyFormatExporter" in the file.
- Notice the getLabel function. You'll want to replace this label with one more appropriate for your exporter. Pick a label that you'll want Exhibit to use to refer to the exporter (say, "myFormatExporterLabel"). Replace the old with the new.
- Implement. ;)
- Now you need to let Exhibit know that your new exporter exists. In api/scripts/exhibit.js you'll find an array of exporters defined in Exhibit._Impl. Add your exporter to the array. As earlier, you'll want to refer to your exporter by CamelCase(e.g. Exhibit.MyFormatExporter).
- Finally, you'll want to add your label from step 3 to the localizations. As of this writing, there is only one localization: English. Go to api/locales/en/scripts and edit exhibit-l10n.js to reflect your label.
Note that these are just a few early stage notes -- this needs to be fleshed out and potentially corrected!