gemini - a command line client for the Gemini protocol
gemini [--help] [--force] [--verbose] [--cert_file=filename --key_file=filename] URL
This is a very simple client. All it does is print the response. The header is printed to standard error so the rest can be redirected to get just the content.
Usage:
gemini gemini://alexschroeder.ch/Test
Download an image:
gemini gemini://alexschroeder.ch:1965/do/gallery/2016-aminona/thumbs/Bisse_de_Tsittoret.jpg \ > Bisse_de_Tsittoret.jpg
Download all the images on a page:
for url in $(./gemini gemini://alexschroeder.ch:1965/do/gallery/2016-aminona \ | grep thumbs | cut --delimiter=' ' --fields=2); do echo $url ./gemini "$url" > $(basename "$url") done
In the shell script above, the first call to gemini gets the page with all the links, grep then filters for the links to thumbnails, extract the URL using cut (assuming a space between "=>" and the URL), and download each URL, and save the output in the filename indicated by the URL.
When the script downloads binary data, then it won't print it to a terminal unless you use --force; redirecting binary data to a file or piping it to some other script is fine, though.
--force
Use --verbose to see what URL the script is requesting. This is useful when debugging issues around decoding and encoding.
--verbose
You can provide a certificate and a key file:
gemini --cert_file=cert.pem --key_file=key.pem \ gemini://campaignwiki.org/play/ijirait
To install App::Phoebe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Phoebe
CPAN shell
perl -MCPAN -e shell install App::Phoebe
For more information on module installation, please visit the detailed CPAN module installation guide.