mkdoc(n)
π NAME π
mkdoc β the source code documentation extractor/converter application. Also answering to mkdoc(n) when it's being fancy at a party. π
β¨ SYNOPSIS β¨
mkdoc --help
mkdoc --version
mkdoc --license
mkdoc input output ?--css cssfile?
π¦ DESCRIPTION π¦
Okay so bestie, this whole page is about mkdoc, an application that extracts documentation embedded inside source code files and turns it into something you can actually read. It doesn't care if your file is a .tcl or literally anything else β it's not picky, it's versatile. π
π COMMAND LINE π
π«Ά mkdoc --help
Prints a short help to standard output and then exits. That's it, that's the whole vibe. β¨
π«Ά mkdoc --version
Prints its version number to standard output and exits. Number goes brrr, then it dips. π«
π«Ά mkdoc --license
Prints its license to standard output and exits. Legal girlies, this one's for you. π
π mkdoc input output ?--css cssfile?
The main character command, fr fr. Here's the tea:
- It reads the input file, extracts the embedded documentation, and writes it out to the output file. π
- If the output file is not a
.mdfile, the extracted documentation gets converted to HTML before being written. - When generating and writing HTML, the default CSS stylesheet can be overridden by specifying the path to a custom stylesheet via option
--css. - If the input file is a
.mdfile, it's expected to contain Markdown as-is, instead of Markdown embedded into code. No code-wrapping shenanigans there, just vibes. - 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
#'.- For script languages like Tcl, the
#character of this marker means 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.
- For script languages like Tcl, the
Quick vibe check: --css only matters when you're making HTML. Markdown girlies, you don't need it.
πΈ EXAMPLES πΈ
# 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
Iconic behavior honestly. Look at that range. π₯
π BUGS, IDEAS, FEEDBACK π
This document, and the package it describes, will undoubtedly contain bugs and other problems. No cap, it's basically guaranteed. 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. The author genuinely wants to hear from you, bestie. π«Ά
π CODE COPYRIGHT π
BSD License type:
The following terms apply to all files associated with the software unless explicitly disclaimed in individual files.
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.
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. Like, all the damages. Every single flavor of damage. Not on them.
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. As-is means as-is, bestie. No glow-up promised.
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.
π§ CATEGORY π§
Text processing. Text processing. Text processing. (Said three times because it's true and also because it's fun.) π
β COPYRIGHT β
Copyright (c) 2019-2022, Detlef Groth <detlef(at)dgroth(dot)de>
And that's the whole page, bestie!! This lil number ships as part of tcllib, rocking version 0.7.0, and yes, it's the mkdoc(n) manual page you've been reading this entire time. πβ¨ Thanks for scrolling all the way down, you're a real one. Mwah. π
π¦
π¦ where this page comes from
- alpine 3.24: tcl-lib-doc 1.21-r1 Β· BSD-2-Clause
- epel 9: tcllib 1.21-1.el9 Β· BSD
- fedora 43: tcllib 2.0-3.fc43 Β· TCL
- fedora 44: tcllib 2.0-4.fc44 Β· TCL
- nixos 26.05: tcllib 2.0
- nixpkgs unstable: tcllib 2.0
- opensuse-leap 16.0: tcllib 1.21-bp160.1.2 Β· TCL
- Copyright (c) 2019-2022, Detlef Groth <detlef(at)dgroth(dot)de>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms