1mkdoc(n) Source code documentation using Markdown mkdoc(n)
2
3
4
5______________________________________________________________________________
6
8 mkdoc - Source code documentation extractor/converter application
9
11 mkdoc --help
12
13 mkdoc --version
14
15 mkdoc --license
16
17 mkdoc input output ?--css cssfile?
18
19______________________________________________________________________________
20
22 This document describes mkdoc, an application to extract documentation
23 embedded in source code files, be they ".tcl", or other.
24
26 mkdoc --help
27 The application prints a short help to standard output and ex‐
28 its.
29
30 mkdoc --version
31 The application prints its version number to standard output and
32 exits.
33
34 mkdoc --license
35 The application prints its license to standard output and exits.
36
37 mkdoc input output ?--css cssfile?
38 The application reads the input file, extracts the embedded doc‐
39 umentation, and writes it to the output file.
40
41 If the output file is not a ".md" file the extracted documenta‐
42 tion is converted to HTML before being written.
43
44 When generating and writing HTML the default CSS stylesheet can
45 be overridden by specifying the path to a custom stylesheet via
46 option --css.
47
48 If the input file is a ".md" file it is expected to contain
49 Markdown as-is, instead of Markdown embedded into code.
50
51 On the other side, when the file is considered code then the
52 documentation is expected to be contained in all lines starting
53 with the marker #'. For script languages like Tcl the # charac‐
54 ter of this marker means that the documentation is contained in
55 the so-flagged comments. For other languages the marker and
56 documentation may have to be embedded into multi-line comments.
57
59 # Create HTML manual for a CPP file using a custom style sheet
60 mkdoc sample.cpp sample.html --css manual.css
61
62 # Extract the documentation from code as simple Markdown, ready to be processed
63 # further, for example with pandoc, or similar
64 mkdoc sample.cpp sample.md
65
66 # Convert a Markdown file to HTML
67 mkdoc sample.md sample.html
68
69
71 This document, and the package it describes, will undoubtedly contain
72 bugs and other problems. Please report such to the author of this pack‐
73 age. Please also report any ideas for enhancements you may have for ei‐
74 ther package and/or documentation.
75
77 BSD License type:
78
79 The following terms apply to all files a ssociated with the software
80 unless explicitly disclaimed in individual files.
81
82 The authors hereby grant permission to use, copy, modify, distribute,
83 and license this software and its documentation for any purpose, pro‐
84 vided that existing copyright notices are retained in all copies and
85 that this notice is included verbatim in any distributions. No written
86 agreement, license, or royalty fee is required for any of the autho‐
87 rized uses. Modifications to this software may be copyrighted by their
88 authors and need not follow the licensing terms described here, pro‐
89 vided that the new terms are clearly indicated on the first page of
90 each file where they apply.
91
92 In no event shall the authors or distributors be liable to any party
93 for direct, indirect, special, incidental, or consequential damages
94 arising out of the use of this software, its documentation, or any de‐
95 rivatives thereof, even if the authors have been advised of the possi‐
96 bility of such damage.
97
98 The authors and distributors specifically disclaim any warranties, in‐
99 cluding, but not limited to, the implied warranties of merchantability,
100 fitness for a particular purpose, and non-infringement. This software
101 is provided on an "as is" basis, and the authors and distributors have
102 no obligation to provide maintenance, support, updates, enhancements,
103 or modifications.
104
105 RESTRICTED RIGHTS: Use, duplication or disclosure by the government is
106 subject to the restrictions as set forth in subparagraph (c) (1) (ii)
107 of the Rights in Technical Data and Computer Software Clause as DFARS
108 252.227-7013 and FAR 52.227-19.
109
111 Text processing
112
114 Copyright (c) 2019-2022, Detlef Groth <detlef(at)dgroth(dot)de>
115
116
117
118
119tcllib 0.7.0 mkdoc(n)