| Crates.io | RustyConsoleCalculate |
| lib.rs | RustyConsoleCalculate |
| version | 0.0.2 |
| created_at | 2024-12-09 12:12:12.288964+00 |
| updated_at | 2024-12-09 12:23:06.710779+00 |
| description | A simple CLI tool for performing basic calculations. |
| homepage | |
| repository | https://github.com/archways404/RustyConsoleCalculate |
| max_upload_size | |
| id | 1477313 |
| size | 26,418 |
RCC is a versatile CLI tool designed to perform basic mathematical calculations and manage timestamps. It is lightweight, easy to use, and can handle tasks like converting timestamps, generating human-readable date-time strings, and fetching the current Unix timestamp.
RCC "1 + 2 * 3".ctz.ctr.ct.Add RCC to your project by installing it via cargo:
cargo install RustyConsoleCalculate
Clone the repository and build manually if needed:
git clone https://github.com/archways404/rcc.git
cd rcc
cargo build --release
Run the built binary:
./target/release/RCC
RCC can be used in two ways: evaluating mathematical expressions or using timestamp-related commands.
To evaluate a mathematical expression, simply pass the expression as a string:
RCC "13 + 14 * 2"
Output:
41
Use the ctz command to convert a Unix timestamp to a given timezone:
RCC ctz 1702216800 America/New_York
Output:
2024-12-09 07:00:00 -05:00
Use the ctr command to convert a Unix timestamp into a human-readable date-time in the local timezone:
RCC ctr 1702216800
Output:
2024-12-09 12:00:00
Use the ct command to fetch the current Unix timestamp:
RCC ct
Output:
1702216800
Run the --help flag to see all available options:
RCC --help
Example Output:
RCC 0.0.2
A CLI tool for performing calculations and managing timestamps
RCC is a versatile CLI tool that allows you to:
1. Perform basic mathematical calculations by providing an expression as a string, e.g., '1 + 2'.
2. Convert timestamps to a specific timezone using the 'ctz' command.
3. Translate timestamps into human-readable formats using the 'ctr' command.
4. Get the current Unix timestamp using the 'ct' command.
USAGE:
RCC [EXPRESSION] [COMMAND]
ARGS:
<EXPRESSION> Mathematical expression to evaluate, e.g., '13 + 14 * 2'
OPTIONS:
-h, --help Print help information
-V, --version Print version information
COMMANDS:
ctz Convert a Unix timestamp to a specific timezone
ctr Convert a Unix timestamp to a human-readable format
ct Get the current Unix timestamp
help Print this message or the help of the given subcommand(s)
Contributions are welcome! To contribute:
git checkout -b feature-name).git commit -m "Add feature-name").git push origin feature-name).RCC is licensed under the MIT License. See the LICENSE file for details.
Happy Calculating!