goris

command module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

mac-gopher

GitHub release GitHub release Code Status

goris

This goris command-line tool is mainly used to download gopher png images from an amazing Go developer Aurélie's repo. see below link:

https://github.com/scraly/gophers

Features

  • get command: Be able to download a gopher image to desktop.
  • get link command: Be able to get a gopher image link with html.
  • list command: Be able to display a list with all gopher image names.
  • view command: Be able to pop up gopher image window.

How to use

On macOS via Homebrew

Required

  • Install homebrew
  • Install chrome browser

Step1:

$ brew tap borischen0203/goris

Step2:

$ brew install goris
Run demo
list command
# show a gopher image file name list
$ goris list
[Try to get Gopher list...]
5th-element
arrow-gopher
back-to-the-future-v2
baywatch
big-bang-theory
.
.
.
get command
# download gopher image and save to desktop
$ goris get 5th-element
Try to get '5th-element' Gopher...
Perfect! Just saved in /Users/boris/desktop/5th-element.png!
 ---------------------
< 5th-element download! >
 ---------------------
        \
         \
         ,_---~~~~~----._
  _,,_,*^____      _____``*g*\"*,
 / __/ /'     ^.  /      \ ^@q   f
[  @f | @))    |  | @))   l  0 _/
 \`/   \~____ / __ \_____/    \
  |           _l__l_           I
  }          [______]           I
  ]            | | |            |
  ]             ~ ~             |
  |                            |
   |                           |
# get gopher image link
$ goris get link 5th-element
Try to Generate gopher link...
<img src="https://raw.githubusercontent.com/scraly/gophers/main/5th-element.png" alt="5th-element">
5th-element! I choose you! Paste above link in the readme!
view command
# pop up a gopher image window
$ goris view 5th-element
Pop-up 5th-element window!

Run in Docker:

Required

  • Install docker
Run process

Step1: Pull docker image(borischen0203/goris)

docker pull borischen0203/goris

Step2: Run docker image as below command

docker run -it --rm borischen0203/goris

Run in Local:

Required

brew install make
Run process

Step1: Clone the repo

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

Step2: Use make to execute makefile run build

make build

Step3: Execute build file with or with command

./goris [command]

Tech stack

  • Golang
  • Cobra
  • Docker
  • Github actions
  • Shell
Todo:
  • view command: Be able to preview gopher image.
  • get link command: Be able to generate gopher image link with html.
Reference:

https://dev.to/aurelievache/learning-go-by-examples-part-3-create-a-cli-app-in-go-1h43

Documentation

Overview

Copyright © 2021 NAME HERE <EMAIL ADDRESS>

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
Package cmd provides command for using
Package cmd provides command for using

Jump to

Keyboard shortcuts

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