Giter Club home page Giter Club logo

charasay's Introduction

charasay ๐Ÿฎ

Discord GitHub Workflow Status

๐Ÿˆ The future of cowsay ๐Ÿฎ! Colorful characters saying something ๐Ÿ—จ๏ธ.

Re-engineered cowsay in rust ๐Ÿฆ€. Display colorful ANSI arts saying something in your terminal ๐Ÿ’ป.

Default character

Motivation

I use terminal emulator almost every day. I stare at it so much. I need some entertainment in terminal, so I found ponysay which is beautiful and giving my terminal some colors. But ponysay kind of bloated for me since I don't display all those ponies.

So, I want to make my own minimal tool to make my terminal so colorful and display the character that I like. This chance is a great time to learn rust. This project is mainly for me to learn rust and hopefully I get some feedback while this make us all happy ๐Ÿ˜.

Installation

AUR

For Arch Linux, package available via AUR. Example install this with AUR helper:

yay -S charasay

or

yay -S charasay-bin

Cargo

If you have rustup or cargo, this tool available on crates.io. Install this with:

cargo install charasay

Manual

Just donwload from the release page for your compatible Operating System, then extract the zip archive, give permission to execute on extracted file, then place it on your PATH.

Alternatively, clone this repository, then build this with cargo build --release.

Prerequisites

To display characters, your terminal needs to support true color (24-bit color). Unicode fonts are needed to render the border of speech bubble.

Usage

Display Default Character to Say Something

Run chara say something that motivating. It would display colorful cow saying something that motivating..

If message is empty, it would accept from standard input, piping would works: fortune | chara say.

Display Different Character

Run chara say -f ferris "Hello rustaceans!".

It could display external .chara files: chara say -f ~/path/test.chara "Nice".

Note: .chara files could be generated from PNG file.

I want to implement this builtin in this tool. For now, you could generate .cow file with Cowsay file converter then rename .cow into .chara.

Shell Completions

Shell completions also available with chara completions which would print out completions script to standard output. Please consult to your shell documentation on how to add completions.

Consult to Help Command

For updated usage please consult to help command.

$ chara --help
The future of cowsay ๐Ÿฎ! Colorful characters saying something ๐Ÿ—จ๏ธ.

Usage: chara <COMMAND>

Commands:
say          Make the character say something
completions  Generate completions for shell. Default to current shell
convert      TODO: Convert pixel-arts PNG to chara files
help         Print this message or the help of the given subcommand(s)

Options:
-h, --help     Print help
-V, --version  Print version
$ chara help say
Make the character say something

Usage: chara say [OPTIONS] [MESSAGE]...

Arguments:
[MESSAGE]...  Messages that chara want to say/think. If empty, read from STDIN

Options:
-r, --random         Choose random chara
-a, --all            Print all available chara
-t, --think          Make chara only thinking about it, not saying it
-w, --width <WIDTH>  Max width of speech bubble. Default to terminal width
-f, --file <CHARA>   Which chara should say/think
-h, --help           Print help

Ferris

Hacking to the Gate~! ๐Ÿง‘โ€๐Ÿ’ป๐ŸŽถ

MIT License ยฉ Latif Sulistyo

Acknowledgements

charasay's People

Contributors

dylhack avatar latipun7 avatar renovate[bot] avatar vschwaberow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

charasay's Issues

Artifacts are showing up in more complex chara files

Assurance

  • I have read and understand the contribution guide, and
  • I'm sure there's no relevant issue in this repository

Current Behavior

Weird artifacts are showing up in more complex char files.

image

image

I believe this is because the character tested has multi-letter variable names rather than the usual single-letter variable names.

Steps To Reproduce

# fox.cow is provided at the bottom of this issue
chara say -f ./fox.cow "Hello world"

Expected Behavior

For there not to be characters (text) in the character.

Other Information

Command to display only the chara

Assurance

  • I have read and understand the contribution guide, and
  • I'm sure there's no relevant issue in this repository

Description

Command to display only the chara. The chara printed without bubbles and message.

Possible Solution

chara print would print default chara.
chara print -f CHARA would print selected chara.

I'm

interested in implementing this myself

Custom speech bubbles

Assurance

  • I have read and understand the contribution guide, and
  • I'm sure there's no relevant issue in this repository

Description

It's nice to have the option to have different balloon border styles.
It is inspired from ponysay which have different border styles.

image
image
image
image
image

Possible Solution

chara say [--baloon|-b] <type>

I'm

interested in implementing this myself

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): maintain lock-file

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • build(deps): update unicode-width to 0.1.13

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

cargo
Cargo.toml
  • clap 4.4.12
  • clap_complete 4.4.5
  • rust-embed 8.1.0
  • textwrap 0.16.0
  • unicode-width 0.1.11
  • regex 1.10.2
  • rand 0.8.5
  • strip-ansi-escapes 0.2.0
github-actions
.github/workflows/ci-cd.yml
  • softprops/action-gh-release v1

  • Check this box to trigger a request for Renovate to run again on this repository

charasay ignores characters after $thoughts when put in variable

Assurance

  • I have read and understand the contribution guide, and
  • I'm sure there's no relevant issue in this repository

Current Behavior

Charasay ignores every character after $thoughts in variables in chara/cow files

Steps To Reproduce

  1. Run chara say Hello, World!
  2. Part of the cow's ears are shifted to the left image

Expected Behavior

Charasay should be printing the two spaces after $thoughts in chara/cow files

Other Information

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.