4

I'm writing an application in Clojure. The internals are already written, but what I am struggling with now is the interface.

I do intend at some point to use Seesaw for a GUI interface. However, I would also like to provide a text-based interface that can be used in a terminal, for instance.

I chose to try and implement the text-based interface first, and I do have something that works as a menu, per se, but I have been wondering if there are any libraries I could drop in that would make this easier and prevent me from having to write a bunch of tests for something that someone else may have already tested and implemented.

However, despite searching under a number of different terms, I have yet to find anything like what I'm looking for.

Charva does some of what I want but I have no need for a full ncurses-like interface, just something that will display a bunch of choices I can pick from and act on the choice. Plus Charva isn't even a fully-native Java library; it depends on an ncurses shared library, and since I'm going to want this application to be portable, that will create more headaches. Ideally I would like to find something actually written in Clojure so I don't have to write interop code to use it, but I can if necessary.

Am I just not looking hard enough or does a CLI-based menu interface / presentation layer for Clojure just not exist?

xobicvap
  • 292
  • 2
  • 11
  • 2
    Have you looked at http://sjl.bitbucket.org/clojure-lanterna/ – Leon Grapenthin Oct 16 '16 at 12:18
  • 1
    @xobicvap Are you looking for something like Ruby's Highline (https://github.com/JEG2/highline) but for Clojure? If yes, I'm not aware of any such library, but would be a fun project to work on. – Michael Kohl Oct 17 '16 at 04:42
  • @MichaelKohl Ah, yes, that's almost exactly the kind of thing I'm looking for, specifically the menu section they have in the example. I'm not that familiar with Ruby so it escaped my radar. You're right, it would be a fun project to convert Highline to idiomatic Clojure. – xobicvap Oct 21 '16 at 02:47
  • @LeonGrapenthin I had not seen Lanterna but from the looks of it it is way beyond the capabilities I was looking for. ncurses-style functionality is something I may look at for other projects but for this one it is a bit overkill. – xobicvap Oct 21 '16 at 02:48

0 Answers0