Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: separate lib and cli #21

Merged
merged 1 commit into from
Jun 10, 2024
Merged

refactor!: separate lib and cli #21

merged 1 commit into from
Jun 10, 2024

Conversation

comfysage
Copy link
Contributor

No description provided.

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@uncenter
Copy link
Owner

Thanks!

@uncenter uncenter merged commit 8203728 into uncenter:main Jun 10, 2024
7 checks passed
@comfysage
Copy link
Contributor Author

comfysage commented Jun 10, 2024

kitty can currently be called like this:

use kittysay::{KITTY, generate};

pub fn main() {
  let format_opts = FormatOpts {
    think: false,
    width: 80,
  };
  println!(format!("{}{}", generate("<3", format_opts), KITTY));
}

or we could add a kittysay::print fn:

pub fn print(message: &str, format_opts: FormatOptions) -> String {
  format!("{}{}", generate(message, format_opts), KITTY)
}

@comfysage
Copy link
Contributor Author

print fn pr in #22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants