Expand description
mdcat: render markdown to TTYs.
This crate exposes both the command-line interface entry points and the core rendering
library (previously published as pulldown-cmark-mdcat). See push_tty for the main
library entry point, and process_file for the CLI-level helper that reads markdown
from a file and renders it to the given Output.
§Features
-
defaultenablessvgandimage-processing. -
svgincludes support for rendering SVG images to PNG for terminals which do not support SVG images natively. This feature adds a dependency onresvg. -
image-processingenables processing of pixel images before rendering. This feature adds a dependency onimage. If disabled mdcat will not be able to render inline images on some terminals, or render images incorrectly or at wrong sizes on other terminals.Do not disable this feature unless you are sure that you won’t use inline images, or accept incomplete rendering of images. Please do not report issues with inline images with this feature disabled.
Re-exports§
pub use crate::resources::ResourceUrlHandler;pub use crate::terminal::capabilities::TerminalCapabilities;pub use crate::terminal::Multiplexer;pub use crate::terminal::TerminalProgram;pub use crate::terminal::TerminalSize;
Modules§
- args
- Argument parsing for mdcat.
Command-line argument definitions for the
mdcatmulticall binary. - cli
- Shared CLI entry point for the
mdcatandmdlessbinaries. Shared CLI entry point for both binaries. - mdless
- Interactive
mdlessviewer. - output
- Output handling for mdcat.
- resources
- Access to resources referenced from markdown documents.
- terminal
- Terminal utilities.
Structs§
- Environment
- The environment to render markdown in.
- Noop
Observer - Observer that ignores every event.
- Settings
- Settings for markdown rendering.
- Theme
- A colour theme for mdcat.
Enums§
- Render
Error - Errors that occur while rendering markdown to a terminal.
Statics§
- DEFAULT_
RESOURCE_ READ_ LIMIT - Default read size limit for resources (100 MiB).
Traits§
- Render
Observer - Observer invoked on every event the render state machine processes.
Functions§
- create_
resource_ handler - Create the resource handler for mdcat.
- markdown_
options - CommonMark + the GFM extensions mdcat renders natively.
- process_
file - Process a single file.
- push_
tty - Write markdown to a TTY.
- push_
tty_ with_ observer - Render Markdown to a TTY while handing every event to an observer.
- read_
input - Read input for
filename.
Type Aliases§
- Render
Result Resulttype used throughout the rendering library.