Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tokisuno/goltime
https://github.com/tokisuno/goltime
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tokisuno/goltime
- Owner: tokisuno
- Created: 2024-05-13T17:19:32.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-15T16:13:06.000Z (8 months ago)
- Last Synced: 2024-05-16T05:07:52.464Z (8 months ago)
- Language: Go
- Size: 2.61 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Goltime (read as "goal time")
## What this is?
Goltime is a CLI tool (functionally a script) written in Go!
* used to output how many minutes are left in the given day
* script can be used with any other interface that accepts a command output as a valid form of inputThis is a simple script and the first CLI tool I have build for myself, so error-handling and testing isn't verbose and robust by any means. Creating the base script ``root.go`` is something I do whenever I am using a new language. I've been using Go recently and have been really loving it, so creating this small project was a test of mine to see if I could actually solve a problem I have in my day-to-day.
## Example
```bash
~/code/golang/goltime % ./bin/goltime | figlet
__ _ _ _
/ /_ / | || |
| '_ \| | || |_
| (_) | |__ _|
\___/|_| |_|```
## Installation
1. Download & extract the .zip contents into a folder
2. Installing
* Run the ``install.sh`` file inside of the project folderOR
* Execute ``go build -o bin/goltime main.go`` inside the project folder
3. Enjoy!## Usage
* ``goltime``: Returns minutes left until midnight in your local time
- Does not print \n to be compatible with my Qtile bar/other widgets
* ``goltime endt {TIME}``: Returns time left until user-defined endpoint
- Time must be written in HHMM format (ex. 1430)
- Time must be set in the future
* Rejects time that's in the past (for now, read TODO)# TODO
- [ ] Finish endt
- [ ] Don't crash when the user's input has reached past the "goal time"
- [ ] Add option to display string with text
- [ ] Default: ("{minutes} minutes left")
- [ ] Roll over until new start time (default: 00:00)
- [ ] Add option to output with newline