neholos/numio-cli
Numio CLI is a command-line tool written in Swift to perform time calculations. It allows users to add or subtract time in the `HH:mm` or `HH` format.
β¨ Features
- Add or subtract time from a given starting time.
- Works with time inputs in the
HH:mmorHHformat. - Supports simple time operations using
+or-operators.
π₯οΈ Usage
Command Format
The CLI accepts three arguments:
numio <start-time> <operator> <add-time>- start-time: The starting time in HH:mm or HH format.
- operator: Either + or - to add or subtract time.
- add-time: The time to add or subtract in HH:mm or HH format.
Example
Add Time:
numio 12:30 + 02:15Output:
14:45Subtract Time:
numio 14:45 - 01:30Output:
13:15Error Handling
- If an invalid time format is provided, the command will output an error message.
- If an invalid operator (other than + or -) is used, an error will be thrown.
- If the time calculation fails, an error message will be displayed.
βοΈ Installation
Using Homebrew
brew tap neholos/numio
brew install numio-cliποΈ Build from Source
If you prefer to build the project yourself, follow these steps:
- Clone the repository:
``zsh git clone https://github.com/neholos/numio-cli.git ``
- Navigate to the project directory:
``zsh cd numio-cli ``
- Build the project using Swift:
``zsh swift build ``
- You can now run the executable:
``zsh .build/debug/numio ``
π€ Contributing
If you'd like to contribute to this project, feel free to fork the repository, create a branch, and submit a pull request with your changes.
π License
This project is licensed under the MIT license.
Package Metadata
Repository: neholos/numio-cli
Default branch: main
README: README.md