Difference between revisions of "Nasal api doc.py"

From FlightGear wiki
Jump to: navigation, search
m (Partial copy editing; +-cat: Python Software → Python software)
 
Line 1: Line 1:
 
{{Stub}}
 
{{Stub}}
  
there is a Python script that parses $FG_ROOT/Nasal to create up-to-date Nasal docs from it, see Adrian's script: [https://forum.flightgear.org/viewtopic.php?f=72&amp;t=25119 viewtopic.php?f=72&amp;t=25119]<ref>{{cite web
+
There is a Python script that parses $FG_ROOT/Nasal to create up-to-date Nasal docs from it.  See Adrian's script: [https://forum.flightgear.org/viewtopic.php?f=72&amp;t=25119 viewtopic.php?f=72&amp;t=25119]<ref>{{cite web
 
   |url    =  https://forum.flightgear.org/viewtopic.php?p=286012#p286012  
 
   |url    =  https://forum.flightgear.org/viewtopic.php?p=286012#p286012  
 
   |title  =  <nowiki> Re:  </nowiki>  
 
   |title  =  <nowiki> Re:  </nowiki>  
Line 10: Line 10:
 
   }}</ref>
 
   }}</ref>
  
there's a dedicated Python script that can help automatically extract most of the boilerplate structure to help create the wiki stub - see Adrian's work<ref>{{cite web
+
There is a dedicated Python script that can help automatically extract most of the boilerplate structure to help create the wiki stub.  See Adrian's work.<ref>{{cite web
 
   |url    =  https://forum.flightgear.org/viewtopic.php?p=304161#p304161  
 
   |url    =  https://forum.flightgear.org/viewtopic.php?p=304161#p304161  
 
   |title  =  <nowiki> Re: Canvas GUI API documentation in wiki </nowiki>  
 
   |title  =  <nowiki> Re: Canvas GUI API documentation in wiki </nowiki>  
Line 20: Line 20:
  
  
Adrian came up with a simple Nasal API file for $FG_ROOT/Nasal using a python script, he uploaded the file [http://ompldr.org/vY2hmYw/nasal_api.html here]
+
Adrian came up with a simple Nasal API file for $FG_ROOT/Nasal using a python script.  He uploaded the file [http://ompldr.org/vY2hmYw/nasal_api.html here].
 
+
Adrian's python script automatically creates Nasal API docs based on parsing $FG_ROOT/Nasal.<ref>{{cite web
adrian's python script automatically creates Nasal API docs based on parsing $FG_ROOT/Nasal.<ref>{{cite web
+
 
   |url    =  https://forum.flightgear.org/viewtopic.php?p=150191#p150191  
 
   |url    =  https://forum.flightgear.org/viewtopic.php?p=150191#p150191  
 
   |title  =  <nowiki> Re:  </nowiki>  
 
   |title  =  <nowiki> Re:  </nowiki>  
Line 32: Line 31:
  
  
Adrian's nasal_api_doc.py script in $FG_SRC/scripts/python should automatically create updated API documentation based on the nasal source code in $FG_ROOT/Nasal (html output).<ref>{{cite web
+
Adrian's nasal_api_doc.py script in $FG_SRC/scripts/python should automatically create updated API documentation based on the nasal source code in $FG_ROOT/Nasal (HTML output).<ref>{{cite web
 
   |url    =  https://forum.flightgear.org/viewtopic.php?p=177299#p177299  
 
   |url    =  https://forum.flightgear.org/viewtopic.php?p=177299#p177299  
 
   |title  =  <nowiki> Re: Canvas API documentation </nowiki>  
 
   |title  =  <nowiki> Re: Canvas API documentation </nowiki>  
Line 42: Line 41:
  
  
This is a temporary solution until there's a more solid solution. The reasons Adrian used a home-made parser instead of a pre-made solution is the lack of uniform coding and comment style. There's a lot to be improved, for sure. For one, Adrian would like to extend it further so it can parse classes as well.
+
This is a temporary solution until there is a more solid solution. The reasons Adrian used a home made parser instead of a pre-made solution is the lack of uniform coding and comment style. There is for sure a lot to be improved. For one, Adrian would like to extend it further so it can parse classes as well.
  
 
Please take a look and comment.<ref>{{cite web
 
Please take a look and comment.<ref>{{cite web
Line 52: Line 51:
 
   |script_version = 0.40  
 
   |script_version = 0.40  
 
   }}</ref>
 
   }}</ref>
 
  
 
== References ==
 
== References ==
Line 58: Line 56:
  
 
[[Category:Nasal]]
 
[[Category:Nasal]]
[[Category:Python Software]]
+
[[Category:Python software]]

Latest revision as of 05:28, 25 March 2020

This article is a stub. You can help the wiki by expanding it.

There is a Python script that parses $FG_ROOT/Nasal to create up-to-date Nasal docs from it. See Adrian's script: viewtopic.php?f=72&t=25119[1]

There is a dedicated Python script that can help automatically extract most of the boilerplate structure to help create the wiki stub. See Adrian's work.[2]


Adrian came up with a simple Nasal API file for $FG_ROOT/Nasal using a python script. He uploaded the file here. Adrian's python script automatically creates Nasal API docs based on parsing $FG_ROOT/Nasal.[3]


Adrian's nasal_api_doc.py script in $FG_SRC/scripts/python should automatically create updated API documentation based on the nasal source code in $FG_ROOT/Nasal (HTML output).[4]


This is a temporary solution until there is a more solid solution. The reasons Adrian used a home made parser instead of a pre-made solution is the lack of uniform coding and comment style. There is for sure a lot to be improved. For one, Adrian would like to extend it further so it can parse classes as well.

Please take a look and comment.[5]

References

References
  1. Hooray  (May 21st, 2016).  Re: .
  2. Hooray  (Jan 25th, 2017).  Re: Canvas GUI API documentation in wiki .
  3. Hooray  (Feb 11th, 2012).  Re: .
  4. Hooray  (Feb 15th, 2013).  Re: Canvas API documentation .
  5. adrian  (Jan 27th, 2012).  .