A generic previewer that can preview anything as everything.
Uses egui to render the preview window.
STATUS: Proof of Concept (⚠️ heavy work in progress).
https://user-images.githubusercontent.com/11632726/180646344-4cd4e487-9dd9-49a7-9e90-a1baac291124.mp4
Better don't install it as of now, unless you want to contribute.
bash
cargo install --git https://github.com/sayanarijit/previuwu
Preview a single file:
bash
previuwu /path/to/file
Allow streaming input from stdin:
bash
previuwu /path/to/file --pipe -
Also allow streaming input from a named pipe[1]:
```bash
previuwu /path/to/file --pipe - --pipe path/to/input.fifo ```
Example usage with xplr:
```bash
mkfifo /tmp/xplr.fifo
previuwu --pipe /tmp/xplr.fifo &
xplr --on-load 'StartFifo: /tmp/xplr.fifo' ```
I plan to support as many input types as possible.
Very basic (ugly) support for the following file types has been implemented:
First of all, thank you.
Please go through src/preview.rs
and try to implement laoding and/or rendering as many file types as you can.
Parsing is the easy part. Rendering might require some experience with egui.
Some files can be really slow to load/render in development mode (cargo run
). Try running in release mode (cargo run --release
).