generate.py changed to call ext. scripts