App-mdee
view release on metacpan or search on metacpan
lib/App/mdee.pm view on Meta::CPAN
B<em·dee> does not reflow paragraphs or convert Markdown into a
different format. For full Markdown rendering, many other viewers
are available. Combine them with L<nup(1)|App::nup> for similar paged output
(e.g., C<nup glow README.md>).
The pipeline combines L<greple(1)|App::Greple> for colorization and
L<nup(1)|App::nup> for multi-column paged output.
The following elements are highlighted. Elements marked with
C<--show> can be individually disabled via the C<--show> option.
Others are always processed for structural integrity.
--show bold (**bold**, __bold__)
--show italic (*italic*, _italic_)
--show strike (~~strike~~)
--show code_inline (`code`)
--show header, h1-h6 (# heading)
--show horizontal_rule (---, ***, ___)
--show blockquote (> quote)
always code_mark (``` or ~~~)
code_block
code_info
always comment (<!-- ... -->)
always link ([text](url))
image (![text])
image_link ()
Tables and list item folding are controlled by C<--table> and
C<--fold> options, not by C<--show>.
=head2 Multi-column Layout and Pagination
By default, B<mdee> calculates the number of display columns by
dividing the terminal width by the pane width (default 85
characters). This determines how the output is laid out and
paginated.
When two or more columns fit, L<nup(1)|App::nup> arranges output
in multi-column layout with page-by-page pagination â content is
split into terminal-height pages viewed through a pager.
When only one column fits, B<mdee> still uses nup for formatting
(borders, document layout) but disables page-by-page splitting,
so the content scrolls continuously in the pager. This avoids
wasted space from page breaks on narrow terminals while
maintaining the same visual appearance.
To force page-by-page pagination even in single-column layout,
specify C<--nup> explicitly. The C<--pane-width> (C<-S>) option
adjusts the column width used for this calculation, and
C<--pane> (C<-C>) sets the number of columns directly.
Use C<-p> (C<--style=pager>) for a simpler view without nup
formatting â highlighted output is piped directly through a
pager. Use C<-f> (C<--style=filter>) to write highlighted
output to stdout without a pager, suitable for piping into
other commands.
=begin html
<p><img width="1000" src="https://raw.githubusercontent.com/tecolicom/App-mdee/main/images/3-column.png">
=end html
=head1 INSTALLATION
=head2 Homebrew
Use L<tecolicom/tap|https://github.com/tecolicom/homebrew-tap>:
brew tap tecolicom/tap
brew install app-mdee
=head2 CPAN
cpanm -n App::mdee
=head1 OPTIONS
=head2 General Options
=over 4
=item B<-h>, B<--help>
Show help message.
=item B<--version>
Show version.
=item B<-d>, B<--debug>
Set debug level. Can be repeated for increasing verbosity.
=over 4
=item C<-d>
Show theme values (C<theme_light[]>/C<theme_dark[]>, C<md_config[]>)
and pipeline stage names.
=item C<-dd>
Above, plus full command lines for each pipeline stage.
=back
=item B<-x>, B<--trace>, B<--no-trace>
Enable or disable shell trace mode (C<set -x>). Useful for
debugging script execution. Can be toggled: C<-x --no-x> enables
then disables tracing.
=item B<-n>, B<--dryrun>
Dry-run mode. Show the pipeline without executing.
With C<-dd>, shows expanded command lines for each stage instead
of function names.
=back
( run in 3.519 seconds using v1.01-cache-2.11-cpan-788537b7465 )