Approaching first usable release of TextUserInterfaces.jl

Hi!

After a long time developing TextUserInterfaces.jl, I finally could implement the last feature I wanted before starting the code cleaning and documentation process: Dialogs!

If everything goes right, we are just about to reach the first usable (not stable) version!

25 Likes

sweet

1 Like

How does the plot support work? I have mainly switched over to Gnuplot.jl so I wonder if it can display those plots as well.

1 Like

The plot is generated by UnicodePlots.jl. I created a way to convert ANSI escaping color codes to Ncurses.

Gnuplot will not work because it is graphical (I think). Everything you are seeing is NCurses in a terminal. My idea is to create a Julia modern API to create TUIs instead of using the low level NCurses functions. Hence, we have definition of windows, widgets, container, focus, etc.

Oh I see. I was thinking maybe there was support to show Bitmaps or something like that but then you’d need some sort of GUI/graphics library. Support for UnicodePlots is great though.

1 Like

Gnuplot has a sixelgd output option. Maybe that is compatible with TextUserInterfaces.jl?

No, it is not, but now I really want it to be :smiley:

I saw that maybe it is possible to make sixel play nice with NCurses. We only need to make sure that NCurses do not touch the area draw by sixel. It should be doable here. If anyone has anything that can help me, I am all ears!

I investigated sixel output from the gnuplot program and Gnuplot.jl from julia 1.5.3 using the mintty terminal program from cygwin. As cygwin is not a supported OS for julia, I needed to see how I could best work with julia on windows with cygwin.

I was not able to get gnuplot sixelgd output to display in mintty. As far as I can tell, the julia repl is not passing the needed control sequences through the standard output to get the sixel image to show. I did determine that if I save the figure output and then cat at the bash prompt on xterm or mintty that the sixel image is shown.

I did find a module supporting sixel graphics in terminal output, TerminalGraphics.jl but it is not in the registry. However it uses libsixel which appears to give simple sixel IO support.
ImageMagick.jl also supports sixel data with considerably more file formats supported. It appears that TerminalGraphics.jl also may have a work around for the REPL gobbling up the terminal escape sequences. I have not been able to test.

Here are the collected links to sixel graphics that were informative:

It was very nice to be able to view inline images and plots in a REPL/terminal session!

2 Likes

Thanks @devel-chm! I could output a sixel image here using the same approach of TerminalGraphics.jl.

However we have a huge problem. NCurses does not play fine with custom ANSI escape sequences. After initializing NCurses and defining a window, I was not able to write the image to stdout.

There is very little information on the internet about how can we make NCurses works with sixel. I am afraid it will require some very bad hacks.