Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/risgar/crpreview
Preview script for the lf file manager
https://github.com/risgar/crpreview
chafa crystal crystal-lang imagemagick lf terminal-file-manager
Last synced: 10 days ago
JSON representation
Preview script for the lf file manager
- Host: GitHub
- URL: https://github.com/risgar/crpreview
- Owner: RisGar
- License: eupl-1.2
- Created: 2023-04-26T17:15:38.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-09T17:02:15.000Z (about 1 month ago)
- Last Synced: 2024-11-09T18:17:27.654Z (about 1 month ago)
- Topics: chafa, crystal, crystal-lang, imagemagick, lf, terminal-file-manager
- Language: Crystal
- Homepage: https://risgar.github.io/crpreview/
- Size: 66.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# crpreview
[![GH Build](https://github.com/RisGar/crpreview/actions/workflows/make.yml/badge.svg)](https://github.com/RisGar/crpreview/actions/workflows/make.yml)
Previews files and directories in the [lf file manager](https://github.com/gokcehan/lf) on macOS.
## Features
`crpreview` can preview the following formats:
| File type | Tool |
| ------------ | ------------ |
| archives[^1] | `libarchive` |
| markdown | `glow` |
| images | `chafa` |
| pdf | `qlmanage` |
| text | `bat` |
| directories | `eza` |[^1]: Supported formats: `tar`, `7-zip`, `zip`, `bzip`, `bzip2`, `gunzip`, `xz`, `zstd`, `lzip`, `lrzip`
## Requirements
All of the above mentioned preview tools which you want to use.
## Installation
### Binary
Install directly from my brew tap:
```console
$ brew install RisGar/tap/crpreview
```### From Source
```console
$ make
```## Usage
Add the following lines to your `lfrc`:
```conf
set previewer /path/to/crpreview/bin/crpreview
map i $ /path/to/crpreview/bin/crpreview $f | less -R
```Make sure to install the required decompressors for `libarchive` to list archive contents.
## Contributing
1. Fork it ()
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request