This package is a DLL written in Rust with interface for other languages like Python, Ruby, Perl, Go... This library implements formatted and colored messages to be written in the console. It should be used when running a procedure, script, or analysis to show statuses, errors, prompt for input, or explain what the user should do, etc...
- No requirements
- Rust
- Rust Standard library
- Cargo
- lazy_static
Source code: https://github.com/mauricelambert/PythonToolsKit/blob/main/PythonToolsKit/PrintF.py
Source code: https://github.com/mauricelambert/TerminalMessages/blob/main/src/main.rs
Download the DLL or SharedObject and executables for demonstration from Github.
git clone https://github.com/mauricelambert/TerminalMessages.git
cd TerminalMessages
cargo build --target x86_64-pc-windows-gnu --release # Windows with GNU requirements
cargo build --target x86_64-pc-windows-msvc --release # Windows default
cargo build --target x86_64-unknown-linux-gnu --release # Linux
struct ProgressBar {
char* start;
char* end;
char* character;
char* empty;
unsigned short int size;
};
print_all_state();
add_state(char* state_name, char* character_symbol, char* color);
add_rgb_state(char* state_name, char* character_symbol, unsigned char red, unsigned char green, unsigned char blue);
messagef(
char* message,
char* state_name,
unsigned char pourcent,
char* start,
char* end,
struct ProgressBar* progressbar,
unsigned char add_progressbar,
unsigned char oneline_progress
);
// message is required, others arguments are optional and can be NULL or 0
Licensed under the GPL, version 3.