Skip to content

Commit

Permalink
Improve usage and readme content
Browse files Browse the repository at this point in the history
  • Loading branch information
sylviamoss committed Feb 5, 2020
1 parent caa6d49 commit 9c5930b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 20 deletions.
17 changes: 6 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@ build:
@go build -o ~/go/bin/diceware .

build_windows:
@GOOS=windows go build -o ./pkg/diceware . \
&& zip ./pkg/diceware_windows_$(GOARCH).zip ./pkg/diceware \
&& rm ./pkg/diceware
@env GOOS=windows go build . \
&& zip ./pkg/diceware_windows_$(GOARCH).zip diceware-cli.exe \
&& rm diceware-cli.exe

build_linux:
@GOOS=linux go build -o ./pkg/diceware . \
&& zip ./pkg/diceware_linux_$(GOARCH).zip ./pkg/diceware \
&& rm ./pkg/diceware

build_macOS:
@go build -o ./pkg/diceware . \
&& zip ./pkg/diceware_macOS_$(GOARCH).zip ./pkg/diceware \
&& rm ./pkg/diceware
@env GOOS=linux go build . \
&& zip ./pkg/diceware_linux_$(GOARCH).zip diceware-cli \
&& rm diceware-cli
28 changes: 21 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,26 @@ A tool that generates strong passwords based on easily memorable words that are

## Usage
```
diceware generate [flags]
Usage:
diceware generate [flags]
Flags:
-c, --copy pbcopy password
-h, --help help for generate
--hide pbcopy and hide password. Password WON'T be printed out
-l, --lang string password language (default "en")
-s, --size int32 the amount words the password will have (default 6)
```
-c, --copy pbcopy password
-h, --help help for generate
--hide pbcopy and hide password. Password WON'T be printed out
-l, --lang string password language
available langs: en, pt (default "en")
--separator string character that separates the words,
to remove reparator use --separator=none (default " ")
-s, --size int32 the amount words the password will have (default 6)
```

## Installation Guide

Unzip the zip files to find the binaries inside the `pkg` folder.

On Unix systems, place the binaries in your favorite folder, but to access it from the command-line, you will need to add the folder path somewhere on your **PATH** variable.

See [this page](https://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux-unix) for instructions on setting the **PATH** on Linux and Mac. [This page](https://stackoverflow.com/questions/1618280/where-can-i-set-path-to-make-exe-on-windows) contains instructions for setting the **PATH** on Windows.

If you face some difficulty during the installation, please let me know by reporting an issue in this repository.
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ var rootCmd = &cobra.Command{
}

func Execute() {
generateCmd.Flags().StringVarP(&generateConfig.Lang, "lang", "l", "en", "password language")
generateCmd.Flags().StringVar(&generateConfig.Separator, "separator", " ", "character that separates the words")
generateCmd.Flags().StringVarP(&generateConfig.Lang, "lang", "l", "en", "password language\n available langs: en, pt")
generateCmd.Flags().StringVar(&generateConfig.Separator, "separator", " ", "character that separates the words,\n to remove reparator use --separator=none")
generateCmd.Flags().Int32VarP(&generateConfig.Size, "size", "s", 6, "the amount words the password will have")
generateCmd.Flags().BoolVarP(&generateConfig.Pbcopy, "copy", "c", false, "pbcopy password")
generateCmd.Flags().BoolVar(&generateConfig.Hide, "hide", false, "pbcopy and hide password. Password WON'T be printed out")
Expand Down

0 comments on commit 9c5930b

Please sign in to comment.