Crate markterm

Source
Expand description

A cross-platform library to render colored markdown to the terminal. The rendered markdown is colored and is themeable.

The module exposes 4 functions that for handling markdown

  • render_file_to_stdout
    • Renders the passed in file to stdout using the theme.
  • render_file
    • Themes and renders the passed in file to the implementation of `std::io::Write`` that is passed in.
  • render_text_to_stdout
    • Renders the passed in string to stdout using the theme.
  • render_text
    • Renders the passed in string to an implementation of std::io::Write that is passed in.

§Status

This project started out as a way for me to learn rust. It’s gone beyond that now. At this point, markterm is not compatible with inline html and tables. It also does not support multi level indentations. These features are in the works

§Roadmap

There is a lot we want to do to markterm. The items we have in our immediate queue are listed below.

  • Add support for nested lists.
  • Add support for generic colors rather than always having to use RGB.
  • Add support for tables.
  • Add support for inline html.

§Credits

This project would not be possible without markdown-rs. Their ast parsing module powers the library.

Re-exports§

pub use themes::color::Color;
pub use themes::get_default_theme;
pub use themes::ElementTheme;
pub use themes::TextStyle;
pub use themes::Theme;

Modules§

themes
Modules to help theme the output

Enums§

ColorChoice
Indicates whether the output should be colorized or not.

Functions§

render_file
Renders the contents of the passed in file to any implementation of std::io::Write.
render_file_to_stdout
Renders the contents of the passed in file to stdout.
render_text
Renders the contents of the passed in string to any implementation of std::io::Write.
render_text_to_stdout
Renders the contents of the passed in string to stdout.