Skip to content

A toolkit to help download webpage as warc file

License

Notifications You must be signed in to change notification settings

wabarc/warcraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.