Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iambumblehead/thu.sh
bash script to render thumbnails for various types of file
https://github.com/iambumblehead/thu.sh
epub ffmpeg font imagemagick imagemagick-thumbnailer imagemagick-wrapper mutool sixel terminal vifm
Last synced: 14 days ago
JSON representation
bash script to render thumbnails for various types of file
- Host: GitHub
- URL: https://github.com/iambumblehead/thu.sh
- Owner: iambumblehead
- License: gpl-3.0
- Created: 2024-02-26T23:07:59.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-30T23:04:44.000Z (9 months ago)
- Last Synced: 2024-11-01T06:42:19.933Z (2 months ago)
- Topics: epub, ffmpeg, font, imagemagick, imagemagick-thumbnailer, imagemagick-wrapper, mutool, sixel, terminal, vifm
- Language: Shell
- Homepage:
- Size: 16 MB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
thu.sh
renders preview images to the terminal; ~1000 LOC bash
**thu.sh renders images from audio, font, video, pdf, epub, svg** and other files --supporting both kitty and sixel formats. It detects available commands from the system for a small dependency tree,
* `magick` sixel or `kitten icat` display,
* `mutool`, `pdftoppm` or `magick` pdf,
* `ffmpeg` video audio,
* `magick` font,
* `unzip` epub,
* `exiftool` or `identify` file type```bash
thu.sh /path/to/image.png
thu.sh /path/to/font.ttf
thu.sh /path/to/video.mp4# display image is placed to fit optional top, left, width and height params
thu.sh /path/to/music.flac $top $left $width $height
thu.sh /path/to/image.svg 0 0 600 600
thu.sh /path/to/book.pdf
thu.sh /path/to/book.epub
```
- Which terminal emulators will render images?
- `foot`, `xterm`, `kitty` and `iTerm2` can render images with this script. Sixel support for other terminals is listed here https://www.arewesixelyet.com/
- Anything else?
- Suggestions and improvements are welcome and appreciated. `thu.sh` may feel "slow" as it presently does not yet cache or reuse preview images it generates.
----------------------------------------------
> [!WARNING]
> vifm image preview no longer working https://github.com/vifm/vifm/issues/731#issuecomment-2025267217
**Add sixel image preview** to [vifm file manager.][10] Instructions [at the wiki.][11]
[10]: https://github.com/vifm/vifm
[11]: https://github.com/iambumblehead/thu.sh/wiki