This commit introduces a new `collect website` command that recursively downloads a website to a specified depth. - A new `pkg/website` package contains the logic for the recursive download. - A new `pkg/ui` package provides a progress bar for long-running operations, which is used by the website downloader. - The `collect pwa` subcommand has been restored to be PWA-specific.
16 lines
362 B
Go
16 lines
362 B
Go
package cmd
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// collectCmd represents the collect command
|
|
var collectCmd = &cobra.Command{
|
|
Use: "collect",
|
|
Short: "Collect a resource and store it in a DataNode.",
|
|
Long: `Collect a resource from a git repository, a website, or other URI and store it in a DataNode.`,
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(collectCmd)
|
|
}
|