A string diagram generator