MCPcopy Index your code
hub / github.com/derniercri/snatch

github.com/derniercri/snatch @0.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.1.1 ↗ · + Follow
30 symbols 44 edges 9 files 10 documented · 33% updated 8y ago0.1.1 · 2017-01-10★ 6859 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

snatch

A simple, fast and interruptable download accelerator, written in Rust

Features

  • Simple: a command line to manage easily your downloads ;
  • Fast: written in a new exciting programing language ;
  • Interruptable: you can interrupt and resume easily your downloads (SOON).

Installation

  1. Please to install Rust and Cargo using rustup, and choose the Nightly version ;
  2. Download Snatch: git clone https://github.com/derniercri/snatch ;
  3. Move in the project: cd snatch ;
  4. Install Snatch using Cargo: cargo install ;
  5. Enjoy !

Usage

Usage:
    snatch [OPTIONS]

Snatch, a simple, fast and interruptable download accelerator, written in Rust.

optional arguments:
  -h,--help             show this help message and exit
  -f,--file FILE        The local file to save the remote content file
  -t,--threads THREADS  Number of threads available to download
  -u,--url URL          Remote content URL to download
  -v,--verbose          Verbose mode

Screenshot

example

Build issues

  • fatal error: 'openssl/hmac.h' file not found
    If you are on macOS, please to install openssl and check your OpenSSL configuration:

    brew install openssl export OPENSSL_INCLUDE_DIR=brew --prefix openssl/include export OPENSSL_LIB_DIR=brew --prefix openssl/lib export DEP_OPENSSL_INCLUDE=brew --prefix openssl/include

Extension points exported contracts — how you extend this code

ValidateHttpVersion (Interface)
Trait used to check HTTP Version This trait is used to validate that a given HTTP Version match specific need. [1 implementers]
src/http_version.rs
GetContentLength (Interface)
Trait to extend functionalities of the Headers type, from `hyper` [1 implementers]
src/contentlength.rs
GetResponse (Interface)
Trait that represents some methods to send a specific request [1 implementers]
src/client.rs

Core symbols most depended-on inside this repo

get_http_response_using_headers
called by 2
src/client.rs
get_chunk_length
called by 1
src/download.rs
get_header_from_index
called by 1
src/download.rs
download_a_chunk
called by 1
src/download.rs
download_chunks
called by 1
src/download.rs
greater_than_http_11
called by 1
src/http_version.rs
get_content_length
called by 1
src/contentlength.rs
write_file
called by 1
src/write.rs

Shape

Function 22
Method 4
Interface 3
Class 1

Languages

Rust100%

Modules by API surface

src/download.rs14 symbols
tests/http_version_test.rs4 symbols
tests/write_test.rs3 symbols
src/client.rs3 symbols
src/http_version.rs2 symbols
src/contentlength.rs2 symbols
src/write.rs1 symbols
src/main.rs1 symbols

For agents

$ claude mcp add snatch \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page