warcraft
is a toolkit to help download webpage as warc
file using wget.
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
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))
}
}
This software is released under the terms of the MIT. See the LICENSE file for details.