Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.08 KB

README.md

File metadata and controls

53 lines (36 loc) · 1.08 KB

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

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

From gobinaries.com:

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

Usage

Command-line:

$ warcraft
A CLI tool help download webpage as warc file using wget.

Usage:

  warcraft [options] [url1] ... [urlN]

Go package:

import (
        "fmt"

        "github.com/wabarc/warcraft"
)

func main() {
        if b, err := warcraft.NewWarcraft(nil).Download(url); err != nil {
            fmt.Fprintf(os.Stderr, "warcraft: %v\n", err)
        } else {
            fmt.Fprintf(os.Stdout, "%s  %s\n", url, string(b))
        }
}

License

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