claw

package
v0.0.0-...-d039ecd Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = cli.Command{

	Name:    "claw",
	Aliases: []string{"c"},
	Usage:   "get whole wesite pages",
	Flags: []cli.Flag{
		cli.StringFlag{
			Name:  "url, u",
			Value: "",
			Usage: "main page's url",
		},
		cli.UintFlag{
			Name:  "timeout, t",
			Value: 5,
			Usage: "timeout by second",
		},
		cli.Uint64Flag{
			Name:  "retry, r",
			Value: 3,
			Usage: "retry times",
		},
		cli.Float64Flag{
			Name:  "sleep, s",
			Value: 0.2,
			Usage: "sleep by second",
		},
		cli.StringFlag{
			Name:  "book, b",
			Value: "",
			Usage: "book's name, default by pate's title",
		},
		cli.StringFlag{
			Name:  "format, f",
			Value: "epub",
			Usage: "book's format, like: epub",
		},
	},
	Action: func(c *cli.Context) error {
		url := c.String("url")
		if len(url) == 0 {
			cli.ShowCommandHelp(c, "claw")
			return nil
		}
		return claw(url)
	},
}

Command claw

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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