omp packages

pi-umbra-preview0.1.3

Render a document with pandoc and open it in the browser, from inside pi.

grknbyk Published 22 days ago MIT ~246 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-umbra-preview

/umb-preview <file> opens a document in your browser, rendered. A Markdown file in the terminal is its source text. This turns it into a page with pandoc.

pi install npm:pi-umbra-preview
Command Effect
/umb-preview README.md render with pandoc, open in the browser
/umb-preview @docs/plan.md a leading @ from pi's file picker is fine
/umb-preview report.pdf open as it is
  • A path is taken from the folder pi was started in.
  • .pdf, .html, .htm, .svg, .png, .jpg, .jpeg, .gif and .webp open directly.
  • Anything else goes through pandoc into one self-contained file in <temp>/pi-umbra-preview/.
  • Mermaid blocks are drawn as diagrams. The page loads mermaid from the jsDelivr CDN for that, so it needs a network connection.

pandoc

pandoc is not included. Nothing checks for it until you preview a file, and if it is missing pi tells you how to install it:

System Command
Linux sudo apt install pandoc, or your distribution's package
macOS brew install pandoc
Windows winget install --id JohnMacFarlane.Pandoc -e

MIT.