File: mkdoc.man

package info (click to toggle)
tcllib 2.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 83,560 kB
  • sloc: tcl: 306,798; ansic: 14,272; sh: 3,035; xml: 1,766; yacc: 1,157; pascal: 881; makefile: 124; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (107 lines) | stat: -rw-r--r-- 4,321 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
[comment {-*- mode: tcl ; fill-column: 90 -*- doctools manpage}]
[vset VERSION 0.7.0]
[manpage_begin mkdoc n [vset VERSION]]
[copyright {2019-2022, Detlef Groth <detlef(at)dgroth(dot)de>}]
[moddesc   {Source code documentation using Markdown}]
[titledesc {Source code documentation extractor/converter application}]
[category  {Text processing}]
[description]

This document describes [cmd mkdoc], an application to extract documentation embedded in
source code files, be they [file .tcl], or other.


[section {Command Line}]

[list_begin definitions]

[call [cmd mkdoc] [option --help]]

The application prints a short help to standard output and exits.

[call [cmd mkdoc] [option --version]]

The application prints its version number to standard output and exits.

[call [cmd mkdoc] [option --license]]

The application prints its license to standard output and exits.

[call [cmd mkdoc] [arg input] [arg output] [opt "[option --css] [arg cssfile]"]]

The application reads the [arg input] file, extracts the embedded documentation, and
writes it to the [arg output] file.

[para] If the output file is not a [file .md] file the extracted documentation is
converted to HTML before being written.

[para] When generating and writing HTML the default CSS stylesheet can be overridden by
specifying the path to a custom stylesheet via option [option --css].

[para] If the input file is a [file .md] file it is expected to contain Markdown as-is,
instead of Markdown embedded into code.

[para] On the other side, when the file is considered code then the documentation is
expected to be contained in all lines starting with the marker [const "#'"].

For script languages like Tcl the [const #] character of this marker means that the
documentation is contained in the so-flagged comments.

For other languages the marker and documentation may have to be embedded into multi-line
comments.

[list_end]

[section Examples]

[example {
    # Create HTML manual for a CPP file using a custom style sheet
    mkdoc sample.cpp sample.html --css manual.css

    # Extract the documentation from code as simple Markdown, ready to be processed
    # further, for example with pandoc, or similar
    mkdoc sample.cpp sample.md 

    # Convert a Markdown file to HTML
    mkdoc sample.md sample.html
}]

[section "Bugs, Ideas, Feedback"]

This document, and the package it describes, will undoubtedly contain bugs and
other problems. Please report such to the author of this package. Please also report any ideas for enhancements you may have for
either package and/or documentation.

[section "Code Copyright"]

BSD License type:

[para] The following terms apply to all files a ssociated with the software unless
explicitly disclaimed in individual files.

[para] The authors hereby grant permission to use, copy, modify, distribute, and license
this software and its documentation for any purpose, provided that existing copyright
notices are retained in all copies and that this notice is included verbatim in any
distributions. No written agreement, license, or royalty fee is required for any of the
authorized uses.  Modifications to this software may be copyrighted by their authors and
need not follow the licensing terms described here, provided that the new terms are
clearly indicated on the first page of each file where they apply.

[para] In no event shall the authors or distributors be liable to any party for direct,
indirect, special, incidental, or consequential damages arising out of the use of this
software, its documentation, or any derivatives thereof, even if the authors have been
advised of the possibility of such damage.

[para] The authors and distributors specifically disclaim any warranties, including, but
not limited to, the implied warranties of merchantability, fitness for a particular
purpose, and non-infringement.

This software is provided on an "as is" basis, and the authors and distributors have no
obligation to provide maintenance, support, updates, enhancements, or modifications.

[para] [strong {RESTRICTED RIGHTS}]: Use, duplication or disclosure by the government is
subject to the restrictions as set forth in subparagraph (c) (1) (ii) of the Rights in
Technical Data and Computer Software Clause as DFARS 252.227-7013 and FAR 52.227-19.

[vset CATEGORY mkdoc]
[manpage_end]