mkdoc(3tcl)

✨ mkdoc β€” the source-code-docs extractor/converter app ✨

okay bestie, so this is mkdoc(3tcl), like from the tcllib manual pages, and it's literally the little tool that yanks documentation out of your source files and turns it into pretty Markdown or HTML πŸ’– Source code documentation using Markdown, that's the whole vibe. periodt.


🌸 SYNOPSIS 🌸

mkdoc --help

mkdoc --version

mkdoc --license

mkdoc input output ?--css cssfile?

πŸ’… DESCRIPTION πŸ’…

This doc describes mkdoc, which is an application that extracts documentation embedded inside source code files and converts it. And when we say source code files we mean like .tcl files, or honestly any other kind too. she's flexible like that πŸ¦‹


πŸŽ€ COMMAND LINE πŸŽ€

  • mkdoc --help β€” the app prints a short help message to standard output and then exits. that's it, that's the whole thing, she's done βœ…
  • mkdoc --version β€” prints its version number to standard output and exits. short and sweet, main character energy πŸ‘‘
  • mkdoc --license β€” prints its license to standard output and exits. yes you actually have to read it, bestie πŸ“œ
  • mkdoc input output ?--css cssfile? β€” this is the big one. the app reads the input file, extracts the embedded documentation, and writes it all to the output file. okay so here's the tea on how it decides stuff:
    • if the output file is not a .md file, then the extracted documentation gets converted to HTML before it's written out. surprise! you got HTML πŸŽ‰
    • when it's generating and writing HTML, that default CSS stylesheet can be overridden β€” you just give it the path to a custom stylesheet with the --css option. make it cute πŸ’–
    • if the input file is a .md file, then it's expected to contain Markdown as-is, not Markdown embedded into code. no code wrapper, just straight-up Markdown, she's already dressed 🌸
    • but if the file is considered code, then the documentation is expected to live in all the lines starting with the marker #'. for script languages like Tcl, the # character of this marker means the documentation is sitting inside those so-flagged comments. for other languages, the marker and the documentation may have to be embedded into multi-line comments. iykyk πŸ”₯

🌈 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

🫢 BUGS, IDEAS, FEEDBACK 🫢

ngl, this document and the package it describes will undoubtedly contain bugs and other problems. that's just how it is 😭 Please report such to the author of this package. And please also report any ideas for enhancements you may have for either the package and/or the documentation β€” she wants to hear from you, fr fr.


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.

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.

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


Copyright (c) 2019-2022, Detlef Groth <detlef(at)dgroth(dot)de>


and that's the whole page, bestie πŸ’… this came to you from tcllib, version 0.7.0, and the page is mkdoc(3tcl). go extract some docs, you're gonna eat πŸ“βœ¨

πŸ“¦ where this page comes from