Add script to generate C++ api ref and examples