autogen script for printing code