diff --git a/scripts/python/nasal_api.py b/scripts/python/nasal_api.py index 983cc719f..51b82ce9b 100755 --- a/scripts/python/nasal_api.py +++ b/scripts/python/nasal_api.py @@ -29,6 +29,7 @@ The API doc in HTML format is generated in the current working directory""" ########### Local $FGROOT/Nasal/ path ########## NASAL_PATH="../fgfs/fgdata/Nasal/" + def get_files(nasal_dir): if nasal_dir[-1]!='/': @@ -38,7 +39,9 @@ def get_files(nasal_dir): except: print "The path does not exist" sys.exit() - + fgroot_dir = nasal_dir.rstrip('/').replace('Nasal','') + f_version = open(fgroot_dir+'version','rb') + version = f_version.read(256).rstrip('\n') top_level = [] modules = [] top_namespaces = [] @@ -66,17 +69,31 @@ def get_files(nasal_dir): functions=parse_file(f) top_namespaces.append([m,functions]) - output_text(top_namespaces,modules) + output_text(top_namespaces,modules,version) -def output_text(top_namespaces,modules): +def output_text(top_namespaces,modules,version): fw=open('./nasal_api.html','wb') buf='
\