imageset: generates code for Xcode assets
Reads your .xcassets directory and generates functions, categories, or constants.
Supports both Swift and Objective-C, and allows custom templates.
Installation
$ pip install imagesetUsage
Just run:
$ imageset --helpFor details. The category/extension mode seems best to me.