Giter VIP home page Giter VIP logo

gfile's Introduction

PyPI Version

gfile

A python CLI/module to download and upload from gigafile.

Note: PyPI package name is gigafile since gfile wasn't available. Both CLI and module names are still gfile.

A major update from the original. Highlights:

  • Fixed multi-thread uploading (and made sure each threads finish in order so the final file is not broken)
  • Fixed download filename issue
  • Some refactoring and QoL changes.

Install

$ pip install -U gigafile

or

$ pip install -U git+https://github.com/fireattack/gfile.git

Usage

CLI

$ gfile upload path/to/file

$ gfile download https://66.gigafile.nu/0320-b36ec21d4a56b143537e12df7388a5367

$ gfile -h
usage: Gfile [-h] [-p] [-o OUTPUT] [--aria2 [ARIA2]] [-n THREAD_NUM] [-s CHUNK_SIZE] [-m CHUNK_COPY_SIZE] [-t TIMEOUT] {download,upload} uri

positional arguments:
  {download,upload}     upload or download
  uri                   filename to upload or url to download

options:
  -h, --help            show this help message and exit
  -p, --hide-progress   hide progress bar
  -o OUTPUT, --output OUTPUT
                        output filename for download (default: use original name)
  --aria2 [ARIA2]       download with aria2. You can also specify optional arguments (default: "-x10 -s10", make sure to quote). `-o` is already automatically included.
  -n THREAD_NUM, --thread-num THREAD_NUM
                        number of threads used for upload [default: 8]
  -s CHUNK_SIZE, --chunk-size CHUNK_SIZE
                        chunk size per upload in bytes; note: chunk_size*thread will be loaded into memory [default: 100MB]
  -m CHUNK_COPY_SIZE, --copy-size CHUNK_COPY_SIZE
                        specifies size to copy the main file into pieces [default: 1MB]
  -t TIMEOUT, --timeout TIMEOUT
                        specifies timeout time (in seconds) [default: 10]

Module

Import

from gfile import GFile

Download

filename = GFile('https://XX.gigafile.nu/YYY').download()

Upload

url = GFile('path/to/file', progress=True).upload().get_download_page()

gfile's People

Contributors

fireattack avatar sraq-zit avatar impeekaboo 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.