How do I add custom options to an export script (like triangulate faces, unwrap UVs, etc.)? I have a functioning export script that I haven't worked on since about a year ago. I'm just getting back into polishing it up and optimizing the code, but I can't remember how to add check boxes, custom values, and such in the UI export panel. I googled for some templates and tutorials, but I couldn't find anything.

Any example code that someone can provide would be appreciated.
To add user adjustable options you add properties to your export operator.

If you want to customize the way the options are displayed, add a draw(self, context) to your operator, which works the same as a panel draw method.

import bpy

class ExportData(bpy.types.Operator):
    """Export objects to file"""
    bl_idname = "export_scene.data"
    bl_label = "Export data"

    do_triangulate = bpy.props.BoolProperty(
            name="Triangulate faces",
            description="Triangulate all faces.",
            default=True,
            )

    sample_float = bpy.props.FloatProperty(
            name="example",
            description="Just an example.",
            min=0.0, max=1000.0,
            soft_min=0.0, soft_max=100.0,
            default=0.0,
            )

    def draw(self, context):
        layout = self.layout

        row = layout.row()
        row.prop(self, "do_triangulate")

        row = layout.row()
        row.prop(self, "sample_float", expand=True)

    def execute(self, context):
        # do your exporting here


You can find examples of how this works in most of the import/export scripts included with blender such as the obj exporter