go-pinch

command module
v0.0.0-...-7418a84 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2014 License: MIT Imports: 4 Imported by: 0

README

Go Pinch

GoDoc

Retrieve a file from inside a zip archive, over the network!

Pinch makes it possible to download a specific file from within a ZIP archive over HTTP/1.1, using nothing but the Go Standard Library (net/http and compress/flate)

Earlier versions were written in Objective-C, Ruby and Java

STATUS: Working, but in active development :)

Installation

go get -u github.com/peterhellberg/go-pinch

Usage

$ go-pinch http://example/path/to.zip file.json

Or from Go directly:

package main

import (
	"github.com/peterhellberg/go-pinch/pinch"
	"os"
)

func main() {
	file, _ := pinch.Get("http://peterhellberg.github.com/pinch/test.zip", "data.json")

	os.Stdout.Write(file)
}

Documentation

Overview

Retrieve a file from inside a zip file, over the network!

Pinch makes it possible to download a specific file from within a ZIP file over HTTP/1.1, using nothing but the Go Standard Library.

(http://golang.org/pkg/net/http/ and http://golang.org/pkg/compress/flate/)

Earlier versions were written in Objective-C and Ruby.

Installation

Just go get it:

go get -u github.com/peterhellberg/go-pinch

Usage

You get a list of files if you only pass a URL:

go-pinch http://example/path/to.zip

In order to pinch one of the files in the ZIP:

go-pinch http://example/path/to.zip file.json > file.json

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL