5 ms·
ncurses seems powerful. Any good suggestions on a tutorial or introduction to ncurses (which it appears is what was used for the ui here)? Ideally for python,
by jeremiahwv 9y ago
ncurses seems powerful. Any good suggestions on a tutorial or introduction to ncurses (which it appears is what was used for the ui here)? Ideally for python, or generalized... Or is there a better tool to learn for generic command line UIs?
- _sdegutis 9y agoKilo is a great way to learn how to manipulate the terminal directly (rather than using a wrapper library like ncurses): https://github.com/antirez/kilo https://github.com/antirez/kilo (A text editor in less than 1000 LOC with syntax highlight and search.)
- stevekemp 9y agoThere are many forks of this, which I think is a testament to how simple, clean, and easy to modify this code was. The initial blog-post which announced the editor is worth a read, as is the discussion here: http://antirez.com/news/108 http://antirez.com/news/108 https://news.ycombinator.com/item?id=12065217 https://news.ycombinator.com/item?id=12065217 My own version adds Lua support, multiple buffers, and similar features. It is by no means the best of the editors but I had fun playing with it - to the extent I was almost tempted to write an editor. (But then I realized I already have vim for writing email, and emacs for everything else. The world really doesn't need another editor!) https://github.com/skx/kilua/ https://github.com/skx/kilua/
- ageofwant 9y agoUsed npyscreen http://npyscreen.readthedocs.io/index.html http://npyscreen.readthedocs.io/index.html for a few things. Can recommend.
- TheAceOfHearts 9y agoIf you want to build interactive terminal interfaces, check out blessed [0]. Even better, you can use react-blessed [1] to write declarative UI code! You can also find additional widgets in blessed-contrib [2]. For actually shipping the code around, you could use pkg [3] to generate a single binary. That lets you avoid having to install node or any supporting libraries. [0] https://github.com/chjj/blessed https://github.com/chjj/blessed [1] https://github.com/Yomguithereal/react-blessed https://github.com/Yomguithereal/react-blessed [2] https://github.com/yaronn/blessed-contrib https://github.com/yaronn/blessed-contrib [3] https://github.com/zeit/pkg https://github.com/zeit/pkg
- gkgicccj 9y agoMember of rust interner task force here. Check out termion, it's so much simpler than raw ncurses. While you're at it, consider rewriting everything you have in Rust. (obligatory statement as the member of ritf) PS: the termion suggestion is not a joke