A TUI text reader for the terminal.
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
A TUI text reader for the terminal.
Click the above gif to view a video of Fltrdr in action.
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 by ignoring all newline characters and removing sequential whitespace. Its purpose is to facilitate reading, scanning, and searching text. The program has a play mode that moves the reader forward one word at a time, along with a configurable words per minute (WPM) setting. It can be used to read text from either a file or stdin.
View the usage and help output with the
-hflag. The help output contains the documentation for the key bindings and commands for customization.
This program uses raw terminal control sequences to manipulate the terminal, such as moving the cursor, styling the output text, and clearing the screen. Although some of the control sequences used may not work as intended on all terminals, they should work fine on any modern terminal emulator.
This section describes what environments this program may run on, any prior requirements or dependencies needed, and any third party libraries used.
Any shell commands using relative paths are expected to be executed in the root directory of this repository.
Using a new version of gcc or llvm is required, as the default Apple llvm compiler does not support C++17 Standard Library features such as
A new compiler can be installed through a third-party package manager such as Brew. Assuming you have Brew already installed, the following commands should install the latest gcc.
brew install gcc brew link gcc
The following line will then need to be appended to the CMakeLists.txt file. Replace the placeholderwith the canonical path to the new g++ compiler binary.
set (CMAKE_CXX_COMPILER )
The following shell command will build the project in release mode:
sh ./build.shTo build in debug mode, run the script with the
The following shell command will install the project in release mode:
sh ./install.shTo install in debug mode, run the script with the
Base Config Directory (BASE):
--config=to override the default config file.
--config-base=to override the default base config directory.
The base config directory and config file must be created by the user. The config file in the base config directory must be named
config. It is a plain text file that can contain any of the commands listed in the Commands section of the
--helpoutput. Each command must be on its own line. Lines that begin with the
#character are treated as comments.
If you want to permanently use a different base config directory, such as
~/.config/fltrdr, add the following line to your shell profile:
sh alias fltrdr="fltrdr --config-base ~/.config/fltrdr"
The following shell commands will create the base config directory in the default location and copy over the example config file:
sh mkdir -pv ~/.fltrdr cp -uv ./config/default ~/.fltrdr/config
Several config file examples can be found in the
This project is licensed under the MIT License.
Copyright (c) 2019 Brett Robinson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.