mirror of
https://github.com/YGGverse/gemini-dl.git
synced 2026-03-31 09:05:31 +00:00
Batch downloader for Gemini protocol
| .gitignore | ||
| composer.json | ||
| help.gmi | ||
| LICENSE | ||
| README.md | ||
gemini-dl
CLI downloader for Gemini protocol, inspired by wget and yt-dlp tools
At this moment, project under development, some features already implemented and testing (send feedback | PR)
Interface
Components
- gemini-php - Client for Gemini protocol
- gemtext-php - Parser for Gemtext
- net-php - Network toolkit for URL operations
- php-cli-colors - CLI colors
Features
- Grab single URL or entire capsule for offline reading
- Multiple MIME download support
- Crawler log for every request
- Flexible options
- Custom delay between requests
- Custom index filename for directories
- Custom storage location
- Filesystem
- FTP
- Optional URL replacement to relative URI
- Recursive crawler
- Regex URL rules
- Unique snap version support or sync by default
- Configurable redirect levels to follow
- Crawl depth levels limit
- Document size limit
- Follow external links on crawl
Environment
apt install git composer php-fpm php-mbstring
Install
git clonecd gemini-dlcomposer updatechmod +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
-c, --crawl - no value, crawl document links (entire capsule download), disabled by default
-d, --delay - integer, pause between requests (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
- Manual:
gemini-dl.php --help