Previous

Release v0.6.0 - Better argument parsing

Current

Release v0.7.0 - TextBuffer and partial attribute markings

Next

Release v0.8.0 - asAnsiChars, asAnsiTexts, and just in general: Ansi

Release v0.7.0 - TextBuffer and partial attribute markings

The latest release of JCLI has been released, introducing a new feature, as we all as partial @safe, @nogc, etc. markings.

Changes

The following changes were implemented:

  1. Feature - Added populateActiveAnsiComponents and createAnsiCommandString free-standing functions.
  2. Feature - Most of ansi.d has now been made public, with a slight refactor in order to create a more user-friendly way of handling.
  3. Feature - Add TextBuffer and related types, as well as an example project for it.
  4. Feature - Add AnsiText.rawText to get the raw string for an AnsiText.
  5. Tweak - Most of the project is now marked @safe, other attributes such as @nogc, nothrow, and pure have been added where possible.
  6. Tweak - Silly is now used as JCLI's test runner.
  7. Tweak - AnsiText is slightly more efficient with caching.
  8. Fix - Remove a stray writeln from UserIO.log

TextBuffer

The main feature, which I spent way more time developing, is TextBuffer.

TextBuffer is an Ansi-enabled buffer of characters, exposed as a 2D grid of characters with associated Ansi data (foreground, background, and flags).

I was developing a (now scrapped) table component for JCLI, but was running into frustrations of having to handle the fact that Ansi strings contain invisible characters, that are a bit annoying to measure.

So I thought: "What if I make something that makes messing with Ansi text easier?", and thus, TextBuffer was born.

I'd like to point you over to its example, and here's a screenshot of its output:

TextBuffer Example Output

Reminder

In the event that there's actually someone else other than me that uses this library, I'd just like to remind you that I'm completely open to suggestions, criticism, PRs, etc.