Skip to content

Commit

Permalink
Display batch info
Browse files Browse the repository at this point in the history
  • Loading branch information
dim13 committed May 31, 2021
1 parent cbe9519 commit 4640332
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ to plain [otpauth links](https://github.com/google/google-authenticator/wiki/Key
evaluate otps
-http string
serve http (e.g. localhost:6060)
-info
display batch info
-link string
migration link (required)
-qr
Expand Down
6 changes: 6 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func main() {
eval := flag.Bool("eval", false, "evaluate otps")
qr := flag.Bool("qr", false, "generate QR-codes")
http := flag.String("http", "", "serve http (e.g. localhost:6060)")
info := flag.Bool("info", false, "display batch info")
flag.Parse()

data, err := migrationData(*cache, *link)
Expand Down Expand Up @@ -59,6 +60,11 @@ func main() {
for _, op := range p.OtpParameters {
fmt.Printf("%06d %s\n", op.Evaluate(), op.Name)
}
case *info:
fmt.Println("version", p.Version)
fmt.Println("batch size", p.BatchSize)
fmt.Println("batch index", p.BatchIndex)
fmt.Println("batch id", p.BatchId)
default:
for _, op := range p.OtpParameters {
fmt.Println(op.URL())
Expand Down

0 comments on commit 4640332

Please sign in to comment.