├── LICENSE
├── README.md
├── _config.yml
├── assets
└── dox_title.png
├── dox
├── .doxignoreA
├── .doxignoreallA
├── atom.lua
├── base64.lua
├── css.lua
├── dox.lua
├── doxnew.lua
├── html.lua
├── parse.lua
├── pulsar.lua
├── settings.lua
├── theme.lua
└── util.lua
├── favicon_io
├── android-chrome-192x192.png
├── android-chrome-512x512.png
├── apple-touch-icon.png
├── favicon-16x16.png
├── favicon-32x32.png
├── favicon.ico
└── site.webmanifest
└── help
├── dox
└── welcome.html
├── index.html
├── modules
├── dox.base64.html
├── dox.css.html
├── dox.html
├── dox.html.html
├── dox.parse.html
├── dox.theme.html
└── dox.util.html
└── style.css
/README.md:
--------------------------------------------------------------------------------
1 | # DOX HAS BEEN REWRITTEN AND MOVED
2 | ---
3 | ### LuaEx's new class system has allowed me to rewrite Dox from scratch making it more versatile, powerful and, modular.
4 | ### Dox has been rewritten and integrated into LuaEx.
5 | ---
6 | ### You can now find Dox at the [LuaEx repository](https://github.com/CentauriSoldier/LuaEx).
7 | ### This page will remain here as a guidepost to the new Dox.
8 | #### Note: this version is hereby archived.
9 |
10 | ---
11 | 
12 |
13 | ## 🆆🅷🅰🆃 🅸🆂 🅳🅾🆇❓ 🔬
14 | Dox is a lua documentation generator script.
15 |
16 | ## 🆁🅴🆂🅾🆄🆁🅲🅴🆂
17 | - Logo: https://cooltext.com/
18 | - Special ASCII Fonts: https://fsymbols.com/generators/carty/
19 |
20 | ## 🆅🅴🆁🆂🅸🅾🅽 ⚗
21 |
22 | #### Alpha v0.6
23 | See Changes
25 |
26 | ### 🇨🇭🇦🇳🇬🇪🇱🇴🇬
27 |
28 | **v0.6**
29 | - Feature: TODO update this changelog
30 |
Dox is a light-weight script designed to parse crafted lua comments regarding modules and functions and output them to readable, sorted and linked HTML. Dox enables you to quickly and simply create documentation for your lua code without the need to install programs or to run anything other than the Dox script. In fact, it's so simple, you can have documentation in as few as 2 lines of code.
182 | @licenseThe MIT License (MIT)
183 |
184 | Copyright (c) 2016 Centauri Soldier
185 |
186 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
187 |
188 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
189 |
190 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
191 |
Created Dox in all its wonder...and despair.
200 |Dox is a light-weight script designed to parse crafted lua comments regarding modules and functions and output them to readable, sorted and linked HTML. Dox enables you to quickly and simply create documentation for your lua code without the need to install programs or to run anything other than the Dox script. In fact, it's so simple, you can have documentation in as few as 2 lines of code.
65 | 66 |Dox works with all major versions of Windows and Linux.
77 |Dox can be used on unix based systems or Windows without having to convert directory or file paths. Dox will auto-detect and convert paths as needed.
78 |Dox needs nothing but itself and your lua files in order to run correctly. No installing, no configuring, no mess.
80 |Dox is fine with you mixing up your code. Functions from different modules may be in one single file or you may even have a single module spread around different files. Dox is very forgiving in how you organize your modules. You could even have all your dox comments for multiple modules in a single file (although such a practice is not likely to be desired or cenvenient, just meant as demonstration). Simply put, Dox loves your code no matter where it's at and how it's organized (or unorganized, for that matter). Dox will sort it all out for you when it's processed. There's no need for you go out of your way to organize functions or modules a certain way. Organize them how you please and Dox will do the rest.
82 | 83 |The MIT License (MIT)
93 |
94 | Copyright (c) 2016 Centauri Soldier
95 |
96 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
97 |
98 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
99 |
100 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
101 |
177 | This is primary element of Dox that makes it work. In fact, without at least one function info block, Dox will not process the target module since there would be no information to process.
178 |
179 | The function info block is wrapped in a multi-line lua comment whose start tag is --[[! and end tag is !]].
180 |
183 | Elements inside the function info block are designated by an "@" symbol directly followed by the desired tag and tag information.
184 |
185 | Below is a list of currently usable tags for this block as well as their formatting and usage details.
186 |
199 | The module information is wrapped in a multiline lua comment whose start tag is --[[* and end tag is *]]. The content of this block is displayed at the top of the module page within and accordion menu (the one you're using right now).
200 |
201 | Note: Unlike (at least one) function info block, the module info block is not required. Dox will function just fine with or without the module info block; you may omit the entire thing if you wish. Additionaly, if you do choose to use the module info block, only one of the tags (listed below) are required: the 'module' tag is required if using the module info block although you may use one, all or none of the remaining tags (or anything in between).
202 |
203 | Unlike the function info block, the module info block has no tags that are sensitive to spaces and new lines. This feature makes it very easy to use html with your module info block. As you can see, you're reading text right now that has been formatted within the comment block of the dox.lua file.
204 |
205 | Within the block are tags. These tags start and end just like html tags do, with <tagname> as the start tag and </tagname> as the end tag where tagname is the name of the tag. Below is a complete list of supported tags.
206 |
You may enter one to many items for the 'moduleid' tag. For example, if your module name is myClass then you'd enter it exactly as the class name since the 'moduleid' tag is case sensitive.; however, you can control how it's displayed at the top of the page. To include a display name, simply use a pipe (|) and type the display next like this myClass|MyClass
.
225 |
226 | If you have sub modules such as myClass.otherStuff and you'd like the module block for myClass to display on the myClass.otherStuff page, use a comma to indicate another module and simlpy add it the 'moduleid' tag like so: myClass|MyClass,myClass.otherStuff
and if you'd like a differnt display name for that module too, just add it in: myClass|MyClass,myClass.otherStuff|MyClass.otherStuff
. It's that easy.
227 |
The '@' symbol cannot be used in your text without escaping it since it is a special character that tells Dox where to start a line; however, you can escape it in your text using a backslash (\) and the '@' will be put there by Dox when processing is complete: E.g., @. Additionaly, any text inside free-format items (like authors, website, description, etc. as opposed to items like param, function, etc. that are more restricted) is treated like html including any html tags you may want to use. Of course, this means that you'll need to escape the '<' and '>' symbols in your text if you want them to be presented as-is.
230 |
231 | Below is a complete list of special characters that need escaped to be displayed as themselves.
232 |
Added support for linux.
254 |Fixed a bug in the local 'import()' function.
259 |Added the ability to allow a module block to be displayed for multiple modules as desired
264 |Module names can now be displayed differently as desired.
265 |Fixed a bug that was omitting the last entry of blocks.
270 |Added the ability for dox to normally and recursively scan directories and process all files at once.
271 |Fixed a bug that allowed empty modules and empty blocks.
276 |Reconfigured Start and End tags to be easier to use.
277 |Reconfigured function blocks tags to be easier to use.
278 |Added the binary module and included embeded images for the output.
283 |Added the Welcome.html page.
284 |Moved from a single-page output to a multi-page one.
289 |Added the Module Info panel for each module.
290 |Output CSS to and external file (style.css).
291 |Refactored the code and ported all logical functions to modules.
296 |Created Dox in all its wonder...and despair.
301 |[sDataIndex | string | The name of the table index that contains the base64 data string.]
315 |Returns the base64 data string for encoded files.
317 | 318 |Dox is a light-weight script designed to parse crafted lua comments regarding modules and functions and output them to readable, sorted and linked HTML. Dox enables you to quickly and simply create documentation for your lua code without the need to install programs or to run anything other than the Dox script. In fact, it's so simple, you can have documentation in as few as 2 lines of code.
65 | 66 |Dox works with all major versions of Windows and Linux.
77 |Dox can be used on unix based systems or Windows without having to convert directory or file paths. Dox will auto-detect and convert paths as needed.
78 |Dox needs nothing but itself and your lua files in order to run correctly. No installing, no configuring, no mess.
80 |Dox is fine with you mixing up your code. Functions from different modules may be in one single file or you may even have a single module spread around different files. Dox is very forgiving in how you organize your modules. You could even have all your dox comments for multiple modules in a single file (although such a practice is not likely to be desired or cenvenient, just meant as demonstration). Simply put, Dox loves your code no matter where it's at and how it's organized (or unorganized, for that matter). Dox will sort it all out for you when it's processed. There's no need for you go out of your way to organize functions or modules a certain way. Organize them how you please and Dox will do the rest.
82 | 83 |The MIT License (MIT)
93 |
94 | Copyright (c) 2016 Centauri Soldier
95 |
96 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
97 |
98 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
99 |
100 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
101 |
177 | This is primary element of Dox that makes it work. In fact, without at least one function info block, Dox will not process the target module since there would be no information to process.
178 |
179 | The function info block is wrapped in a multi-line lua comment whose start tag is --[[! and end tag is !]].
180 |
183 | Elements inside the function info block are designated by an "@" symbol directly followed by the desired tag and tag information.
184 |
185 | Below is a list of currently usable tags for this block as well as their formatting and usage details.
186 |
199 | The module information is wrapped in a multiline lua comment whose start tag is --[[* and end tag is *]]. The content of this block is displayed at the top of the module page within and accordion menu (the one you're using right now).
200 |
201 | Note: Unlike (at least one) function info block, the module info block is not required. Dox will function just fine with or without the module info block; you may omit the entire thing if you wish. Additionaly, if you do choose to use the module info block, only one of the tags (listed below) are required: the 'module' tag is required if using the module info block although you may use one, all or none of the remaining tags (or anything in between).
202 |
203 | Unlike the function info block, the module info block has no tags that are sensitive to spaces and new lines. This feature makes it very easy to use html with your module info block. As you can see, you're reading text right now that has been formatted within the comment block of the dox.lua file.
204 |
205 | Within the block are tags. These tags start and end just like html tags do, with <tagname> as the start tag and </tagname> as the end tag where tagname is the name of the tag. Below is a complete list of supported tags.
206 |
You may enter one to many items for the 'moduleid' tag. For example, if your module name is myClass then you'd enter it exactly as the class name since the 'moduleid' tag is case sensitive.; however, you can control how it's displayed at the top of the page. To include a display name, simply use a pipe (|) and type the display next like this myClass|MyClass
.
225 |
226 | If you have sub modules such as myClass.otherStuff and you'd like the module block for myClass to display on the myClass.otherStuff page, use a comma to indicate another module and simlpy add it the 'moduleid' tag like so: myClass|MyClass,myClass.otherStuff
and if you'd like a differnt display name for that module too, just add it in: myClass|MyClass,myClass.otherStuff|MyClass.otherStuff
. It's that easy.
227 |
The '@' symbol cannot be used in your text without escaping it since it is a special character that tells Dox where to start a line; however, you can escape it in your text using a backslash (\) and the '@' will be put there by Dox when processing is complete: E.g., @. Additionaly, any text inside free-format items (like authors, website, description, etc. as opposed to items like param, function, etc. that are more restricted) is treated like html including any html tags you may want to use. Of course, this means that you'll need to escape the '<' and '>' symbols in your text if you want them to be presented as-is.
230 |
231 | Below is a complete list of special characters that need escaped to be displayed as themselves.
232 |
Added support for linux.
254 |Fixed a bug in the local 'import()' function.
259 |Added the ability to allow a module block to be displayed for multiple modules as desired
264 |Module names can now be displayed differently as desired.
265 |Fixed a bug that was omitting the last entry of blocks.
270 |Added the ability for dox to normally and recursively scan directories and process all files at once.
271 |Fixed a bug that allowed empty modules and empty blocks.
276 |Reconfigured Start and End tags to be easier to use.
277 |Reconfigured function blocks tags to be easier to use.
278 |Added the binary module and included embeded images for the output.
283 |Added the Welcome.html page.
284 |Moved from a single-page output to a multi-page one.
289 |Added the Module Info panel for each module.
290 |Output CSS to and external file (style.css).
291 |Refactored the code and ported all logical functions to modules.
296 |Created Dox in all its wonder...and despair.
301 |Concatenates the Parser strings from the 'dox.Types' table. This is used in 'dox.css.update()'.
315 | 316 |Dox is a light-weight script designed to parse crafted lua comments regarding modules and functions and output them to readable, sorted and linked HTML. Dox enables you to quickly and simply create documentation for your lua code without the need to install programs or to run anything other than the Dox script. In fact, it's so simple, you can have documentation in as few as 2 lines of code.
65 | 66 |Dox works with all major versions of Windows and Linux.
77 |Dox can be used on unix based systems or Windows without having to convert directory or file paths. Dox will auto-detect and convert paths as needed.
78 |Dox needs nothing but itself and your lua files in order to run correctly. No installing, no configuring, no mess.
80 |Dox is fine with you mixing up your code. Functions from different modules may be in one single file or you may even have a single module spread around different files. Dox is very forgiving in how you organize your modules. You could even have all your dox comments for multiple modules in a single file (although such a practice is not likely to be desired or cenvenient, just meant as demonstration). Simply put, Dox loves your code no matter where it's at and how it's organized (or unorganized, for that matter). Dox will sort it all out for you when it's processed. There's no need for you go out of your way to organize functions or modules a certain way. Organize them how you please and Dox will do the rest.
82 | 83 |The MIT License (MIT)
93 |
94 | Copyright (c) 2016 Centauri Soldier
95 |
96 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
97 |
98 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
99 |
100 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
101 |
177 | This is primary element of Dox that makes it work. In fact, without at least one function info block, Dox will not process the target module since there would be no information to process.
178 |
179 | The function info block is wrapped in a multi-line lua comment whose start tag is --[[! and end tag is !]].
180 |
183 | Elements inside the function info block are designated by an "@" symbol directly followed by the desired tag and tag information.
184 |
185 | Below is a list of currently usable tags for this block as well as their formatting and usage details.
186 |
199 | The module information is wrapped in a multiline lua comment whose start tag is --[[* and end tag is *]]. The content of this block is displayed at the top of the module page within and accordion menu (the one you're using right now).
200 |
201 | Note: Unlike (at least one) function info block, the module info block is not required. Dox will function just fine with or without the module info block; you may omit the entire thing if you wish. Additionaly, if you do choose to use the module info block, only one of the tags (listed below) are required: the 'module' tag is required if using the module info block although you may use one, all or none of the remaining tags (or anything in between).
202 |
203 | Unlike the function info block, the module info block has no tags that are sensitive to spaces and new lines. This feature makes it very easy to use html with your module info block. As you can see, you're reading text right now that has been formatted within the comment block of the dox.lua file.
204 |
205 | Within the block are tags. These tags start and end just like html tags do, with <tagname> as the start tag and </tagname> as the end tag where tagname is the name of the tag. Below is a complete list of supported tags.
206 |
You may enter one to many items for the 'moduleid' tag. For example, if your module name is myClass then you'd enter it exactly as the class name since the 'moduleid' tag is case sensitive.; however, you can control how it's displayed at the top of the page. To include a display name, simply use a pipe (|) and type the display next like this myClass|MyClass
.
225 |
226 | If you have sub modules such as myClass.otherStuff and you'd like the module block for myClass to display on the myClass.otherStuff page, use a comma to indicate another module and simlpy add it the 'moduleid' tag like so: myClass|MyClass,myClass.otherStuff
and if you'd like a differnt display name for that module too, just add it in: myClass|MyClass,myClass.otherStuff|MyClass.otherStuff
. It's that easy.
227 |
The '@' symbol cannot be used in your text without escaping it since it is a special character that tells Dox where to start a line; however, you can escape it in your text using a backslash (\) and the '@' will be put there by Dox when processing is complete: E.g., @. Additionaly, any text inside free-format items (like authors, website, description, etc. as opposed to items like param, function, etc. that are more restricted) is treated like html including any html tags you may want to use. Of course, this means that you'll need to escape the '<' and '>' symbols in your text if you want them to be presented as-is.
230 |
231 | Below is a complete list of special characters that need escaped to be displayed as themselves.
232 |
Added support for linux.
254 |Fixed a bug in the local 'import()' function.
259 |Added the ability to allow a module block to be displayed for multiple modules as desired
264 |Module names can now be displayed differently as desired.
265 |Fixed a bug that was omitting the last entry of blocks.
270 |Added the ability for dox to normally and recursively scan directories and process all files at once.
271 |Fixed a bug that allowed empty modules and empty blocks.
276 |Reconfigured Start and End tags to be easier to use.
277 |Reconfigured function blocks tags to be easier to use.
278 |Added the binary module and included embeded images for the output.
283 |Added the Welcome.html page.
284 |Moved from a single-page output to a multi-page one.
289 |Added the Module Info panel for each module.
290 |Output CSS to and external file (style.css).
291 |Refactored the code and ported all logical functions to modules.
296 |Created Dox in all its wonder...and despair.
301 |This informs the css of theme changes that may have occurred.
315 | 316 |Pushes a block into the 'dox.Modules' table to await processing. Used in 'dox.processFile()'.
322 | 323 |[sDir | string | The full path to the directory.]
329 |[pOutDir | string | The full path to the directory that will store the output.]
330 |[sTheme | string,nil | The name of the color scheme to use in the out HTML. If nil, Dox will use the default theme.]
331 |[bRecursive | bool,nil | If true, Dox will search all subdirectories of the given path as well in search of lua files.]
332 |Does the same as dox.processFile() but for an entire directory.
334 | 335 |[pInputFile | string | The path to the file dox reads.]
341 |[pOutputFile | string | The path to the directory in which Dox writes the output file.]
342 |[sTheme | string,nil | The name of the color scheme to use in the out HTML. If nil, Dox will use the default theme.]
343 |Processes a Lua file for use with Dox and readies it for output. This is one of two functions, including 'dox.processDir' that are used by the end-user. Use either of these two functions to create HTML output. While 'dox.processDir' is used for an entire directory, this funcitons will process only one file.
345 |Determines the relative path from which the script is called.
354 | 355 |[sPath | string | The local path from which dox is run.]
357 |A version of the 'require()' function that uses the local path. Used to require the other local modules the 'dox.lua' file needs.
363 | 364 |[sDirectory | string | The desired output directory.]
370 |Write the index file, welcome files, modules files and CSS as well as any other files required for a complete output. Used in 'dox.processFile()' and 'dox.processDir'
372 | 373 |Dox is a light-weight script designed to parse crafted lua comments regarding modules and functions and output them to readable, sorted and linked HTML. Dox enables you to quickly and simply create documentation for your lua code without the need to install programs or to run anything other than the Dox script. In fact, it's so simple, you can have documentation in as few as 2 lines of code.
65 | 66 |Dox works with all major versions of Windows and Linux.
77 |Dox can be used on unix based systems or Windows without having to convert directory or file paths. Dox will auto-detect and convert paths as needed.
78 |Dox needs nothing but itself and your lua files in order to run correctly. No installing, no configuring, no mess.
80 |Dox is fine with you mixing up your code. Functions from different modules may be in one single file or you may even have a single module spread around different files. Dox is very forgiving in how you organize your modules. You could even have all your dox comments for multiple modules in a single file (although such a practice is not likely to be desired or cenvenient, just meant as demonstration). Simply put, Dox loves your code no matter where it's at and how it's organized (or unorganized, for that matter). Dox will sort it all out for you when it's processed. There's no need for you go out of your way to organize functions or modules a certain way. Organize them how you please and Dox will do the rest.
82 | 83 |The MIT License (MIT)
93 |
94 | Copyright (c) 2016 Centauri Soldier
95 |
96 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
97 |
98 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
99 |
100 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
101 |
177 | This is primary element of Dox that makes it work. In fact, without at least one function info block, Dox will not process the target module since there would be no information to process.
178 |
179 | The function info block is wrapped in a multi-line lua comment whose start tag is --[[! and end tag is !]].
180 |
183 | Elements inside the function info block are designated by an "@" symbol directly followed by the desired tag and tag information.
184 |
185 | Below is a list of currently usable tags for this block as well as their formatting and usage details.
186 |
199 | The module information is wrapped in a multiline lua comment whose start tag is --[[* and end tag is *]]. The content of this block is displayed at the top of the module page within and accordion menu (the one you're using right now).
200 |
201 | Note: Unlike (at least one) function info block, the module info block is not required. Dox will function just fine with or without the module info block; you may omit the entire thing if you wish. Additionaly, if you do choose to use the module info block, only one of the tags (listed below) are required: the 'module' tag is required if using the module info block although you may use one, all or none of the remaining tags (or anything in between).
202 |
203 | Unlike the function info block, the module info block has no tags that are sensitive to spaces and new lines. This feature makes it very easy to use html with your module info block. As you can see, you're reading text right now that has been formatted within the comment block of the dox.lua file.
204 |
205 | Within the block are tags. These tags start and end just like html tags do, with <tagname> as the start tag and </tagname> as the end tag where tagname is the name of the tag. Below is a complete list of supported tags.
206 |
You may enter one to many items for the 'moduleid' tag. For example, if your module name is myClass then you'd enter it exactly as the class name since the 'moduleid' tag is case sensitive.; however, you can control how it's displayed at the top of the page. To include a display name, simply use a pipe (|) and type the display next like this myClass|MyClass
.
225 |
226 | If you have sub modules such as myClass.otherStuff and you'd like the module block for myClass to display on the myClass.otherStuff page, use a comma to indicate another module and simlpy add it the 'moduleid' tag like so: myClass|MyClass,myClass.otherStuff
and if you'd like a differnt display name for that module too, just add it in: myClass|MyClass,myClass.otherStuff|MyClass.otherStuff
. It's that easy.
227 |
The '@' symbol cannot be used in your text without escaping it since it is a special character that tells Dox where to start a line; however, you can escape it in your text using a backslash (\) and the '@' will be put there by Dox when processing is complete: E.g., @. Additionaly, any text inside free-format items (like authors, website, description, etc. as opposed to items like param, function, etc. that are more restricted) is treated like html including any html tags you may want to use. Of course, this means that you'll need to escape the '<' and '>' symbols in your text if you want them to be presented as-is.
230 |
231 | Below is a complete list of special characters that need escaped to be displayed as themselves.
232 |
Added support for linux.
254 |Fixed a bug in the local 'import()' function.
259 |Added the ability to allow a module block to be displayed for multiple modules as desired
264 |Module names can now be displayed differently as desired.
265 |Fixed a bug that was omitting the last entry of blocks.
270 |Added the ability for dox to normally and recursively scan directories and process all files at once.
271 |Fixed a bug that allowed empty modules and empty blocks.
276 |Reconfigured Start and End tags to be easier to use.
277 |Reconfigured function blocks tags to be easier to use.
278 |Added the binary module and included embeded images for the output.
283 |Added the Welcome.html page.
284 |Moved from a single-page output to a multi-page one.
289 |Added the Module Info panel for each module.
290 |Output CSS to and external file (style.css).
291 |Refactored the code and ported all logical functions to modules.
296 |Created Dox in all its wonder...and despair.
301 |[sInput | string | The string to append to the body of the HTML.]
315 |Adds the input string to the dox.PageVars.Body variable.
317 | 318 |Called from the Dox file contructor functions for each module in the 'dox.Modules' table. It is responsible for building and returning the html used in the 'index.html' page.
324 | 325 |[sHTML | string | The complete html string saved in the 'index.html' file.]
327 |[sModule | string | The name of the module that is to be processed.]
333 |Called from the Dox file contructor functions for each module in the 'dox.Modules' table. It is responsible for building and returning the html used in each module file.
335 | 336 |[sHTML | string | The complete html string saved in the module's html file.]
338 |Called from the Dox file constructor functions. Builds and returns the HTML used to build the 'welcome.html' page shown in the main frame when the 'index.html' page first loads.
344 | 345 |[sHTML | string | The complete html string saved in the 'welcome.html' file.]
347 |[tModule | table | The module table to be processed.]
353 |[nTabStart | number | A number that represents how many tabs to indent the returned menu.]
354 |Used by 'dox.html.buildModule()' to insert mod info detail list items.
356 | 357 |[string | The | HTML of the accordion menu for the module]
359 |[sLine | string | The line to be processed.]
365 |[sType | The | tyoe if line it is (Function, Description. etc.)]
366 |Used for processing values that are stored in tables such as Return or Parameter line types. Used in 'buildHTML()'.
368 | 369 |[sLine | string | A string that contains the concatenated line.]
371 |[sInput | string | The string to test.]
377 |[sAlt | string | The string to return is the sInput string is blank or nil.]
378 |Tests to see if a string is blank or nil and if so, returns the second argument. If it is not blank or nil, it returns the original string.
380 | 381 |[sRet | string | Either the original string (sInput) or the Alternate string (sAlt) if the sInput is blank or nil.]
383 |Dox is a light-weight script designed to parse crafted lua comments regarding modules and functions and output them to readable, sorted and linked HTML. Dox enables you to quickly and simply create documentation for your lua code without the need to install programs or to run anything other than the Dox script. In fact, it's so simple, you can have documentation in as few as 2 lines of code.
65 | 66 |Dox works with all major versions of Windows and Linux.
77 |Dox can be used on unix based systems or Windows without having to convert directory or file paths. Dox will auto-detect and convert paths as needed.
78 |Dox needs nothing but itself and your lua files in order to run correctly. No installing, no configuring, no mess.
80 |Dox is fine with you mixing up your code. Functions from different modules may be in one single file or you may even have a single module spread around different files. Dox is very forgiving in how you organize your modules. You could even have all your dox comments for multiple modules in a single file (although such a practice is not likely to be desired or cenvenient, just meant as demonstration). Simply put, Dox loves your code no matter where it's at and how it's organized (or unorganized, for that matter). Dox will sort it all out for you when it's processed. There's no need for you go out of your way to organize functions or modules a certain way. Organize them how you please and Dox will do the rest.
82 | 83 |The MIT License (MIT)
93 |
94 | Copyright (c) 2016 Centauri Soldier
95 |
96 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
97 |
98 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
99 |
100 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
101 |
177 | This is primary element of Dox that makes it work. In fact, without at least one function info block, Dox will not process the target module since there would be no information to process.
178 |
179 | The function info block is wrapped in a multi-line lua comment whose start tag is --[[! and end tag is !]].
180 |
183 | Elements inside the function info block are designated by an "@" symbol directly followed by the desired tag and tag information.
184 |
185 | Below is a list of currently usable tags for this block as well as their formatting and usage details.
186 |
199 | The module information is wrapped in a multiline lua comment whose start tag is --[[* and end tag is *]]. The content of this block is displayed at the top of the module page within and accordion menu (the one you're using right now).
200 |
201 | Note: Unlike (at least one) function info block, the module info block is not required. Dox will function just fine with or without the module info block; you may omit the entire thing if you wish. Additionaly, if you do choose to use the module info block, only one of the tags (listed below) are required: the 'module' tag is required if using the module info block although you may use one, all or none of the remaining tags (or anything in between).
202 |
203 | Unlike the function info block, the module info block has no tags that are sensitive to spaces and new lines. This feature makes it very easy to use html with your module info block. As you can see, you're reading text right now that has been formatted within the comment block of the dox.lua file.
204 |
205 | Within the block are tags. These tags start and end just like html tags do, with <tagname> as the start tag and </tagname> as the end tag where tagname is the name of the tag. Below is a complete list of supported tags.
206 |
You may enter one to many items for the 'moduleid' tag. For example, if your module name is myClass then you'd enter it exactly as the class name since the 'moduleid' tag is case sensitive.; however, you can control how it's displayed at the top of the page. To include a display name, simply use a pipe (|) and type the display next like this myClass|MyClass
.
225 |
226 | If you have sub modules such as myClass.otherStuff and you'd like the module block for myClass to display on the myClass.otherStuff page, use a comma to indicate another module and simlpy add it the 'moduleid' tag like so: myClass|MyClass,myClass.otherStuff
and if you'd like a differnt display name for that module too, just add it in: myClass|MyClass,myClass.otherStuff|MyClass.otherStuff
. It's that easy.
227 |
The '@' symbol cannot be used in your text without escaping it since it is a special character that tells Dox where to start a line; however, you can escape it in your text using a backslash (\) and the '@' will be put there by Dox when processing is complete: E.g., @. Additionaly, any text inside free-format items (like authors, website, description, etc. as opposed to items like param, function, etc. that are more restricted) is treated like html including any html tags you may want to use. Of course, this means that you'll need to escape the '<' and '>' symbols in your text if you want them to be presented as-is.
230 |
231 | Below is a complete list of special characters that need escaped to be displayed as themselves.
232 |
Added support for linux.
254 |Fixed a bug in the local 'import()' function.
259 |Added the ability to allow a module block to be displayed for multiple modules as desired
264 |Module names can now be displayed differently as desired.
265 |Fixed a bug that was omitting the last entry of blocks.
270 |Added the ability for dox to normally and recursively scan directories and process all files at once.
271 |Fixed a bug that allowed empty modules and empty blocks.
276 |Reconfigured Start and End tags to be easier to use.
277 |Reconfigured function blocks tags to be easier to use.
278 |Added the binary module and included embeded images for the output.
283 |Added the Welcome.html page.
284 |Moved from a single-page output to a multi-page one.
289 |Added the Module Info panel for each module.
290 |Output CSS to and external file (style.css).
291 |Refactored the code and ported all logical functions to modules.
296 |Created Dox in all its wonder...and despair.
301 |[sType | string | The index of the color item to get.]
315 |Gets a color of the selected type from the currently-active theme.
317 | 318 |[sColor | returns | the hex color or an error color is the index input does not exist in the theme.]
320 |Dox is a light-weight script designed to parse crafted lua comments regarding modules and functions and output them to readable, sorted and linked HTML. Dox enables you to quickly and simply create documentation for your lua code without the need to install programs or to run anything other than the Dox script. In fact, it's so simple, you can have documentation in as few as 2 lines of code.
65 | 66 |Dox works with all major versions of Windows and Linux.
77 |Dox can be used on unix based systems or Windows without having to convert directory or file paths. Dox will auto-detect and convert paths as needed.
78 |Dox needs nothing but itself and your lua files in order to run correctly. No installing, no configuring, no mess.
80 |Dox is fine with you mixing up your code. Functions from different modules may be in one single file or you may even have a single module spread around different files. Dox is very forgiving in how you organize your modules. You could even have all your dox comments for multiple modules in a single file (although such a practice is not likely to be desired or cenvenient, just meant as demonstration). Simply put, Dox loves your code no matter where it's at and how it's organized (or unorganized, for that matter). Dox will sort it all out for you when it's processed. There's no need for you go out of your way to organize functions or modules a certain way. Organize them how you please and Dox will do the rest.
82 | 83 |The MIT License (MIT)
93 |
94 | Copyright (c) 2016 Centauri Soldier
95 |
96 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
97 |
98 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
99 |
100 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
101 |
177 | This is primary element of Dox that makes it work. In fact, without at least one function info block, Dox will not process the target module since there would be no information to process.
178 |
179 | The function info block is wrapped in a multi-line lua comment whose start tag is --[[! and end tag is !]].
180 |
183 | Elements inside the function info block are designated by an "@" symbol directly followed by the desired tag and tag information.
184 |
185 | Below is a list of currently usable tags for this block as well as their formatting and usage details.
186 |
199 | The module information is wrapped in a multiline lua comment whose start tag is --[[* and end tag is *]]. The content of this block is displayed at the top of the module page within and accordion menu (the one you're using right now).
200 |
201 | Note: Unlike (at least one) function info block, the module info block is not required. Dox will function just fine with or without the module info block; you may omit the entire thing if you wish. Additionaly, if you do choose to use the module info block, only one of the tags (listed below) are required: the 'module' tag is required if using the module info block although you may use one, all or none of the remaining tags (or anything in between).
202 |
203 | Unlike the function info block, the module info block has no tags that are sensitive to spaces and new lines. This feature makes it very easy to use html with your module info block. As you can see, you're reading text right now that has been formatted within the comment block of the dox.lua file.
204 |
205 | Within the block are tags. These tags start and end just like html tags do, with <tagname> as the start tag and </tagname> as the end tag where tagname is the name of the tag. Below is a complete list of supported tags.
206 |
You may enter one to many items for the 'moduleid' tag. For example, if your module name is myClass then you'd enter it exactly as the class name since the 'moduleid' tag is case sensitive.; however, you can control how it's displayed at the top of the page. To include a display name, simply use a pipe (|) and type the display next like this myClass|MyClass
.
225 |
226 | If you have sub modules such as myClass.otherStuff and you'd like the module block for myClass to display on the myClass.otherStuff page, use a comma to indicate another module and simlpy add it the 'moduleid' tag like so: myClass|MyClass,myClass.otherStuff
and if you'd like a differnt display name for that module too, just add it in: myClass|MyClass,myClass.otherStuff|MyClass.otherStuff
. It's that easy.
227 |
The '@' symbol cannot be used in your text without escaping it since it is a special character that tells Dox where to start a line; however, you can escape it in your text using a backslash (\) and the '@' will be put there by Dox when processing is complete: E.g., @. Additionaly, any text inside free-format items (like authors, website, description, etc. as opposed to items like param, function, etc. that are more restricted) is treated like html including any html tags you may want to use. Of course, this means that you'll need to escape the '<' and '>' symbols in your text if you want them to be presented as-is.
230 |
231 | Below is a complete list of special characters that need escaped to be displayed as themselves.
232 |
Added support for linux.
254 |Fixed a bug in the local 'import()' function.
259 |Added the ability to allow a module block to be displayed for multiple modules as desired
264 |Module names can now be displayed differently as desired.
265 |Fixed a bug that was omitting the last entry of blocks.
270 |Added the ability for dox to normally and recursively scan directories and process all files at once.
271 |Fixed a bug that allowed empty modules and empty blocks.
276 |Reconfigured Start and End tags to be easier to use.
277 |Reconfigured function blocks tags to be easier to use.
278 |Added the binary module and included embeded images for the output.
283 |Added the Welcome.html page.
284 |Moved from a single-page output to a multi-page one.
289 |Added the Module Info panel for each module.
290 |Output CSS to and external file (style.css).
291 |Refactored the code and ported all logical functions to modules.
296 |Created Dox in all its wonder...and despair.
301 |[sDir | string | The directory in which to search. The type of path formatting is irrelevant. I.e., Both "C:\\MyDirectory" and "/MyDirectory" are valid formatting methods for this input.]
315 |[sFile | string | The file or file pattern to find.]
316 |[bRecursive | boolean,nil | If true, the function will search for the file/pattern recursively.]
317 |Searches for file(s) based on the input.
319 | 320 |[tFiles | table | A numerically-indexed table whose values are the paths of the found item(s). If no items are found, an empty table is returned.]
322 |Determines the operating system type the end-user if running.
328 | 329 |[sOSType | string | returns 'windows' if it is a Windows systems and 'linux' if it a unix-based system.]
331 |[sString | string | The string to be concatenated.]
337 |[nCount | number | The number of times to concatenate the string.]
338 |Creates a string where the 'sString' input is concatenated n times where n = 'nCount' input.
340 | 341 |[sString | string | Returns the concatenated string. If 'nCount' is nil or not a valid number then a blank string is returned.]
343 |[nNumber | number | The number to evaluate.]
349 |Determines whether or not a number is even (or odd, implicitly).
351 | 352 |[bEven | boolean | Returns true if the number is even and false if it is not.]
354 |[nTabs | number | The number of tabs to stack together.]
360 |[bNewLineFirst | boolean,nil | If true, this creates a new line before concatenating the tabs.]
361 |Creates x number of tab strings.
363 | 364 |[sTabs | string | The concatenated string or a blank string is 'nTabs' is not a valid number.]
366 |[sString | string | The string to be trimmed.]
372 |Trims the trailing and leading whitespace from a string. This function not by Centauri Soldier (http://en.wikipedia.org/wiki/Trim_(8programming))
374 | 375 |[sTrimmedString | string | The trimmed string.]
377 |