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 imageset
Usage
Just run:
$ imageset --help
For details. The category/extension mode seems best to me.