Tippytap

Tippytap is a Rust library to help you write tooltips for Tip, the "programmable tooltip that can be used with any Mac OS app".

Installation

Via cargo-edit:

cargo add tippytap

Example program

main.rs

```rust use tippytap::prelude::*;

pub fn scihubtooltip(doi: &str) -> TipUrlLine { TipUrlLine { label: "SciHub".to_owned(), value: format!("https://sci-hub.tw/{}", doi), } }

fn main() { let input = std::env::args().nth(1).expect("Missing input");

let output = vec![
    TipTextLine {
        value: format!("Input {}", input),
    }
    .into(),
    sci_hub_tooltip(&input).into(),
];
print_tooltips(&output);

} ```