Crates.io | lear |
lib.rs | lear |
version | 0.2.0 |
source | src |
created_at | 2021-10-09 02:17:02.369708 |
updated_at | 2021-10-09 21:46:09.415642 |
description | Prints a random passage from King Lear. For when you meant to type "clear" |
homepage | https://github.com/kyle-silver/lear |
repository | https://github.com/kyle-silver/lear |
max_upload_size | |
id | 462619 |
size | 1,700,909 |
Lear is a command line “utility” that you can use to amuse yourself and your friends. Whenever you mistype clear
into the terminal, lear
will dutifully print out a passage from everyone’s favorite tragedy about a mad king.
This idea was loosely inspired by sl
(Steam Locomotive), Fortune, and all of the other weird command line scripts out there.
To get started, type lear
into the console (preferably by accident).
To print a specific passage, use the quote
subcommand. It accepts the act, scene, starting line, and ending line as positional arguments. This example quotes lines 7–8 from Act 3, Scene 3.
$ lear quote 3 3 7 8
EDMUND
Most savage and unnatural!
GLOUCESTER
Go to; say you nothing. There's a division betwixt
...
(Lr. 3.3.7-8)
You can use the contents
command to print a table of contents, which will show you which acts and scenes are available, as well as how many lines they contain.
$ lear contents
Act Scene Lines
-------------------
1 1 332
2 191
3 27
...
If you have cargo
installed on your machine already, lear
can be installed with
$ cargo install lear
A homebrew installation is hopefully coming soon.
If you would like to contribute to this tool, please open an issue or submit a pull request