#!/bin/bash

action=$1
shift

[ "$text" = "usage" ] && {
    echo "Customized Notion done:"
    echo "This will call the default done and "
    echo "move all the cards in Notion Task List to Done"
    echo "by NOTION_TASK_LIST_URL=''"
    echo "based on todo.sh task id."
    echo "todo.sh ndo 1 2 3"
    exit
}

[ "$action" = "ndo" ] && {
    for i in $@; do
        todo.sh ls $i | head -1 | cut -d ' ' -f2- | todonotion done
        todo.sh done $i
    done
}
