Giter Site home page Giter Site logo

gemini-dl's Introduction

gemini-dl

CLI batch downloader for Gemini protocol, inspired by wget and yt-dlp tools

At this moment, project under development, some features already implemented and testing (feedback | PR)

Interface

gemini-dl

Components

Features

  • Grab single URL or --crawl entire capsule
  • Multiple MIME types download (e.g. inline images and other media)
  • Detailed crawler log for every request + totals
  • Flexible options
    • Custom --delay between requests
    • Custom --index filename for directories
    • Custom storage location
      • Filesystem
      • FTP
    • Optional links replacement for local navigation
      • Relative (default)
      • Absolute (--absolute)
      • Original (--keep)
    • --match regex URL
    • --unique snap version or sync with existing copy
    • Configurable redirect levels to --follow
    • Crawl depth --level limit
    • Document size limit to download
    • Follow --external links on crawl

Environment

apt install git composer php-fpm php-mbstring

Install

  • git clone https://github.com/YGGverse/gemini-dl.git
  • cd gemini-dl
  • composer update
  • chmod +x src/gemini-dl.php (for direct execution only)

Usage

src/gemini-dl.php --source gemini://.. --target /path/to/download
  • alternatively, launch with specified php version /path/to/php src/gemini-dl.php

Options

# Required

-s, --source   - string, gemini protocol address
-t, --target   - string, absolute path to destination folder

# Optional

-a, --absolute - no value, links to absolute filepath (ignored on --keep), disabled by default
-c, --crawl    - no value, crawl document links (entire capsule download), disabled by default
-d, --delay    - integer, pause between requests to prevent abuse (seconds), 1 by default
-i, --index    - string, index filename of directory listing, index.gmi by default
-h, --help     - no value, show available commands
-k, --keep     - no value, keep original links (--crawl mode only), disabled by default
-m, --match    - string, collect links match regex rule, /.*/ by default
-r, --raw      - no value, include meta headers (--keep option ignored), disabled by default
-u, --unique   - no value, append snap version as folder timestamp, disabled by default

# Experimental (in development)

-e, --external - no value, follow external hosts, disabled by default
-f, --follow   - integer, follow redirects on --crawl, 0 by default
-l, --level    - integer, depth to --crawl, 0 by default
  • show in CLI: gemini-dl.php --help

gemini-dl's People

Contributors

d47081 avatar

Watchers

 avatar  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.