Giter Club home page Giter Club logo

uget's Introduction

uget (universal get)

Travis Build Status

Table of contents

  1. Introduction
  2. Getting started
  3. Installation
  4. Code examples
  5. CLI
  6. Contributing
  7. Reporting bugs

1. Introduction

This project aims at providing an API / CLI for downloading remote files, focusing mainly on premium file-hosters.

This repository holds the core project and aims to be very flexible. Check out the supported providers at the other repository

WARNING: This package is under heavy development, so documentation may fall behind and the APIs may change.

2. Getting started

2.1 Installation

It's simple! Install Go, setup your $GOPATH and run:
go install github.com/uget/uget

2.2 Library usage

It's best to check out the cli code for examples.

Downloading a multitude of links:

import "github.com/uget/uget/core"

// First, get your links from somewhere:
urls := ...
// Then, create a new downloader:
downloader := core.NewClient()
// Add those links to the downloader's queue:
waitGroup := downloader.AddURLs(urls)
// Register some callbacks:
downloader.OnDownload(func(download *core.Download) {
	// Access the File field:
	download.File.Name()
	download.File.URL()
	download.File.Length()

	// hashObject is a hash.Hash used for generating a checksum
	checksum, algorithmName, hashObject := download.File.Checksum()

	// the provider, e.g. basic / imgur.com / uploaded.net / oboom.com etc.
	// see a list of all providers at https://github.com/uget/providers
	download.File.Provider()

	// wait for download to finish:
	download.Wait()
	// and get the error if there was one:
	download.Err()

	// OR: print download status every second

	interval := 1*time.Second
	ticker := time.NewTicker(interval)
	defer ticker.Stop()

	fmt.Printf("%s: started\n", download.File.Name())
	for {
		select {
		case <-ticker.C:
			percentage := download.Progress() / download.File.Size()
			fmt.Printf("  %s: %.2f%% of %d\n", download.File.Name(), percentage, download.File.Size())
		case <-download.Waiter():
			if download.Err() != nil {
				fmt.Printf("  %s: ERROR! %v\n", download.File.Name(), download.Err())
			} else {
				fmt.Printf("  %s: DONE!\n", download.File.Name())
			}
			return
		}
	}
})
// Start client (in the background)
downloader.Start()

// Wait for the jobs provided earlier to finish
waitGroup.Wait()

// No downloads left, all jobs done.

2.3 CLI

Implemented

Get remote files:

uget get CONTAINER_SPEC...

Read meta information on remote files:

uget meta CONTAINER_SPEC...

CONTAINER_SPEC can be a plain file with a list of URLs. If option -i is passed, the arguments are interpreted as direct URLs instead.

Add an account to a provider. You will be prompted for your credentials.

uget accounts add [PROVIDER]

List your saved accounts.

uget accounts list [PROVIDER]

Not (fully) implemented yet

Start server as daemon.

uget daemon

Start server in foreground.

uget server

Push a list of files to the listening server.

uget push [OPTIONS...] CONTAINER_SPEC...

Tell the daemon to drop a container (or a file)

uget drop [ID]

Pause the daemon.

uget pause [--soft]

Continue the daemon.

uget continue

List the downloads.

uget list [CONTAINER_ID]

3. Contributing

Contributions are welcome! Fork -> Push -> Pull request.

4. Bug report / suggestions

Just create an issue! I will try to reply as soon as possible.

uget's People

Contributors

jbuchbinder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

uget's Issues

[Serious Bug] uGet's Sudden Crash

[Test Platform] : [Debian & Arch] Linux

[Bug] : If trying to sort download list when the download is running - uGet get crashed and stops totally itself. After crash if I start uGet it resumes downloading. When finished the downloaded file becomes corrupts and checksums are not same for the original file through it resumes download from the last position where from it had crashed.

Some questions.

First, how to automatically update tracker?

Second, I am using uget 2.2.2 on windows.In the beginning, I choose ''add a torrent'' but uget can't identify the torrent file. Then I open torrent with uget, uget show the url is the path of torrent, but it can not download the file. Then I open it with aria2 directly, it is fast.

F-Droid Release

Please publish uGet on F-Droid to allow Android users to download uGet without Google Play Store and receive updates without having to reinstall the app.

Uget crash when i download four file.

I am sorry, my English is poor. I will try my best to describe the problem .I install uget from centos yum.
Uget is a powerful free software ,however,when i download 4 file at the same time. The uget was crash,it broken, i have to kill it.

Proxy Setting in Uget

how to set proxy for one time and download with same proxy settings?
I can't set that for every download. Sick of doing that.

👎

HTTPS Proxy not working

The settings does not have HTTPS option and it doesn't work with HTTPS proxy set as HTTP.

Can HTTPS proxy be used?

[Suggestion] Change duplicate file handling

Currently, duplicate files are handled like this:

image.png
image.png.0
image.png.1
image.png.2
image.png.3

This does not work well, for Windows especially, because of file format associations. I end up having to use a renamer program to fix it.

I would instead like to see it handled in the following way.

image.png
image.2.png
image.3.png
image.4.png
image.5.png

0 and 1 are skipped for greater clarity, so it's more obvious that image.2.png is the first duplicate, not the third.

We've detected that you are somehow running a version that doesn't exist yet

We've detected that you are somehow running a version that doesn't exist yet. How did you do that? That's Impressive! It could be some kind of error though so just in case, visit our Help page for assistance to figure out what's going on.

名稱                   : uget
版本                   : 2.2.0-1
描述                   : GTK+ download manager featuring download classification and HTML import
硬體架構               : x86_64
URL                    : http://ugetdm.com/
軟體授權               : LGPL
群組                   : 無
它提供                 : 無
它依賴                 : libnotify  gtk3  gstreamer  curl
可選依賴               : aria2: alternative backend
需要它                 : 無
為這些軟體包的可選依賴 : 無
與它衝突               : 無
它會取代               : 無
安裝後大小             : 1355.00 KiB
打包者                 : Balló György <[email protected]>
建置日期               : 西元2018年01月10日 (週三) 06時24分55秒
安裝日期               : 西元2018年01月10日 (週三) 10時41分51秒
安裝原因               : 單獨指定安裝
安裝指令稿             : 否
驗證者                 : 簽章

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.