GithubHelp home page GithubHelp logo

gocruncher / fastget Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pgollangi/fastget

0.0 0.0 0.0 2.01 MB

⚡ A CLI tool and Go library to ultra fast download files over HTTP(S)

Home Page: https://dev.pgollangi.com/fastget/

License: MIT License

Go 100.00%

fastget's Introduction

build Go Report Card GitHub go.mod Go version GitHub release (latest by date) PkgGoDev License: MIT

FastGet

A CLI tool as well as go library to ultrafast download files over HTTP(s).

DISCLAIMER: FastGet performance heavily reliant on the network and CPU performance of the client machine. More importantly HTTP(s) endpoint must allow partial requests presenting Accept-Ranges and accepting Range headers.

Demo

fastget Demo

Usage

fastget available as Commnad-Line tool and Go library.

Commnad-Line

fastget [options] <URL_TO_DOWNLOAD>

Examples

$ fastget http://speedtest.tele2.net/10MB.zip
Download started..
3.50 MB / 3.50 MB 100 % [===========================================================================| 0s ] 267.59 KB/s
3.50 MB / 3.50 MB 100 % [===========================================================================| 0s ] 165.65 KB/s
3.50 MB / 3.50 MB 100 % [===========================================================================| 0s ] 116.10 KB/s
Download finished in 3s. File: E:\10MB.zip

Read the documentation for more information on the CLI usage.

Go Library

Here is a simple example that finds fastest hosts:

fg, err := fastget.NewFastGetter("http://speedtest.tele2.net/10MB.zip")
if err != nil {
    panic(err)
}

result, err := fg.Get()
if err != nil {
    panic(err)
}
file := result.OutputFile
elapsedTime := result.ElapsedTime

Read the API documentation for more information on the library usage.

Installation

Scoop

scoop bucket add pgollangi-bucket https://github.com/pgollangi/scoop-bucket.git
scoop install fastget

Updating:

scoop update fastget

Homebrew

brew install pgollangi/tap/fastget

Updating:

brew upgrade fastget

Go

$ go get github.com/pgollangi/fastget/cmd/fastget
$ fastget

Manual

  1. Download and install binary from the latest release.
  2. Recommended: add fastget executable to your $PATH.

Building from source

fastget CLI is written in the Go programming language, so to build the CLI yourself, you first need to have Go installed and configured on your machine.

Install Go

To download and install Go, please refer to the Go documentation. Please download Go 1.14.x or above.

Clone this repository

$ git clone https://gitlab.com/pgollangi/fastget.git
$ cd fastget

Build

$ go build cmd/fastget/main.go
$ fastget

Contributing

Thanks for considering contributing to this project!

Please read the Contributions and Code of conduct.

Feel free to open an issue or submit a pull request!

License

Copyright © Prasanna Kumar

fastget is open-sourced software licensed under the MIT license.

Author

Built with ❤ by Prasanna Kumar

fastget's People

Contributors

pgollangi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.