fuelen
Hey folks!
Want to present a toolkit for writing command-line user interfaces.
It provides a convenient interface for
- colorizing text using tags
- input control with validations and casting to various data types
- select/multiselect controls, inspired by AUR package managers
- editing text in
ELIXIR_EDITOR - wrapping multiline colorized data into ASCII boxes
- printing palette colors
- progress bars, multiple bars at the same time are supported as well
- live-updating of multiline blocks
- working with virtual device which partially implements The Erlang I/O Protocol and doesn’t conflict with live blocks.
Trending in Announcing
Hey everyone!
Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application.
This library uses Erlang esaml to provide
plug enabl...
New
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi all!
I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas.
You...
New
Hello
Published a new library - ProcessHub!
ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
Hey folks,
I just published a post about Hologram’s funding and where the project goes next - the short version:
Curiosum as Main Spons...
New
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
AndyL
Nice!
Would it be possible to implement
getchusingOwl.LiveScreen(or some other method)? The idea would be to trigger on single keypress events, without using the return key.Ruby has TTY Toolkit. Do you envision Owl to provide similar features?
I don’t understand what use-cases are addressed by the Erlang I/O protocol and
Owl.LiveScreen. Can you talk a bit about that? What types of apps would be a good fit forOwlvsExNcurses?Owl looks great thanks very much for posting!
fuelen
I don’t think so. At least for now, I don’t see a way how to implement this easily.
Some components can be definitely useful and easily ported. Didn’t know about this project, thank you. I saw GitHub - Shopify/cli-ui: CLI tooling framework with simple interactive widgets · GitHub and wanted to make something better
There is another similar project in JS ecosystem https://www.npmjs.com/package/inquirer.
Owldoesn’t support getting char as you type, so whistles and bells like in inquirer are not possible.Sure. Logger writes to stdout by default, and when you draw N progress bars, the cursor has to be moved N lines up, and replace these lines with the new content. It is okay if progress bars are rendered there, but if not, then the content will be replaced. It means that Logger has to be synchronized with an engine that is used for drawing bars. This can be achieved by simply using this line:
That’s it. Now when you log something, messages will be rendered ABOVE progress bars or any other dynamic blocks. There is an example with Logger here owl/examples/emulate_compilation.exs at 9390b8f020aa6ef146c0a51af21bef5be911599b · fuelen/owl · GitHub
Let’s say you render progress bars and want to inspect
my_variableusingIO.inspect. Everything will be messed up if you simply typeIO.inspect(my_variable). BecauseOwl.LiveScreenimplements Erlang I/O protocol,my_variablecan be easily inspected byIO.inspect(Owl.LiveScreen, my_variable, [])Owldoesn’t use nifs and is not for full-screenlazygit-like applications. At least for now. It is for scripts, executing which you can see the log of the program, what was selected, what was typed, etc. If you need full-screen applications, go withExNcursesor GitHub - ndreynolds/ratatouille: A TUI (terminal UI) kit for Elixir · GitHub.lud
Great work ! I have already some projects where this can be very useful
Eiji
@fuelen Hi, I took a look at
Owl.Boxdocumentation.I suggest to add
padding,padding_xandpadding_yopts:paddingopt:padding_xopt:padding_yopt:Or even change it to keyword for example:
Also it would be nice to easily create a full height and/or full width boxes … So far I need to calculate it based on
:io.columns()-borders-paddings.Eiji
@fuelen Here goes suggestions to
Owl.IO:Support for full answers and
i18n:Owl.IO.open_in_editorshould accept 2nd argument callededitorfor non-default editors … Think about detecting installed editors and if there are more than one editor displaysselectfor an editor …Optionally
multiselectandselectmay also support answers for example:answershere would also add ability to easily add answer left or right padding. This would also be useful fori18n(for example converting number to its equivalent in other languages).fuelen
Hey @Eiji
Good suggestions, thank you. Will add to my TODO list
fuelen
Hey folks!
I’m happy to announce that Owl v0.2.0 has been released
Changelog
Enhancements
Owl.Spinnerwidget with multiline frames support.:blink_slow:blink_rapid:faint:bright:inverse:underline:italic:overlined:reverseOwl.LiveScreen.await_render/1function.Owl.Data.tag/2andOwl.Data.untag/2padding_x,padding_yandpaddingoptions toOwl.Box.new/1Owl.IO.select/2andOwl.IO.multiselectby right-hand side.Owl.IO.open_in_editor/2explicitly.Owl.IO.confirm/2Owl.Tag.new/2.Owl.Data.tag/2should be used instead.Bug Fixes
fuelen
@Eiji I’ve implemented almost all your suggestions, except mapping numbers in
selectandmultiselect. For now, I’m not sure if this is really helpful, because the whole idea is in using numbers.Thank you once again for your feedback
Eiji
Oh, I gave a bad example … Just think that someone’s prefers other number system like for example Arabic numbers. Also someone may want to use letters like
a),b)c)etc.Per above do you think you can add
suffixoption, so for example someone would set suffix as empty string (default) or)character or something else?fuelen
Arabic numbers are already in use
But I got the idea, will have this in my mind.