Skip to content

Commit

Permalink
Dotting
Browse files Browse the repository at this point in the history
  • Loading branch information
pepa65 committed Nov 18, 2024
1 parent c6e42d2 commit 069461a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="https://raw.githubusercontent.com/pepa65/twofat/master/twofat.png" width="96" alt="twofat icon" align="right">

## Manage TOTPs from CLI
* **v2.1.0**
* **v2.1.1**
* Repo: [github.com/pepa65/twofat](https://github.com/pepa65/twofat)
* After: [github.com/slandx/tfat](https://github.com/slandx/tfat)
* Contact: github.com/pepa65
Expand Down Expand Up @@ -55,16 +55,16 @@ CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o twofat.exe

## Usage
```
twofat v2.0.7 - Manage TOTPs from CLI
twofat v2.1.1 - Manage TOTPs from CLI
The CLI is interactive & colorful, output to Stderr. Password can be piped in.
When output is redirected, only pertinent plain text is sent to Stdout.
* Repo: github.com/pepa65/twofat <pepa65@passchier.net>
* Data file: ~/.twofat.enc (default, depends on the binary's name)
* Datafile: ~/.twofat.enc (default, depends on the binary's name)
* Usage: twofat [COMMAND] [ -d | --datafile DATAFILE ]
== COMMAND:
[ show | view ] [[-c|--case] REGEX]
[ show | view ] [REGEX [ -c | --case ]]
Display all TOTPs with NAMEs [matching REGEX] (show/view is optional).
list | ls [[-c|--case] REGEX]
list | ls [REGEX [ -c | --case ]]
List all NAMEs [matching REGEX].
add | insert | entry NAME [TOTP-OPTIONS] [ -f | --force ] [SECRET]
Add a new entry NAME with SECRET (queried when not given).
Expand All @@ -84,10 +84,10 @@ clip | copy | cp NAME Put TOTP of entry NAME onto the clipboard.
password | passwd | pw Change datafile encryption password.
version | --version | -V Show version.
help | --help | -h Show this help text.
== REGEX: Optional, case-insensitive matching (unless if -c/--case given)
== REGEX: Optional, case-insensitive matching (unless -c/--case is given).
== TOTP-OPTIONS:
-s | --size LENGTH TOTP length: 5-8 (default: 6)
-a | --algorithm HASH Hash algorithm: SHA1/SHA256/SHA512 (default: SHA1)
-s | --size LENGTH TOTP length: 5-8 (default: 6).
-a | --algorithm HASH Hash algorithm: SHA1/SHA256/SHA512 (default: SHA1).
```

### Import/Export data
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
)

const (
version = "2.1.0"
version = "2.1.1"
maxNameLen = 20
period = 30
)
Expand Down Expand Up @@ -919,8 +919,8 @@ func usage(err string) {
green + "help" + def + " | " + green + "--help" + def + " | " + green + "-h" + def + " Show this help text.\n" +
" == " + blue + "REGEX" + def + ": Optional, case-insensitive matching (unless " + yellow + "-c" + def + "/" + yellow + "--case" + def + " is given).\n" +
" == " + yellow + "TOTP-OPTIONS" + def + ":\n" +
yellow + "-s" + def + " | " + yellow + "--size " + cyan + "LENGTH" + def + " TOTP length: " + cyan + "5" + def + "-" + cyan + "8" + def + " (default: " + cyan + "6" + def + ")\n" +
yellow + "-a" + def + " | " + yellow + "--algorithm " + cyan + "HASH" + def + " Hash algorithm: " + cyan + "SHA1" + def + "/" + cyan + "SHA256" + def + "/" + cyan + "SHA512" + def +" (default: " + cyan + "SHA1" + def + ")"
yellow + "-s" + def + " | " + yellow + "--size " + cyan + "LENGTH" + def + " TOTP length: " + cyan + "5" + def + "-" + cyan + "8" + def + " (default: " + cyan + "6" + def + ").\n" +
yellow + "-a" + def + " | " + yellow + "--algorithm " + cyan + "HASH" + def + " Hash algorithm: " + cyan + "SHA1" + def + "/" + cyan + "SHA256" + def + "/" + cyan + "SHA512" + def +" (default: " + cyan + "SHA1" + def + ")."
fmt.Fprintln(os.Stderr, help)
if err != "" {
fmt.Fprintln(os.Stderr, red+"Abort: "+err)
Expand Down

0 comments on commit 069461a

Please sign in to comment.