项目作者: wabarc

项目描述 :
A toolkit to help download webpage as warc file
高级语言: Go
项目地址: git://github.com/wabarc/warcraft.git
创建时间: 2021-07-06T09:06:26Z
项目社区:https://github.com/wabarc/warcraft

开源协议:MIT License

下载


warcraft

warcraft is a toolkit to help download webpage as warc file using wget.

Installation

The simplest, cross-platform way is to download from GitHub Releases and place the executable file in your PATH.

Via Golang package get command

  1. go get -u github.com/wabarc/warcraft/cmd/warcraft

From gobinaries.com:

  1. $ curl -sf https://gobinaries.com/wabarc/warcraft | sh

Usage

Command-line:

  1. $ warcraft
  2. A CLI tool help download webpage as warc file using wget.
  3. Usage:
  4. warcraft [options] [url1] ... [urlN]

Go package:

  1. import (
  2. "fmt"
  3. "github.com/wabarc/warcraft"
  4. )
  5. func main() {
  6. if b, err := warcraft.NewWarcraft(nil).Download(url); err != nil {
  7. fmt.Fprintf(os.Stderr, "warcraft: %v\n", err)
  8. } else {
  9. fmt.Fprintf(os.Stdout, "%s %s\n", url, string(b))
  10. }
  11. }

License

This software is released under the terms of the MIT. See the LICENSE file for details.