No activity today, make something!
tank-notes Privateer
Drop binaries into your tank here.

20140322125038 cdent  

Privateer is a plugin for tidldyweb that makes it possible to generate a special URI for a private tiddler that allows access without requiring authentication. The idea is that if you have some private content you would like to share with one person, you mint a special URI for them.

The access only works for GET requests and only for the one URI.

The first version of privateer was used on Tiddlyspace. That space provides information on the API.

Below is a simple script for pasting content to a tank and then returning a privateer URI. You will need to generate an API auth key.


# curl up the business for doing the whatsits

KEY='Your API Key Here'

BAG=${3:-Your Bag Here}

CONTENT=`echo; echo; cat`


STATUS=`curl --silent /tmp/curlout -w %{http_code} -X PUT -H "X-Tank-Key: $KEY" \
    -H "Content-Type: text/plain" \
    --data-binary "type: text/plain$CONTENT" \

if [ "$STATUS" = "000201" ] || [ "$STATUS" = "000204" ]
    curl -s -i -X POST -H "X-Tank-Key: $KEY" -H "Content-Type: application/json" \
        --data-binary "{\"uri\": \"$URL\"}" \
        $HOST/_ |grep '^Location:'
    echo $STATUS
    exit 1