wabarc / warcraft

A toolkit to help download webpage as warc file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

A toolkit to help download webpage as warc file

License:MIT License


Languages

Language:Go 76.3%Language:Makefile 23.7%