DOCKNOT(1p)
π 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 (seeApp::DocKnot::Configfor the format documentation). Once the distribution is built, it gets checked against the source tree, anddocknotwill 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 πβ¨. SeeApp::DocKnot::Configfor documentation on the metadata format, the configuration files, and the paths.generate-allβ Same energy asgenerate, 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 forspinπ¦.spinβ Spin a tree of files written in the macro language thread into an HTML web site πΈοΈπΈ. SeeApp::DocKnot::Spinfor documentation on the input format and all the details of the site generation.spin-rssβ Process a single.rssfile withApp::DocKnot::Spin::RSS(normally this happens as part of usingspinto 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β Likespin, 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 forspinto the latest expectations. It'll, for example, convert old-style*.rpodpointer files to new-style*.spinpointer 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()" inApp::DocKnot::Distfor more information. Default: thedestdiroption 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.yamlrelative 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-uoption of GnuPG understands. The generated signature will be armored and stored in a file named by appending.ascto the name of the tarball. Default: thepgp_keyoption 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.yamlrelative 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.yamlrelative 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 thedistribution.sectionkey in the package configuration. Older versions will be moved to theARCHIVEsubdirectory of archivedir. Default: thearchivediroption 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 bydist. The latest version in this directory will be used. Default: thedestdiroption 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.yamlrelative 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\headingcommands 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.cssappended. This will also be used as the base URL to style sheets for the output ofcl2xhtml,cvs2xhtml, andfaq2html.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.rssfile to process. SeeApp::DocKnot::Spin::RSSfor 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\headingcommand 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.cssappended.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 byApp::DocKnot. Default:docs/metadatarelative to the current directory. (And yes bestie, that option really is spelled--metdatain 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.yamlrelative 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-ocould 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 afterdocknoton 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>
β¨ COPYRIGHT AND LICENSE β¨
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::ConfigApp::DocKnot::DistApp::DocKnot::GenerateApp::DocKnot::SpinApp::DocKnot::Spin::RSSApp::DocKnot::Spin::ThreadApp::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
- ubuntu resolute: docknot 8.0.1-1build1 Β· MIT
- ubuntu stonking: docknot 8.0.1-1build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms