NAME
sdview - a terminal-based structured document viewer for Pod and other formats
SYNOPSIS
$ sdview my-document.pod
# Understands Pod in .pm files
$ sdview lib/App/sdview.pm
# Search perldoc for page documentation
sdview Scalar::Util
$ Understands Markdown files
sdview README.md
DESCRIPTION
This script runs the App::sdview program, which renders a structured document to a terminal output, via the less pager.
ARGUMENTS
$ sdview [FILE]
FILE
If a file path is given, the filename is used to determine if it should be parsed as Pod (*.pm, *.pl or *.pod), or Markdown (*.md). (But see also the -f
option).
If the name is not a file, perldoc -l
will be used to convert the name of a Perl module into a location for its documentation.
OPTIONS
-f, --format FORMAT
Overrides detection of the file's format by inspecting the filename. Useful for viewing Pod out of toplevel scripts whose filename does not indicate a language:
$ sdview -f Pod bin/sdview
Request -f ?
to print a list of parser format names.
-t, --output FORMAT
Specifies that a different form of output will be generated, instead of rendering formatted output directly to the terminal. Useful for cross- converting between file types:
$ sdview lib/App/sdview.pm -t Markdown > sdview.md
Request -t ?
to print a list of output format names.
-O, --output-option KEY=VALUE,...
Provides additional options to pass to the selected output plugin. The exact options recognised will depend on the selected plugin.
-h, --highlight
Enables syntax highlighting of verbatim or code blocks, by using tree-sitter and any available language parsers. This is switched off by default, partly because of unlikely availablity, and partly because of slow performance, especially in the presence of many small code sections.
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>