Giter Site home page Giter Site logo

rsmatrix's Introduction

rsmatrix

image

image

Screen Recording 2022-06-11 at 10 39 10 PM

🚧 Work in Progress

CLI application that mimics the iconic CG from "The Matrix".

This is my attempt at building cmatrix clone using rust

USAGE:
    rsmatrix [OPTIONS]

OPTIONS:
    -b, --bold <BOLD>
            Set characters bold (random still sets head to bold)

            OPTIONS: true, false, random,

            [default: random]

    -c, --charset <CHARSET>
            Set charset of characters displayed

            OPTIONS: ascii, katakana,

            [default: ascii]

    -f, --frames <FRAMES>
            Set update frequency (the higher, the faster)

            [default: 120]

    -h, --head <HEAD>
            Set color of a head character

            OPTIONS: white, red, blue, green, magenta, cyan, yellow, random, rainbow, r,g,b

            [default: white]

        --help
            Print help information

    -l, --brightness <BRIGHTNESS>
            Set brightness effect for tail

            OPTIONS: none, random, gradient

            [default: random]

    -t, --tail <TAIL>
            Set color of tail characters

            OPTIONS: white, red, blue, green, magenta, cyan, yellow, random, rainbow, r,g,b

            [default: green]

    -V, --version
            Print version information

how to run

  • clone this repo then,
cargo run
cargo run -- [OPTIONS]
  • press q while running to quit

reference

rsmatrix's People

Contributors

vlwkaos avatar

Stargazers

 avatar  avatar LoganDark avatar 邓云升 avatar

Watchers

 avatar

Forkers

simrit1

rsmatrix's Issues

add licensing information

Or your application won't be considered free software.

I can definitely recommend using the GPL-3.0.

clear screen after quit

image
Currently, it looks like this after quitting and running something else, which looks kinda cool, but is i think generally rather unwanted

Or even better, restore the previous screen, like when using vim or cmatrix, tho I don't know if that is a ncurses feature, that isn't implemented in termion.

panic when piping through anything (e.g. lolcat)

$ ~> env RUST_BACKTRACE=full cargo run | lolcat
Finished dev [unoptimized + debuginfo] target(s) in 0.09s
Running `target/debug/rsmatrix`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 25, kind: Uncategorized, message: "Inappropriate ioctl for device" }', src/main.rs:23:45
stack backtrace:
0:     0x558f169fd179 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc3295717f362dffd
1:     0x558f16a29e9e - core::fmt::write::h3fb106f148721ced
2:     0x558f16a0dbe5 - std::io::Write::write_fmt::hcd3b3704b0c53d27
3:     0x558f169fcf35 - std::sys_common::backtrace::print::hbd6a7285aab48741
4:     0x558f16a19c0f - std::panicking::default_hook::{{closure}}::h0f72cdacd638214c
5:     0x558f16a19935 - std::panicking::default_hook::hac258dc5dca473a9
6:     0x558f16a1a22f - std::panicking::rust_panic_with_hook::h2e8c0695c388bdee
7:     0x558f169fd4e9 - std::panicking::begin_panic_handler::{{closure}}::h192eca38cc2c43d2
8:     0x558f169fd2cc - std::sys_common::backtrace::__rust_end_short_backtrace::ha89f9e1a3bce7ed6
9:     0x558f16a19dc2 - rust_begin_unwind
10:     0x558f1681bb43 - core::panicking::panic_fmt::h35982a44ff3b9a81
11:     0x558f1681bf13 - core::result::unwrap_failed::h5b129c76c4e7fa25
12:     0x558f1682c0d0 - core::result::Result<T,E>::unwrap::hdb0d4ccdc0f51c74
at /build/rustc-1.67.0-src/library/core/src/result.rs:1113:23
13:     0x558f16837515 - rsmatrix::main::h9d79aa67271d1f79
at /home/qz/documents/programming/rsmatrix/src/main.rs:23:22
14:     0x558f1682ea2b - core::ops::function::FnOnce::call_once::h5e0d4bd6c1687546
at /build/rustc-1.67.0-src/library/core/src/ops/function.rs:507:5
15:     0x558f1684174e - std::sys_common::backtrace::__rust_begin_short_backtrace::hf5655ec6a326642f
at /build/rustc-1.67.0-src/library/std/src/sys_common/backtrace.rs:121:18
16:     0x558f16831ff1 - std::rt::lang_start::{{closure}}::hf5e5ac5a28667b6a
at /build/rustc-1.67.0-src/library/std/src/rt.rs:166:18
17:     0x558f16a0d064 - std::rt::lang_start_internal::hb4f207ee214b8528
18:     0x558f16831fca - std::rt::lang_start::h679e88f62834622a
at /build/rustc-1.67.0-src/library/std/src/rt.rs:165:17
19:     0x558f16837e0e - main
20:     0x7f2ae922924e - __libc_start_call_main
21:     0x7f2ae9229309 - __libc_start_main_alias_1
22:     0x558f1681c0b5 - _start
23:                0x0 - <unknown>

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.