The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Titan

This is a script to upload content to a Titan-enabled site like Gemini Wiki. It takes a varying number of arguments:

--url=URL specifies the Titan URL to use; this should be really similar to the Gemini URL you used to read the page.

--token=TOKEN specifies the token to use; this is optional but spammers and vandals basically ensured that any site out on the Internet needs some sort of protection; how to get a token depends on the site you're editing.

--mime=MIMETYPE specifies the MIME type to send to the server. If you don't specify a MIME type, the file utility is used to determine the MIME type of the file you're uploading.

FILES... are the files to upload, if any; this is optional: you can also use a pipe, or type a few words by hand (terminating it with a Ctrl-D, the end of transmission byte).

Note that if you specify multiple files, the URL must end in a slash and all the filenames are used as page names. So, uploading Alex.gmi and Berta.gmi to titan://localhost/ will create gemini://localhost/Alex and gemini://localhost/Berta.

The following two options control the use of client certificates:

--cert_file=FILE specifies an optional client certificate to use; if you don't specify one, the default is to try to use client-cert.pem in the current directory.

--key_file=FILE specifies an optional client certificate key to use; if you don't specify one, the default is to try to use client-key.pem in the current directory.

Usage:

    echo "This is my test." > test.txt
    titan --url=titan://transjovian.org/test/raw/testing --token=hello text.txt

Or from a pipe:

    echo "This is my test." \
      | titan --url=titan://transjovian.org/test/raw/testing --token=hello