@@ -20,6 +20,66 @@ <h3 align="center">sql2doxygen v0.1</h3>
20
20
< h4 > Introduction</ h4 >
21
21
22
22
< p >
23
+ Doxygen is a tool for generating documentation from source code and it currently
24
+ handles many languages either natively or through add-on filters. This script
25
+ is one such filter that transforms T-SQL into C-like code so that doxygen can
26
+ then parse it natively.
27
+ </ p > < p >
28
+ While this means that you can benefit from the automated generation of
29
+ documentation it does mean that you have to mentally translate a 'struct' back
30
+ into a 'table' and reverse the type and member/variable names in declarations.
31
+ </ p > < p >
32
+ NB: There is a separate project underway that is designed to allow Doxygen to
33
+ natively handle SQL and format it in more natural fashion.
34
+ </ p >
35
+
36
+ < a name ="Installation "> </ a >
37
+ < h4 > Installation</ h4 >
38
+
39
+ < p >
40
+ The only file you need from the package is < code > sql2doxygen.ps1</ code > . Copy
41
+ it to somewhere suitable such as your Doxygen installation or the SQL project.
42
+ </ p > < p >
43
+ In the doxygen configuration file for your project you'll find a section about
44
+ options for input files. Near the bottom of that section you'll find an entry
45
+ called < code > INPUT_FILTER</ code > , set this to where the < code > sql2doxygen.ps1</ code >
46
+ script lives.
47
+ </ p > < pre >
48
+ #---------------------------------------------------------------------------
49
+ # configuration options related to the input files
50
+ #---------------------------------------------------------------------------
51
+ INPUT = .
52
+ . . .
53
+ INPUT_FILTER = "PowerShell.exe -File C:\Path\To\sql2doxygen.ps1"
54
+ . . .
55
+ </ pre > < p >
56
+ NB: The surrounding quotes are required or you'll get a cryptic error from
57
+ Doxygen about not being able to find it.
58
+ </ p >
59
+
60
+ < a name ="Exmaple "> </ a >
61
+ < h4 > Example Output</ h4 >
62
+
63
+ < p >
64
+ In the package you'll find a subfolder called < code > Example</ code > that contains
65
+ a Doxygen project file and a few .sql files. Assuming the Doxygen .exe is on your
66
+ path and the location is writable you can generate the example output like so:-
67
+ </ p > < pre >
68
+ C:\sql2doxygen\Example> doxygen.exe Doxygen.cfg
69
+ </ pre > < p >
70
+ You should see a new folder appear called < code > Dox</ code > . Open < code > index.html</ code >
71
+ to see the results.
72
+ </ p > < p >
73
+ NB: The example Doxygen.cfg file uses a relative path to reference the sql2doxygen
74
+ filter script and so you must ensure the current working directory (CWD) is set
75
+ to the < code > Example</ code > folder.
76
+ </ p >
77
+
78
+ < a name ="Formatting "> </ a >
79
+ < h4 > SQL Source Formatting</ h4 >
80
+
81
+ < p >
82
+ TODO... The example covers some of this in its introduction page.
23
83
</ p >
24
84
25
85
< hr >
@@ -41,7 +101,7 @@ <h4>Contact Details</h4>
41
101
Web: < a href ="http://www.cix.co.uk/~gort "> www.cix.co.uk/~gort</ a > < br >
42
102
</ p > < p >
43
103
Chris Oldwood< br >
44
- 22nd June 2011< br >
104
+ 14th September 2011< br >
45
105
</ p >
46
106
47
107
</ body >
0 commit comments