Skip to content

This litclock command-line tool mainly converts numeric time to human-friendly text.

Notifications You must be signed in to change notification settings

borischen0203/litclock

Repository files navigation

back-to-the-future-v2

GitHub release

Literal clock

This litclock command-line tool mainly converts numeric time to human friendly text.

Numeric Time -> Human Friendly Text:

  • 1:00 -> One o'clock
  • 13:05 -> Five past one

Service link: https://github.com/borischen0203/litclock-service

Features

  • litclock command: Be able to convert numeric time to human text.

How to use

On macOS via Homebrew:

Step1:

brew tap borischen0203/litclock

Step2:

brew install litclock

Run in Docker:

Required

  • Install docker

Run process

Step1: Pull docker image(borischen0203/litclock)

docker pull borischen0203/litclock

Step2: Run docker image as below command

docker run -it --rm borischen0203/litclock

Docker run demo

# Display the current time in the human text without input parameter
$ docker run -it --rm borischen0203/litclock
$ Seven past two

# Display the the human text with input numeric time
$ docker run -it --rm borischen0203/litclock 15:40
$ Twenty to four

Run in Local:

Required

brew install make

Run process

Step1: Clone the repo

git clone https://github.com/borischen0203/litclock.git

Step2: Use make to execute makefile run test and build

make all

Step3: Execute build file with or without parameter

./litclock
./litclock 15:40

Local run demo

# Display the current time in the human text without input parameter
$ ./litclock
$ Seven past two

# Display the human text with input numeric time
$ ./litclock 15:40
$ Twenty to four

Tech stack

  • Golang
  • Cobra
  • Docker
  • make
  • Github actions
  • shell

Todo:

  • Release cli on Homebrew