GNOME desktop thumbnailer for ANSI art files (*.ans, *.nfo).
- Quit all Nautilus processes:
nautilus -q
- Even if you currently do not have any Nautilus windows open, you should run the command above!
- Delete thumbnails folder:
rm -r ~/.cache/thumbnails
- Clone the repository:
git clone https://github.com/1j01/ansi-art-thumbnailer.git
- Change directory:
cd ansi-art-thumbnailer
- Run make install:
sudo make install
- Warning: this will run PIP as root.
- The script uses PIP to install necessary python packages. If you do not have system-wide pip installation,
please setup it first with
sudo apt install python3-pip
.
From now on, the thumbnails should be visible.
- Run make uninstall:
sudo make uninstall
- Quit file managers and delete cached thumbnails folder, as during installation.
Most likely it is a problem with bubblewrap
(1,
2,
and many more threads online). The short workaround fix (NOT recommended) would be to install a bwrap wrapper in /usr/local/bin
:
sudo wget -O /usr/local/bin/bwrap https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/nautilus/bwrap
sudo chmod +rx /usr/local/bin/bwrap
Instead, consider updating to the latest version of Ubuntu, where this issue is already fixed.
The script currently assumes UTF-8 encoding, which is uncommon for ANSI art files.
TODO: detect encoding
Based on mrc-em-gnome-thumbnailer, particularly the Makefile was useful! But also the overall repository structure.
Uses Stransi to parse ANSI escape sequences, and Pillow to render the text.
- ansilove - ANSI art to PNG converter. This would probably be a better thumbnailer, as it supports more formats, and fonts! There's also a library version, but that's probably not needed for using it as a thumbnailer.
- Textual Paint - ANSI art editor TUI inspired by MS Paint