| Crates.io | bio-read |
| lib.rs | bio-read |
| version | 0.2.1 |
| created_at | 2025-01-11 03:02:45.761968+00 |
| updated_at | 2025-01-17 07:21:01.369933+00 |
| description | Bionic reading in terminal. |
| homepage | |
| repository | https://github.com/PRO-2684/bio-read |
| max_upload_size | |
| id | 1512051 |
| size | 58,664 |
Bionic reading in terminal.
If you have cargo-binstall, you can install this tool by running:
$ cargo binstall bio-read
Otherwise, you can install it from source:
$ cargo install bio-read
bio-read in action[!NOTE] The following asciinema recording is for demonstration purposes only. It may be outdated and may not reflect the latest version of
bio-read.
$ br --help
Usage: br [<input>] [-f <fixation-point>] [-e <emphasize>] [-d <de-emphasize>]
Bionic reading in terminal.
Positional Arguments:
input the file to read from. Read from stdin if not specified.
Options:
-f, --fixation-point
the fixation point. Should be in range [1, 5]. Default is 3.
-e, --emphasize customize how to emphasize the text. The emphasized text
will take the place of "{}". Example: --emphasize
"<em>{}</em>". Default to ansi bold.
-d, --de-emphasize
customize how to de-emphasize the text. The de-emphasized
text will take the place of "{}". Example: --de-emphasize
"<de>{}</de>". Default to ansi dimmed.
-h, --help display usage information
For simple usage, run br with the file you want to read:
$ br file.txt
Alternatively, pipe the text you want to read into br:
$ cat file.txt | br
To set fixation points, use the -f flag, which is a shorthand for --fixation-point:
$ cat file.txt | br -f 1
Although this tool aims to be as close to the original bionic reading as possible, it is not exactly the same. Notably, the behavior differs when a word is too long, and it handles special characters differently. However, this tool is open-source, and guarantees linear time complexity and and constant memory usage.
On some terminals, you may need to configure emphasized text style to be "bold" for displaying ansi styles properly. Taking Windows Terminal for example, you'll need to set profiles.defaults.intenseTextStyle to "bold" or "all" in the settings.json file, or configure it in the settings UI.