15 releases (5 breaking)

0.6.0 Feb 18, 2024
0.5.6 Jan 24, 2024
0.5.4 Oct 17, 2023
0.5.1 Jun 29, 2023

#896 in Command line utilities

Download history 12/week @ 2024-01-18 4/week @ 2024-01-25 17/week @ 2024-02-08 134/week @ 2024-02-15 49/week @ 2024-02-22 10/week @ 2024-02-29 1/week @ 2024-03-07 1/week @ 2024-03-14 48/week @ 2024-03-28 24/week @ 2024-04-04

72 downloads per month

MIT license

16KB
94 lines

━━━━━━ ❖ ━━━━━━



❖ Information

lovesay.rs is a port of lovesay in rust. It is a simple rust program that displays a quote from a loved one based on the day of the month or a quote passed in through the cli arguments.

lovesay output in different colorschemes

❖ Requirements

Note: These requirements only apply if using you're using lovesay to print a different quote for each day of the month.

  • A quotes file stored in ~/.config/lovesay/
  • Each quote must be on a new line, see the example quotes file in .example/quotes
  • (optional) A partner to write you 31 lines full of love, one for each day of the month

❖ Installation

Shell

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dotzenith/lovesay.rs/releases/latest/download/lovesay-installer.sh | sh

Brew

brew tap dotzenith/tap
brew install lovesay

Powershell

irm https://github.com/dotzenith/lovesay.rs/releases/latest/download/lovesay-installer.ps1 | iex

Cargo

cargo install lovesay

Binaries

Pre-Compiled binaries for linux, mac, and windows are available in Releases

Source

  • First, install rust
git clone https://github.com/dotzenith/lovesay.rs.git
cd lovesay.rs
cargo build --release
./target/release/lovesay

❖ Usage

lovesay can be used in a similar fashion to cowsay

lovesay Hello World

if there's a quotes file in ~/.config/lovesay/, lovesay can be used without any arguments

lovesay

if you'd like to use a quotes stored somewhere other than the path above, the LOVESAY_PATH env variable can be used as such

export LOVESAY_PATH="~/path/to/file"

colorschemes can be set using the LOVESAY_COLORSCHEME env variable

export LOVESAY_COLORSCHEME=nord         # "catppuccin mocha" by default

The available colorschemes are as follows:

  • catppuccin latte
  • catppuccin frappe
  • catppuccin macchiato
  • catppuccin mocha
  • dracula
  • nord
  • gruvbox dark
  • gruvbox light
  • onedark
  • tokyonight
  • ayu
  • palenight
  • gogh
  • biscuit dark
  • biscuit light

lovesay also supports two other environment variables

export LOVESAY_NO_NERD=1        # Set if your terminal does not use a nerd font (can be set to anything, lovesay just checks for existence)

export LOVESAY_MAX_WIDTH=80     # Override the width lovesay will use to wrap a quote

lovesay has support for pipes as well

lovesay | lolcat                    # pipe output to lolcat

echo something | lovesay            # take input from another command

echo something | lovesay | lolcat   # combine the two

❖ About lovesay

This is just a silly little rust port, but the reasoning for the original is below:

I wrote lovesay because I got tired of seeing neofetch or pfetch every time I opened my terminal. I wanted something more personal.

Seeing words full of love from my partner is a lot better than any other command I could possibly run. It makes my terminal feel cozy, welcoming, and as is the case with most things my partner touches, it makes my terminal feel like home.

I hope that someone else finds a use for this little script as well. Love is a wonderful thing, and we could all use a little bit more of it in our lives (especially arch linux users)


❖ What's New?

0.6.0 - Add --version and --help flags


Dependencies

~3MB
~40K SLoC