Skip to content

Commit

Permalink
add man
Browse files Browse the repository at this point in the history
  • Loading branch information
rusq committed Oct 24, 2022
1 parent 577f8bb commit e49e96c
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 9 deletions.
13 changes: 6 additions & 7 deletions cmd/slackdump/internal/golang/base/base.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Package base defines shared basic pieces of the slackdump command.
//
// The command subsystem is based on golang's `go` command implementation, which
// is BSD-licensed:
// This package is based on the Golang source code with some modifications.
//
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package base defines shared basic pieces of the slackdump command.
package base

import (
Expand Down
2 changes: 1 addition & 1 deletion cmd/slackdump/internal/golang/help/help.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 rusq, GPL 3.0.
// This package is based on the Golang source code with some modifications.
//
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
Expand Down
6 changes: 6 additions & 0 deletions cmd/slackdump/internal/golang/help/templates.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// This package is based on the Golang source code with some modifications.
//
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package help

var (
Expand Down
42 changes: 42 additions & 0 deletions cmd/slackdump/internal/man/login.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package man

import "github.com/rusq/slackdump/v2/cmd/slackdump/internal/golang/base"

var ManLogin = &base.Command{
UsageLine: "login",
Short: "login related information",
Long: `
# Login #
Slackdump supports the following login methods:
Automatic:
- Browser authentication (EZ-Login 3000);
Manual:
- Login with Client Token and Cookie;
- Login with Client Token and Cookie file, exported from your browser;
- Login with Legacy, Application or Bot Token (no cookie needed).
## EZ-Login 3000 ##
If the token flag is not specified, Slackdump starts the EZ-Login 3000. The
process of login is as follows:
- You will be asked the Slack workspace name that you wish to login to;
- After you have entered the workspace name, the browser will open. This
browser has nothing to do with the browser on your device, so there are
no stored passwords or history;
- Once you entered the correct username and password, the Slack login process
begins;
- The browser will close automatically, and the Token and Cookies are
captured.
After this, if you have provided a command to run, it will start exectuion,
otherwise, if no commands are given, an interactive menu of Slackdump Wizard
displayed.
`,
}
2 changes: 1 addition & 1 deletion cmd/slackdump/internal/v1/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var CmdV1 = &base.Command{
Short: "slackdump legacy mode",
CustomFlags: true,
Long: `
V1 starts slackdump in legacy mode, that supports all legacy flags.
v1 command starts slackdump in legacy mode, that supports all legacy flags.
`,
}

Expand Down
3 changes: 3 additions & 0 deletions cmd/slackdump/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/golang/base"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/golang/help"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/list"
"github.com/rusq/slackdump/v2/cmd/slackdump/internal/man"
v1 "github.com/rusq/slackdump/v2/cmd/slackdump/internal/v1"
"github.com/rusq/tracer"
)
Expand All @@ -20,6 +21,8 @@ func init() {
base.Slackdump.Commands = []*base.Command{
v1.CmdV1,
list.CmdList,

man.ManLogin,
}
}

Expand Down

0 comments on commit e49e96c

Please sign in to comment.