Fltrdr, or flat-reader, is an interactive text reader for the terminal. It is flat in the sense that the reader is word-based. It creates a horizontal stream of words, ignoring all newline characters and reducing sequential whitespace. Its purpose is to facilitate reading, scanning, and searching text. The program also has a play mode that moves the reader forward one word at a time, along with a configurable words per minute (WPM) setting.
It is highly customizable, with a configuration file to persist your settings. The colourscheme can be changed to match your environments theme using either 24-bit, 8-bit, or 4-bit colours, depending on what your terminal supports. The characters used for the text border and progress bar can be set to a character or unicode-character of your choice. Some of the UI elements, such as the border, progress bar, and status bar can be individually shown/hidden to create a more minimalistic display.
I'm open to any feedback or suggestions!
This blog post from the other week contains videos of it in action: https://octobanana.com/blog/terminal-text-reader-demo
It can be found here on GitHub: https://github.com/octobanana/fltrdr
It can also be found here on my personal site: https://octobanana.com/software/fltrdr
One bit of feedback: I think the video should be linked more prominently and from the README - I guessed that might be what it was for the description is a bit vague and abstract and "seeing is believing"
Also, make the video get to the point quicker. Open a file and start reading right away.
From a personal point of view, I don't like projects that have missing letters in the name. I find them confusing to read and harder to type (even after I've learned how to pronounce it). In fact even after using `nginx` for years, I still get stuck which letters to type if ever I interrupt my muscle memory.
eg I'm in the terminal and I want to launch flat-reader... now which letters do I type and which do I ignore?
If you're after something that's less keystrokes to launch then I much prefer the approach of applications like Visual Studio Code (`code`) or Sublime Text (`subl3`) that take a portion of the name. So you could have something like `flatr`.
That all said, you're never going to please everyone when it comes to naming things to I expect (hope) you do take my thoughts here with a pinch of salt :)
As for the reader itself; it looks like a lot of thought has gone into it. Good work there.
* Those input handlers (you have three) are terrible; pattern matching is the wrong way to go about this.
* You could no doubt get more imaginative with the progress bar using block characters.
* Users will no doubt ask for the ability to suspend such a program; which, note, has to properly tear the whole UI down and set it back up again.
* Users will also no doubt want this to work properly with the full range of Unicode text; you have not accounted for differing character widths, that I can see. Note that there exist zero-width characters and double-width characters.
* vi sentence, paragraph, and section motions are of course actually {, }, (, ), [[, and ]].
Some help:
* https://unix.stackexchange.com/a/499139/5132
* https://unix.stackexchange.com/a/444270/5132
* http://jdebp.eu./Softwares/nosh/guide/commands/TERM.xml
* http://jdebp.eu./Softwares/nosh/guide/commands/TerminalCapab...
* https://github.com/jdebp/nosh/blob/master/source/ECMA48Decod...
* https://github.com/jdebp/nosh/blob/master/source/TUIInputBas...
* https://github.com/neovim/libtermkey/blob/master/driver-csi....
In case would you offend if I tried to port it?