I’m a fan of Todournament by @alltom. It’s a simple to-do list that elegantly sorts your tasks by having you make binary comparisons. Do you want to Take Out Garbage first or File TPS Report first? Click which one you’re more inspired by, repeat until Todournament has enough data to put something at the top of your list, et voila. It’s a bit like the Mark Forster method. Here’s what the top of my current stack looks like:
(putting this in the forum is today’s mustdo so that’s part of “Saturday beemergencies” at the top of my list!)
Another thing I’ve been liking a lot lately is my personal private GitHub repo I call omnitask where I drop in as a GitHub issue (gissue) any crazy ideas I have. I have a freshening goal to keep it from being a black hole where ideas go to die. It’s great.
But I really wanted to combine it with Todournament to help things from omnitask bubble up to the top of my list. So here’s a hacky way to do that that I thought I’d share:
#!/bin/bash
# Fetch the titles of all open gissues and put them in macOS's clipboard
TOKE="REPLACE_ME_WITH_GITHUB_PERSONAL_ACCESS_TOKEN"
USER="REPLACE_ME_WITH_GITHUB_USERNAME"
REPO="REPLACE_ME_WITH_GITHUB_REPOSITORY_NAME"
GURL="https://api.github.com/repos"
PURL="$GURL/$USER/$REPO/issues?per_page=100&page=1"
FILE=$(mktemp)
HEAD=$(mktemp)
TITC=0 # to count how many titles we fetch
while [ -n "$PURL" ]; do
echo "Fetching $PURL"
resp=$(curl -L -s -D $HEAD \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $TOKE" \
-H "X-GitHub-Api-Version: 2022-11-28" \
$PURL)
titles=$(echo $resp | jq -r '.[] | .title')
if [ $? -ne 0 ]; then
echo "Error processing JSON"
fi
echo "$titles" >> $FILE
if [ -n "$titles" ]; then
x=$(echo "$titles" | wc -l)
TITC=$((TITC + x))
fi
# Extract next page URL from Link header
PURL=$(sed -n -e 's/.*<\(.*\)>; rel="next".*/\1/p' $HEAD)
done
cat $FILE | pbcopy
rm $FILE
rm $HEAD
echo "Voila, extracted $TITC gissue titles to your copy/paste buffer!"
(I’m not the most fluent in bash scripting and the above took me a couple hours going back and forth with GPT4 but it seems solid now. In retrospect maybe bash was a poor language choice but I was fixated on the part where it sends the tasks straight to your copy/paste buffer which seemed like a job for bash.)
Just put that in a file called omnifetch.sh, fill in your GitHub API key, and run it. Then go to Todournament and hit paste. You now have all your gissues in your task list.