gocharm

command module
v1.3.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

Gocharm

Quality gate

CircleCI Build

A personal project to learn how to make a cli with cobra and go.

Make your terminal life easier.

Installation

To install, clone the repo then simply run:

$ make

Let it finish, then:

$ echo 'export PATH="$HOME/go/bin:$PATH"' >> ~/.bash_profile

If you don't have make installed in your machine, then search Google.

Hint: If you're on 'Windows' then install choco, then run:

choco install make

Hint: If you are using termux, just run:

$ pkg install make

Usage

The 'main' command is gocharm, there are currently two commands (There will be more), a list:

  1. time
  2. tasks

Each one with his own functionality.

Time Command

This command displays the REAL TIME of any city you want, for example:

$ gocharm time -t "America/New_York" -1

The "-t" flag tells gocharm what city to look the time of, like the timezone.

The "-1" flag tells gocharm to display the time in 12-Hour Format

Compare Subcommand

There's a subcommand of time that lets you display the time of two different timezones. The Compare Command.

$ gocharm time compare

If don't provide any flag, gocharm will prompt for Timezone 1 and Timezone 2.

Tasks Command

The tasks command is a small and simple task manager, it lets you add and save tasks to a file in your systems, so if you prompted title wrong you can go and modify it.

$ gocharm tasks {<subcommand>}

Here's a list of all subcommands:

  1. add
  2. list
  3. view
  4. complete

Add subcommand

This subcommand is used to add a new task and save it, have a look at it:

$ gocharm tasks add -t "{<Task Title>}"

This will save the task on the .gocharm.yml file that has been created when you executed 'make'.

NOTE:The file is not always yaml, you will be prompted for the file type.

List subcommand

This subcommand is used to list every single one of your tasks. Look it:

$ gocharm tasks list

For the sake of demonstration, I will show you the output:

✓. {<Task Title>}  // Completed
2. {<Other Task Title>}  // Pending

If completed will show a sign and that comment telling you that the task is completed, if the task is not completed it will show the task number.

View subcommand

This subcommand is used to view a single task, Behold the subcommand:

$ gocharm tasks view {<Task Number>}

It will show you the title and the status.

Complete subcommand

This command is used to mark tasks as completed, Look at his terminal eyes:

$ gocharm tasks complete {<Task Number>}

And that's it, the rest of commands will be documented in this file.

Documentation

Overview

Copyright © 2020 DJBlueSlime

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL