Adapt script to changed name.
This commit is contained in:
parent
7d2f2f2b6f
commit
8b46ee6648
1 changed files with 28 additions and 28 deletions
|
@ -23,7 +23,7 @@ import re, string
|
||||||
|
|
||||||
"""Script which generates an API documentation file for Nasal libraries
|
"""Script which generates an API documentation file for Nasal libraries
|
||||||
located inside $FGROOT/Nasal/
|
located inside $FGROOT/Nasal/
|
||||||
Usage: nasal_api.py parse [path to $FGROOT/Nasal/]
|
Usage: nasal_api_doc.py parse [path to $FGROOT/Nasal/]
|
||||||
Or configure the local path below, and ommit the path in the console.
|
Or configure the local path below, and ommit the path in the console.
|
||||||
The API doc in HTML format is generated in the current working directory"""
|
The API doc in HTML format is generated in the current working directory"""
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ def get_files(nasal_dir):
|
||||||
|
|
||||||
|
|
||||||
def output_text(top_namespaces,modules,version):
|
def output_text(top_namespaces,modules,version):
|
||||||
fw=open('./nasal_api.html','wb')
|
fw=open('./nasal_api_doc.html','wb')
|
||||||
buf='<html><head>\
|
buf='<html><head>\
|
||||||
<title>Nasal API</title>\
|
<title>Nasal API</title>\
|
||||||
<style>\n\
|
<style>\n\
|
||||||
|
@ -90,7 +90,7 @@ def output_text(top_namespaces,modules,version):
|
||||||
|
|
||||||
buf+='<h1 style="padding-left:20px;display:block;color:#fff;background-color:#555588;">\
|
buf+='<h1 style="padding-left:20px;display:block;color:#fff;background-color:#555588;">\
|
||||||
Nasal $FGROOT Library<br/><span style="font-size:12px;">Flightgear version: '+version+'\
|
Nasal $FGROOT Library<br/><span style="font-size:12px;">Flightgear version: '+version+'\
|
||||||
<br/>This file is generated automatically by scripts/python/nasal_api.py\
|
<br/>This file is generated automatically by scripts/python/nasal_api_doc.py\
|
||||||
</span></h1>\
|
</span></h1>\
|
||||||
<br/><a href="http://plausible.org/nasal">Nasal documentation</a> \
|
<br/><a href="http://plausible.org/nasal">Nasal documentation</a> \
|
||||||
<a href="http://wiki.flightgear.org/Nasal_scripting_language">Flightgear Nasal documentation</a>\n<div style="float:right;"> '
|
<a href="http://wiki.flightgear.org/Nasal_scripting_language">Flightgear Nasal documentation</a>\n<div style="float:right;"> '
|
||||||
|
@ -279,7 +279,7 @@ def parse_file(filename):
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if len(sys.argv) <2:
|
if len(sys.argv) <2:
|
||||||
print 'Usage: nasal_api.py parse [path to $FGROOT/Nasal/]'
|
print 'Usage: nasal_api_doc.py parse [path to $FGROOT/Nasal/]'
|
||||||
sys.exit()
|
sys.exit()
|
||||||
else:
|
else:
|
||||||
if sys.argv[1]=='parse':
|
if sys.argv[1]=='parse':
|
||||||
|
@ -289,5 +289,5 @@ if __name__ == "__main__":
|
||||||
nasal_path=sys.argv[2]
|
nasal_path=sys.argv[2]
|
||||||
get_files(nasal_path)
|
get_files(nasal_path)
|
||||||
else:
|
else:
|
||||||
print 'Usage: nasal_api.py parse [path to $FGROOT/Nasal/]'
|
print 'Usage: nasal_api_doc.py parse [path to $FGROOT/Nasal/]'
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
Loading…
Add table
Reference in a new issue