|
| 1 | +The python script createjQueryXMLDocs.py goes to the internet and retrieves API data |
| 2 | +from jQuery's wiki then converts it to an XML format for use by other applications. It |
| 3 | +was written by David Serduke in late 2007. |
| 4 | + |
| 5 | +There are a few options that can be passed in: |
| 6 | + |
| 7 | + help: |
| 8 | + For reading and displaying this help out of SVN. (defaults to 'false' unless no |
| 9 | + parameters were set) |
| 10 | + |
| 11 | + supresscontenttype: |
| 12 | + For use when not running on a web server. (defaults to 'false') |
| 13 | + |
| 14 | + start: |
| 15 | + The starting place in the wiki. (defaults to 'API') |
| 16 | + |
| 17 | + exporter: |
| 18 | + The wiki XML exporter page. (defaults to 'http://docs/jquery.com/Special:Export') |
| 19 | + |
| 20 | + version: |
| 21 | + The version number to put on the generated XML document. (defaults to 'Unknown') |
| 22 | + |
| 23 | + convertlinks: |
| 24 | + The method to convert wiki links like [[Ajax_Events|Ajax Events]]. Can have the |
| 25 | + value of 'none', 'html', or 'node'. These either i(respectively) send it on, |
| 26 | + convert to a string like "<a href='Ajax_Events'>Ajax Events</a>", |
| 27 | + or create an XML node named 'a' with the same information. (defaults to 'html') |
| 28 | + |
| 29 | + forlinksurl: |
| 30 | + Value to prepend to any wiki link like 'http://docs.jquery.com/' (defaults to '') |
| 31 | + |
| 32 | + verbose: |
| 33 | + Can add an XML node 'info' to the root 'docs' element that has conversion details |
| 34 | + mostly for debugging purposes. It will also create "pretty" xml when not set to |
| 35 | + false. Can have the value of 'false', 'true', or 'super'. (defaults to 'false') |
| 36 | + |
| 37 | + debug: |
| 38 | + Will force the output to be text/plain instead of text/xml and put verbose messages |
| 39 | + to normal print instead of sticking them in the xml tree. (defaults to 'false') |
| 40 | + |
| 41 | +The basic XML format is as follows: |
| 42 | + |
| 43 | +<docs timestamp="[last time anything was modified]" version="[version parameter]" startdoc='[start param]'> |
| 44 | + <info> - this node is here if 'verbose' parameter was set to other than 'false' |
| 45 | + <msg>Loading...</msg> |
| 46 | + </info> |
| 47 | + <cat value="Core"> |
| 48 | + <subcat value="$(...) The jQuery Function"> |
| 49 | + <function name="jQuery" .../> |
| 50 | + <function .../> |
| 51 | + <selector .../> |
| 52 | + <property .../> |
| 53 | + </subcat> |
| 54 | + </cat> |
| 55 | +</docs> |
| 56 | + |
| 57 | +The 'cat' and 'subcat' elements are optional depending on the 'start' parameter and what |
| 58 | +is in the wiki data. Other than that, most of the wiki data is converted directly to an |
| 59 | +XML equivilent so if anything new is added to the wiki it should be sent right over to |
| 60 | +the XML document the next time it is created. |
| 61 | + |
| 62 | +Here are a few examples of how to use the script. |
| 63 | + |
| 64 | +To get this help: |
| 65 | +http://[location of script]/createjQueryXMLDocs.py |
| 66 | + |
| 67 | +To get the API: |
| 68 | +http://[location of script]/createjQueryXMLDocs.py?version=1.2.2 |
| 69 | + |
| 70 | +To get the UI: |
| 71 | +http://[location of script]/createjQueryXMLDocs.py?start=UI&version=1.1 |
| 72 | + |
| 73 | +To get a specific function: |
| 74 | +http://[location of script]/createjQueryXMLDocs.py?start=Events/bind&version=1.2.2 |
| 75 | + |
| 76 | +To get a debug a problem: |
| 77 | +http://[location of script]/createjQueryXMLDocs.py?start=Selectors&verbose=super&debug=true |
0 commit comments