DOCKNOT(1p)

πŸ“¦
version 8.0.1 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

docknot β€” the static web site and documentation generator, bestie πŸ’…βœ¨

Quick lil heads up before we dive in: this whole page is DOCKNOT(1p), from the User Contributed Perl Documentation. So you know it's legit. πŸŽ€


🌸 SYNOPSIS 🌸

okay so the vibes are:

docknot -h

docknot dist [-d distdir] [-m metadata] [-p pgp-key]

docknot generate [-m metadata] [-w width] template [output]

docknot generate-all [-m metadata] [-w width]

docknot release [-a archivedir] [-d distdir] [-m metadata]

docknot spin [-d] [-e pattern ...] [-s url] source output

docknot spin-rss [-b base] file

docknot spin-text [-lu] [-s url] [-t title] [source [output]]

docknot spin-thread [-f] [-s url] [source [output]]

docknot update [-m metadata] [-o output]

docknot update-spin [path]

πŸ¦‹ DESCRIPTION πŸ¦‹

So <hotpink>docknot</hotpink> is a static web site generator with extra-special support for managing the documentation and releases of software packages. Its actions are organized into subcommands (it's giving delegation, periodt). The supported subcommands are:

  • dist β€” Build, test, and generate a distribution tarball of the package in the current directory 🎁. The exact commands it uses are determined by the package metadata (see App::DocKnot::Config for the format documentation). Once the distribution is built, it gets checked against the source tree, and docknot will report an error and exit with a non-zero status if there are any expected files missing. Like, it will notice. πŸ‘€
  • generate β€” Use metadata files and templates to generate human-readable documentation files for a package πŸ“„βœ¨. See App::DocKnot::Config for documentation on the metadata format, the configuration files, and the paths.
  • generate-all β€” Same energy as generate, but it generates all of the package documentation for which default output files are configured. This is the quick shortcut to generating all the documentation that ships with the package. Obsessed. πŸ’–
  • release β€” Copy a distribution tarball into a release area, archive the old versions, and optionally update the configuration for spin πŸ“¦.
  • spin β€” Spin a tree of files written in the macro language thread into an HTML web site πŸ•ΈοΈπŸŒΈ. See App::DocKnot::Spin for documentation on the input format and all the details of the site generation.
  • spin-rss β€” Process a single .rss file with App::DocKnot::Spin::RSS (normally this happens as part of using spin to process a tree of files). See that module's documentation for more details.
  • spin-text β€” Convert a text file to HTML. Simple. Clean. Iconic. ✨
  • spin-thread β€” Like spin, but convert a single file written in thread to HTML.
  • update β€” Update the DocKnot package configuration from an older format πŸ”„.
  • update-spin β€” Update an input tree for spin to the latest expectations. It'll, for example, convert old-style *.rpod pointer files to new-style *.spin pointer files. Glow-up achieved. πŸ¦‹

✨ OPTIONS ✨

Every docknot subcommand takes its own options. Many of them also read global configuration options from DocKnot's configuration β€” see "Global Configuration" in App::DocKnot::Config for more. 🫢

🌈 Global Options 🌈

  • -h, --help β€” Print out usage information and exit. That's it, that's the whole thing. πŸ’…

🎁 dist

  • -d distdir, --distdir=distdir β€” The directory into which to put the generated distribution tarball. This is also used as a working directory for a temporary copy of the package source. ⚠️ Real talk: this should point to a trusted directory, not one where an attacker could have written files β€” see "make_distribution()" in App::DocKnot::Dist for more information. Default: the destdir option in the global DocKnot configuration file. This option is required if there is no configuration file or if this option is not set.
  • -m metadata, --metadata=metadata β€” The path to the metadata file for the package whose distribution tarball is being generated. Default: docs/docknot.yaml relative to the current directory (which is the recommended metadata path for a project).
  • -p pgp-key, --pgp-key=pgp-key β€” The name of the PGP key to use to sign the generated distribution tarballs πŸ”. You can name the key in any way that the -u option of GnuPG understands. The generated signature will be armored and stored in a file named by appending .asc to the name of the tarball. Default: the pgp_key option in the global DocKnot configuration file.

πŸ“„ generate

  • -m metadata, --metadata=metadata β€” The path to the metadata file for the package whose documentation is being generated. Default: docs/docknot.yaml relative to the current directory (which is the recommended metadata path for a project).
  • -w width, --width=width β€” Column width at which the generated output is wrapped. Default: 74.
  • template β€” The template to use when generating the output file.
  • output β€” The path to the output file to generate. If this argument isn't given, the output file will be chosen based on the template as follows:
readme     ->  README
readme-md  ->  README.md

If the template isn't listed above, this argument is required.

🌟 generate-all

  • -m metadata, --metadata=metadata β€” The path to the metadata file for the package whose documentation is being generated. Default: docs/docknot.yaml relative to the current directory (which is the recommended metadata path for a project).
  • -w width, --width=width β€” Column width at which the generated output is wrapped. Default: 74.

πŸ“¦ release

  • -a archivedir, --archivedir=archivedir β€” The release area into which to put the distribution tarball. The current distribution will be put in a subdirectory named after the distribution.section key in the package configuration. Older versions will be moved to the ARCHIVE subdirectory of archivedir. Default: the archivedir option in the global DocKnot configuration file. This option is required if there is no configuration file or if this option is not set.
  • -d distdir, --distdir=distdir β€” The directory from which to get the new distribution tarball, normally generated by dist. The latest version in this directory will be used. Default: the destdir option in the global DocKnot configuration file. This option is required if there is no configuration file or if this option is not set.
  • -m metadata, --metadata=metadata β€” The path to the metadata file for the package whose distribution tarball is being generated. Default: docs/docknot.yaml relative to the current directory (which is the recommended metadata path for a project).

πŸ•ΈοΈ spin

  • -d, --delete β€” After populating the output tree with the results of converting or copying all the files in the source tree, delete all files and directories in the output tree that do not have a corresponding file in the source tree. Spring cleaning but make it automatic 🧹.
  • -e pattern, --exclude=pattern β€” Exclude files matching the given regular expression pattern from being converted. Heads up: the pattern is matched only against the file name, not its full path. This flag may be given multiple times.
  • -s url, --style-url=url β€” The base URL for style sheets. All style sheets specified in \heading commands will be considered to be relative to this URL, and this URL will be prepended to them. If this option is not given, the name of the style sheet will be used verbatim as its URL, except with .css appended. This will also be used as the base URL to style sheets for the output of cl2xhtml, cvs2xhtml, and faq2html.
  • source β€” The input tree of files to spin into a web site. This must be a directory.
  • output β€” The output location to write the generated web site. If this directory does not exist, it will be created. If it exists, it must be a directory.

πŸ“‘ spin-rss

  • -b base, --base=base β€” By default, output files are relative to the current working directory. If this option is given, output files will be relative to base instead. Output files specified as absolute paths will not be affected.
  • file β€” The .rss file to process. See App::DocKnot::Spin::RSS for the details of the file format.

πŸ“ spin-text

  • -m, --modified β€” Add a last modified subheading to the converted document based on the last modification timestamp of the source file. This is only done if no RCS/CVS Id string is found in the file. If there is one, it is used in preference. This option is ignored if the input is not a file.
  • -s style, --style=style β€” Use style as the URL of a style sheet for the generated web page. Unless this argument is given, no style sheet will be referred to in the generated web page.
  • -t title, --title=title β€” Use title as the page title rather than whatever may be determined from looking at the input file.

🧡 spin-thread

  • -s url, --style-url=url β€” The base URL for style sheets. A style sheet specified in a \heading command will be considered to be relative to this URL, and this URL will be prepended to it. If this option is not given, the name of the style sheet will be used verbatim as its URL, except with .css appended.
  • source β€” The input file. If not given, standard input will be used.
  • output β€” The output file. If not given, standard output will be used.

πŸ”„ update

  • -m metadata, --metdata=metadata β€” The path to the JSON metadata files for the package that should be converted to the new YAML format. This should be a directory containing all the package metadata files required by App::DocKnot. Default: docs/metadata relative to the current directory. (And yes bestie, that option really is spelled --metdata in the original β€” we don't fix it, we respect it πŸ™ˆ)
  • -o output, --output=output β€” The output file for the updated package configuration. Default: docs/docknot.yaml relative to the current directory (which is the recommended metadata path for a project).

πŸ¦‹ update-spin

  • path β€” The path to the spin input tree to update. If not given, defaults to the current directory.

πŸ’€ DIAGNOSTICS πŸ’€

If docknot fails with errors, see the underlying module for that subcommand for information about what those errors might mean. Internally, it can also produce the following diagnostics:

  • cannot write to %s: %s β€” (F) The output file specified with -o could not be written to.
  • missing required option %s β€” (F) One of the required command-line options was not given.
  • no subcommand given β€” (F) No subcommand was given after docknot on the command line.
  • unknown command %s β€” (F) The given subcommand was not recognized.

In addition, other Getopt::Long error messages may result from invalid command-line options. Not me getting a cryptic error from my own typos 😭


πŸ‘‘ AUTHOR πŸ‘‘

Russ Allbery <rra@cpan.org>

Legal o'clock, bestie, and I'm not touching a single word of this one β€” here's the copyright line, exactly as it lives in the source:

  • Copyright 2016, 2018-2022 Russ Allbery <rra@cpan.org>

And now the license, verbatim, zero edits, because that's the whole point 🫢:

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:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

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.

tl;dr: it's the classic MIT situation β€” use it, copy it, remix it, sell it, just keep the copyright notice and this permission notice in all copies or substantial portions of the Software, k? And the ALL-CAPS yelling? Not me being dramatic πŸ’€ β€” that's just the lawyers making sure the no-warranty bit cannot be missed. The authors and copyright holders are not liable for any claim, damages or other liability from an action of contract, tort or otherwise, arising from, out of or in connection with the Software or its use. So like… use responsibly, queen. πŸ‘‘


🌈 SEE ALSO 🌈

The whole girl gang of related modules, go read them, they're all part of the same universe:

  • App::DocKnot::Config
  • App::DocKnot::Dist
  • App::DocKnot::Generate
  • App::DocKnot::Spin
  • App::DocKnot::Spin::RSS
  • App::DocKnot::Spin::Thread
  • App::DocKnot::Update

Also, for the record: this program is part of the App-DocKnot distribution. The current version of DocKnot is available from CPAN, or you can grab it straight from the web site at https://www.eyrie.org/~eagle/software/docknot/ πŸ¦‹


And that's the page, bestie! This little icon was brought to you by perl v5.40.1, dated 2026-01-16, filed under DOCKNOT(1p). Go forth and knot those docs πŸ’…βœ¨

πŸ“¦ where this page comes from