def add_action(scriptName, iconName='python', iconColor='', title=''):
    '''adds an editor action.  scriptName should start with /
	(e.g /stash/stash.py)
	iconName should be an icon without leading prefix,
	or trailing size.  i.e alert instead of iob:alert_256
	iconColor should be a web style hex string, eg aa00ff
	title is the alternative title
	Call save_defaults() to store defaults
	')'''
    defaults = NSUserDefaults.standardUserDefaults()
    kwargs = locals()
    entry = {
        key: kwargs[key]
        for key in ('scriptName',
                    'iconName',
                    'iconColor',
                    'title',
                    'arguments')
        if key in kwargs and kwargs[key]
    }
    editoractions = get_actions()
    editoractions.append(ns(entry))
    defaults.setObject_forKey_(editoractions, 'EditorActionInfos')
adds an editor action.  scriptName should start with /
	(e.g /stash/stash.py)
	iconName should be an icon without leading prefix,
	or trailing size.  i.e alert instead of iob:alert_256
	iconColor should be a web style hex string, eg aa00ff
	title is the alternative title
	Call save_defaults() to store defaults
	')
lib/pythonista_add_action.py