Making a command-line tool for your Frogtab personal link
Frogtab is a browser-based task manager I built to help me stay organized at work. Frogtab can't sync data between devices, but it's possible to register for a personal link that you can use to send tasks to Frogtab from any device.
This post explains how to send tasks to Frogtab via a terminal instead of your personal link.
To customize this post for your personal link, enter your personal link:
If you don't have a personal link, see Registering for a personal link.
Prerequisites
You'll need a UNIX-like environment (e.g., macOS or a Linux distribution) with the following commands:
gpg
(GnuPG) - If you don't have GnuPG, see https://gnupg.org/download/index.htmlcurl
- If you don't have curl, see https://curl.se/download.htmljq
- If you don't have jq, see https://jqlang.github.io/jq/download/
Step 1 - Import your public key into GnuPG
Download your public key:
curl https://frogtab.com/key_00ee411a-5702-4c8d-ac35-74cf7376acb7.asc > frogtab.asc
where
00ee411a-5702-4c8d-ac35-74cf7376acb7
is the ID from your personal link.Import the key:
gpg --import frogtab.asc
GnuPG displays the message
public key "Frogtab (4c0-c38)" imported
.Change the trust level of the key:
gpg --edit-key "Frogtab (4c0-c38)" gpg> trust gpg> 5 gpg> quit
Setting trust level 5 enables GnuPG to use the key without asking you for confirmation each time.
Here's a demo of the procedure:
Step 2 - Make a tool to send tasks to Frogtab
Create a file called send.sh with the following contents:
#!/bin/sh ID="00ee411a-5702-4c8d-ac35-74cf7376acb7" KEY="Frogtab (4c0-c38)" TASK="$1" if [ -z "$TASK" ]; then echo "Error: No task" >&2 exit 1 fi ENCRYPTED_TASK="$(echo "$TASK" | gpg --armor --encrypt --recipient "$KEY")" if [ $? -ne 0 ]; then echo "Error: gpg error" >&2 exit 1 fi POST_URL=https://frogtab.com/open/post-add-message POST_TYPE="Content-Type: application/json" POST_BODY="$(jq -n --arg p1 "$ID" --arg p2 "$ENCRYPTED_TASK" '{user_id: $p1, message: $p2}')" curl -s -X POST -H "$POST_TYPE" -d "$POST_BODY" "$POST_URL" | jq -e '.success == true' > /dev/null if [ $? -ne 0 ]; then echo "Error: Unable to send task" >&2 exit 1 fi
Run
chmod +x send.sh
to make send.sh executable.
You can then send tasks to Frogtab by running send.sh. For example:
./send.sh "Record a new product demo"