What is libfab?
libfab is my most recent project. I’ve been working on a replacement for the python library fabulous. This library has a bunch of neat functionality but the popular features are terminal color and formatting, and printing images into the terminal. libfab is a reimplementation of these features in C. I chose C since I’m currently trying to increase my skills with it. The main point of libfab is to create a clean interface in C in order to make it easy for others to write bindings for libfab.
Differences from Fabulous
libfab is only targeting a specific subset of the features of fabulous. This means libfab will not support poetry generation. It will however support 256 color text, text formating and image to ascii functionality. This functionality is implemented using ImageMagick, and the same algorithms that were used in fabulous. The core of libfab is tiny, around 317 lines of C. This should make it easy to write bindings in other languages.
Current Bindings
The plan is to write libfab bindings for a bunch of different languages. So far there are Python and DLang bindings. The DLang bindings are called libfabd and is written by my friend Matt The Python bindings are named tremendous, this one is also written by a friend, Ryan
The Future
The master branch of libfab has full support for text formatting and text coloring. In the feature/images branch the image to xterm functionality is implemented. The feature/images branch is close to being merged in, it has a little bit of clean up work that needs to be done, and then its time to cut a first release. Once feature/images is merged into master I’m going to focus on testing and documentation. After that I think I’ll try and write bindings for Rust.
As always questions and comments are welcome.