subcmd

package
v0.0.0-...-72a4bb2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: CC-BY-4.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConvertExportedLogsCommand = &cli.Command{
	Name:   "convert-exported-logs",
	Usage:  "convert slack exported logs to API download logs",
	Action: convertExportedLogs,
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:  "indir",
			Usage: "exported log dir",
			Value: "_old_logs",
		},
		&cli.StringFlag{
			Name:  "outdir",
			Usage: "slacklog_data dir",
			Value: filepath.Join("_logdata", "slacklog_data"),
		},
	},
}

ConvertExportedLogsCommand provides "convert-exported-logs". It converts log which exported from Slack, to generator can treat.

View Source
var DownloadEmojiCommand = &cli.Command{
	Name:   "download-emoji",
	Usage:  "download customized emoji from slack",
	Action: downloadEmoji,
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:  "outdir",
			Usage: "emojis download target dir",
			Value: filepath.Join("_logdata", "emojis"),
		},
		&cli.StringFlag{
			Name:  "emojiJSON",
			Usage: "emoji json path",
			Value: filepath.Join("_logdata", "emojis", "emoji.json"),
		},
	},
}

DownloadEmojiCommand provides "download-emoji". It downloads and save emoji image files.

View Source
var DownloadFilesCommand = &cli.Command{
	Name:   "download-files",
	Usage:  "download files from slack.com",
	Action: downloadFiles,
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:  "indir",
			Usage: "slacklog_data dir",
			Value: filepath.Join("_logdata", "slacklog_data"),
		},
		&cli.StringFlag{
			Name:  "outdir",
			Usage: "files download target dir",
			Value: filepath.Join("_logdata", "files"),
		},
	},
}

DownloadFilesCommand provides "downloads-files" sub-command, it downloads and saves files which attached to message.

View Source
var GenerateHTMLCommand = &cli.Command{
	Name:   "generate-html",
	Usage:  "generate html from slacklog_data",
	Action: generateHTML,
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:  "config",
			Usage: "config.json path",
			Value: filepath.Join("scripts", "config.json"),
		},
		&cli.StringFlag{
			Name:  "templatedir",
			Usage: "templates dir",
			Value: "templates",
		},
		&cli.StringFlag{
			Name:  "filesdir",
			Usage: "files downloaded dir",
			Value: filepath.Join("_logdata", "files"),
		},
		&cli.StringFlag{
			Name:  "indir",
			Usage: "slacklog_data dir",
			Value: filepath.Join("_logdata", "slacklog_data"),
		},
		&cli.StringFlag{
			Name:  "outdir",
			Usage: "generated html target dir",
			Value: "_site",
		},
	},
}

GenerateHTMLCommand provoides "generate-html" command. It... SlackからエクスポートしたデータをHTMLに変換して出力する。

Functions

func ReadAllMessages

func ReadAllMessages(inDir string) ([]*slacklog.Message, error)

ReadAllMessages reads all message files in the directory.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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