task_cli/out

1751 lines
57 KiB
Plaintext
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

+ trap 'exit 1' TERM
+ export MYPID=76683
+ MYPID=76683
+ BOLD='\033[1m'
+ ITALIC='\033[3m'
+ STRIKE='\033[9m'
+ PLAIN='\033[0m'
+ UNDERLINE='\033[4m'
+ RED='\033[31m'
+ MAGENTA='\033[35m'
+ GREEN='\033[32m'
+ YELLOW='\033[33m'
+ BLUE='\033[34m'
+ CYAN='\033[36m'
+ GREY='\033[2;37m'
+ LINK='\033[34m\033[4m'
+ brack='\033[36m'
+ brackfold='\033[36m'
+ HILITE='\033[43;1m'
+ GREYBG='\033[48;2;30;30;30m'
+ TOPTITLE='\033[44;1m'
+ LEFTTITLE='\033[31;1m'
+ FOLDBG=
+ VDIRSYNCER=/usr/local/bin/vdirsyncer
+ DEFAULT_VDS_LOCAL=cal_local
+ DEFAULT_VDS_REMOTE=cal_remote
+ basedir=/Users/rpearce/code/task_cli
+ confdir=/Users/rpearce/.task_cli
+ allcalsdir=/Users/rpearce/.task_cli/allcals
+ defaultcalfile=/Users/rpearce/.task_cli/defaultcal
+ idfile=/Users/rpearce/.task_cli/idmappings
+ nextid=1
+ indent=0
+ indentamt=4
+ needsave=0
+ mode=list
+ modes_that_support_all=
+ passive_modes=
+ vdirsyncdir=/Users/rpearce/.config/vdirsyncer
+ vdircaldir=/Users/rpearce/.config/vdirsyncer/calendar
+ vdirstatdir=/Users/rpearce/.config/vdirsyncer/status
+ vdirsyncconfig=/Users/rpearce/.config/vdirsyncer/config
+ printed=0
++ tput lines
+ rows=24
+ addcmd list 'list [id1] .. [idX]' 'List [just the specified] tasks' 'list|ls|show' SUPPORTS_ALL PASSIVE
+ local cmd usage desc alts
+ cmd=list
+ usage='list [id1] .. [idX]'
+ desc='List [just the specified] tasks'
+ alts='list|ls|show'
+ [[ -z '' ]]
+ valid_modes=list
+ eval 'usage_list="list [id1] .. [idX]"'
++ usage_list='list [id1] .. [idX]'
+ eval 'desc_list="List [just the specified] tasks"'
++ desc_list='List [just the specified] tasks'
+ eval 'words_list="list|ls|show"'
++ words_list='list|ls|show'
+ [[ list list [id1] .. [idX] List [just the specified] tasks list|ls|show SUPPORTS_ALL PASSIVE == *SUPPORTS_ALL* ]]
+ [[ -z '' ]]
+ modes_that_support_all=list
+ [[ list list [id1] .. [idX] List [just the specified] tasks list|ls|show SUPPORTS_ALL PASSIVE == *PASSIVE* ]]
+ [[ -z '' ]]
+ passive_modes=list
+ addcmd fold 'fold <id>' 'Fold a parent task (hide its children)' 'fold|f|zc' SUPPORTS_ALL
+ local cmd usage desc alts
+ cmd=fold
+ usage='fold <id>'
+ desc='Fold a parent task (hide its children)'
+ alts='fold|f|zc'
+ [[ -z list ]]
+ valid_modes='list fold'
+ eval 'usage_fold="fold <id>"'
++ usage_fold='fold <id>'
+ eval 'desc_fold="Fold a parent task (hide its children)"'
++ desc_fold='Fold a parent task (hide its children)'
+ eval 'words_fold="fold|f|zc"'
++ words_fold='fold|f|zc'
+ [[ fold fold <id> Fold a parent task (hide its children) fold|f|zc SUPPORTS_ALL == *SUPPORTS_ALL* ]]
+ [[ -z list ]]
+ modes_that_support_all='list|fold'
+ [[ fold fold <id> Fold a parent task (hide its children) fold|f|zc SUPPORTS_ALL == *PASSIVE* ]]
+ addcmd unfold 'unfold <id>' 'Unfold a parent task (show its children)' 'unfold|u|zo' SUPPORTS_ALL
+ local cmd usage desc alts
+ cmd=unfold
+ usage='unfold <id>'
+ desc='Unfold a parent task (show its children)'
+ alts='unfold|u|zo'
+ [[ -z list fold ]]
+ valid_modes='list fold unfold'
+ eval 'usage_unfold="unfold <id>"'
++ usage_unfold='unfold <id>'
+ eval 'desc_unfold="Unfold a parent task (show its children)"'
++ desc_unfold='Unfold a parent task (show its children)'
+ eval 'words_unfold="unfold|u|zo"'
++ words_unfold='unfold|u|zo'
+ [[ unfold unfold <id> Unfold a parent task (show its children) unfold|u|zo SUPPORTS_ALL == *SUPPORTS_ALL* ]]
+ [[ -z list|fold ]]
+ modes_that_support_all='list|fold|unfold'
+ [[ unfold unfold <id> Unfold a parent task (show its children) unfold|u|zo SUPPORTS_ALL == *PASSIVE* ]]
+ addcmd toggle 'toggle <id>' 'Fold/Unfold a parent task' 'toggle|z|zz' SUPPORTS_ALL
+ local cmd usage desc alts
+ cmd=toggle
+ usage='toggle <id>'
+ desc='Fold/Unfold a parent task'
+ alts='toggle|z|zz'
+ [[ -z list fold unfold ]]
+ valid_modes='list fold unfold toggle'
+ eval 'usage_toggle="toggle <id>"'
++ usage_toggle='toggle <id>'
+ eval 'desc_toggle="Fold/Unfold a parent task"'
++ desc_toggle='Fold/Unfold a parent task'
+ eval 'words_toggle="toggle|z|zz"'
++ words_toggle='toggle|z|zz'
+ [[ toggle toggle <id> Fold/Unfold a parent task toggle|z|zz SUPPORTS_ALL == *SUPPORTS_ALL* ]]
+ [[ -z list|fold|unfold ]]
+ modes_that_support_all='list|fold|unfold|toggle'
+ [[ toggle toggle <id> Fold/Unfold a parent task toggle|z|zz SUPPORTS_ALL == *PASSIVE* ]]
+ addcmd done 'done <taskid>' 'Complete a task' 'done|x|complete' SUPPORTS_ALL
+ local cmd usage desc alts
+ cmd=done
+ usage='done <taskid>'
+ desc='Complete a task'
+ alts='done|x|complete'
+ [[ -z list fold unfold toggle ]]
+ valid_modes='list fold unfold toggle done'
+ eval 'usage_done="done <taskid>"'
++ usage_done='done <taskid>'
+ eval 'desc_done="Complete a task"'
++ desc_done='Complete a task'
+ eval 'words_done="done|x|complete"'
++ words_done='done|x|complete'
+ [[ done done <taskid> Complete a task done|x|complete SUPPORTS_ALL == *SUPPORTS_ALL* ]]
+ [[ -z list|fold|unfold|toggle ]]
+ modes_that_support_all='list|fold|unfold|toggle|done'
+ [[ done done <taskid> Complete a task done|x|complete SUPPORTS_ALL == *PASSIVE* ]]
+ addcmd notdone 'notdone <taskid>' 'Uncomplete a task' 'notdone|o|incomplete|uncomplete|clear' SUPPORTS_ALL
+ local cmd usage desc alts
+ cmd=notdone
+ usage='notdone <taskid>'
+ desc='Uncomplete a task'
+ alts='notdone|o|incomplete|uncomplete|clear'
+ [[ -z list fold unfold toggle done ]]
+ valid_modes='list fold unfold toggle done notdone'
+ eval 'usage_notdone="notdone <taskid>"'
++ usage_notdone='notdone <taskid>'
+ eval 'desc_notdone="Uncomplete a task"'
++ desc_notdone='Uncomplete a task'
+ eval 'words_notdone="notdone|o|incomplete|uncomplete|clear"'
++ words_notdone='notdone|o|incomplete|uncomplete|clear'
+ [[ notdone notdone <taskid> Uncomplete a task notdone|o|incomplete|uncomplete|clear SUPPORTS_ALL == *SUPPORTS_ALL* ]]
+ [[ -z list|fold|unfold|toggle|done ]]
+ modes_that_support_all='list|fold|unfold|toggle|done|notdone'
+ [[ notdone notdone <taskid> Uncomplete a task notdone|o|incomplete|uncomplete|clear SUPPORTS_ALL == *PASSIVE* ]]
+ addcmd add 'add [parent] <name>' 'Add a new task [as subtask of parent]' 'a|add|new|create'
+ local cmd usage desc alts
+ cmd=add
+ usage='add [parent] <name>'
+ desc='Add a new task [as subtask of parent]'
+ alts='a|add|new|create'
+ [[ -z list fold unfold toggle done notdone ]]
+ valid_modes='list fold unfold toggle done notdone add'
+ eval 'usage_add="add [parent] <name>"'
++ usage_add='add [parent] <name>'
+ eval 'desc_add="Add a new task [as subtask of parent]"'
++ desc_add='Add a new task [as subtask of parent]'
+ eval 'words_add="a|add|new|create"'
++ words_add='a|add|new|create'
+ [[ add add [parent] <name> Add a new task [as subtask of parent] a|add|new|create == *SUPPORTS_ALL* ]]
+ [[ add add [parent] <name> Add a new task [as subtask of parent] a|add|new|create == *PASSIVE* ]]
+ addcmd del 'del [id1] .. [idX]' 'Delete given task(s)' 'del|rm|delete'
+ local cmd usage desc alts
+ cmd=del
+ usage='del [id1] .. [idX]'
+ desc='Delete given task(s)'
+ alts='del|rm|delete'
+ [[ -z list fold unfold toggle done notdone add ]]
+ valid_modes='list fold unfold toggle done notdone add del'
+ eval 'usage_del="del [id1] .. [idX]"'
++ usage_del='del [id1] .. [idX]'
+ eval 'desc_del="Delete given task(s)"'
++ desc_del='Delete given task(s)'
+ eval 'words_del="del|rm|delete"'
++ words_del='del|rm|delete'
+ [[ del del [id1] .. [idX] Delete given task(s) del|rm|delete == *SUPPORTS_ALL* ]]
+ [[ del del [id1] .. [idX] Delete given task(s) del|rm|delete == *PASSIVE* ]]
+ addcmd cleanup cleanup 'Delete all completed tasks' 'cleanup|clean|flush|dc'
+ local cmd usage desc alts
+ cmd=cleanup
+ usage=cleanup
+ desc='Delete all completed tasks'
+ alts='cleanup|clean|flush|dc'
+ [[ -z list fold unfold toggle done notdone add del ]]
+ valid_modes='list fold unfold toggle done notdone add del cleanup'
+ eval 'usage_cleanup="cleanup"'
++ usage_cleanup=cleanup
+ eval 'desc_cleanup="Delete all completed tasks"'
++ desc_cleanup='Delete all completed tasks'
+ eval 'words_cleanup="cleanup|clean|flush|dc"'
++ words_cleanup='cleanup|clean|flush|dc'
+ [[ cleanup cleanup Delete all completed tasks cleanup|clean|flush|dc == *SUPPORTS_ALL* ]]
+ [[ cleanup cleanup Delete all completed tasks cleanup|clean|flush|dc == *PASSIVE* ]]
+ addcmd rename 'rename <id> <newname>' 'Rename given task' rename
+ local cmd usage desc alts
+ cmd=rename
+ usage='rename <id> <newname>'
+ desc='Rename given task'
+ alts=rename
+ [[ -z list fold unfold toggle done notdone add del cleanup ]]
+ valid_modes='list fold unfold toggle done notdone add del cleanup rename'
+ eval 'usage_rename="rename <id> <newname>"'
++ usage_rename='rename <id> <newname>'
+ eval 'desc_rename="Rename given task"'
++ desc_rename='Rename given task'
+ eval 'words_rename="rename"'
++ words_rename=rename
+ [[ rename rename <id> <newname> Rename given task rename == *SUPPORTS_ALL* ]]
+ [[ rename rename <id> <newname> Rename given task rename == *PASSIVE* ]]
+ addcmd left 'left <id>' 'Decrease indent of given task' 'left|h|out|up'
+ local cmd usage desc alts
+ cmd=left
+ usage='left <id>'
+ desc='Decrease indent of given task'
+ alts='left|h|out|up'
+ [[ -z list fold unfold toggle done notdone add del cleanup rename ]]
+ valid_modes='list fold unfold toggle done notdone add del cleanup rename left'
+ eval 'usage_left="left <id>"'
++ usage_left='left <id>'
+ eval 'desc_left="Decrease indent of given task"'
++ desc_left='Decrease indent of given task'
+ eval 'words_left="left|h|out|up"'
++ words_left='left|h|out|up'
+ [[ left left <id> Decrease indent of given task left|h|out|up == *SUPPORTS_ALL* ]]
+ [[ left left <id> Decrease indent of given task left|h|out|up == *PASSIVE* ]]
+ addcmd right 'right <id> <parent>' 'Move task below the given parent' 'right|l|mv|in'
+ local cmd usage desc alts
+ cmd=right
+ usage='right <id> <parent>'
+ desc='Move task below the given parent'
+ alts='right|l|mv|in'
+ [[ -z list fold unfold toggle done notdone add del cleanup rename left ]]
+ valid_modes='list fold unfold toggle done notdone add del cleanup rename left right'
+ eval 'usage_right="right <id> <parent>"'
++ usage_right='right <id> <parent>'
+ eval 'desc_right="Move task below the given parent"'
++ desc_right='Move task below the given parent'
+ eval 'words_right="right|l|mv|in"'
++ words_right='right|l|mv|in'
+ [[ right right <id> <parent> Move task below the given parent right|l|mv|in == *SUPPORTS_ALL* ]]
+ [[ right right <id> <parent> Move task below the given parent right|l|mv|in == *PASSIVE* ]]
+ addcmd note 'note <id> <notes>' 'Change notes for given task' 'note|desc|description|comment'
+ local cmd usage desc alts
+ cmd=note
+ usage='note <id> <notes>'
+ desc='Change notes for given task'
+ alts='note|desc|description|comment'
+ [[ -z list fold unfold toggle done notdone add del cleanup rename left right ]]
+ valid_modes='list fold unfold toggle done notdone add del cleanup rename left right note'
+ eval 'usage_note="note <id> <notes>"'
++ usage_note='note <id> <notes>'
+ eval 'desc_note="Change notes for given task"'
++ desc_note='Change notes for given task'
+ eval 'words_note="note|desc|description|comment"'
++ words_note='note|desc|description|comment'
+ [[ note note <id> <notes> Change notes for given task note|desc|description|comment == *SUPPORTS_ALL* ]]
+ [[ note note <id> <notes> Change notes for given task note|desc|description|comment == *PASSIVE* ]]
+ addcmd tag 'tag <id> <tag>' 'Add a tag to the given task' 'tag|t'
+ local cmd usage desc alts
+ cmd=tag
+ usage='tag <id> <tag>'
+ desc='Add a tag to the given task'
+ alts='tag|t'
+ [[ -z list fold unfold toggle done notdone add del cleanup rename left right note ]]
+ valid_modes='list fold unfold toggle done notdone add del cleanup rename left right note tag'
+ eval 'usage_tag="tag <id> <tag>"'
++ usage_tag='tag <id> <tag>'
+ eval 'desc_tag="Add a tag to the given task"'
++ desc_tag='Add a tag to the given task'
+ eval 'words_tag="tag|t"'
++ words_tag='tag|t'
+ [[ tag tag <id> <tag> Add a tag to the given task tag|t == *SUPPORTS_ALL* ]]
+ [[ tag tag <id> <tag> Add a tag to the given task tag|t == *PASSIVE* ]]
+ addcmd untag 'untag <id> <tag>' 'Remove a tag from the given task' 'untag|ut'
+ local cmd usage desc alts
+ cmd=untag
+ usage='untag <id> <tag>'
+ desc='Remove a tag from the given task'
+ alts='untag|ut'
+ [[ -z list fold unfold toggle done notdone add del cleanup rename left right note tag ]]
+ valid_modes='list fold unfold toggle done notdone add del cleanup rename left right note tag untag'
+ eval 'usage_untag="untag <id> <tag>"'
++ usage_untag='untag <id> <tag>'
+ eval 'desc_untag="Remove a tag from the given task"'
++ desc_untag='Remove a tag from the given task'
+ eval 'words_untag="untag|ut"'
++ words_untag='untag|ut'
+ [[ untag untag <id> <tag> Remove a tag from the given task untag|ut == *SUPPORTS_ALL* ]]
+ [[ untag untag <id> <tag> Remove a tag from the given task untag|ut == *PASSIVE* ]]
+ addcmd sync sync 'Sync tasks using vdirsyncer' sync
+ local cmd usage desc alts
+ cmd=sync
+ usage=sync
+ desc='Sync tasks using vdirsyncer'
+ alts=sync
+ [[ -z list fold unfold toggle done notdone add del cleanup rename left right note tag untag ]]
+ valid_modes='list fold unfold toggle done notdone add del cleanup rename left right note tag untag sync'
+ eval 'usage_sync="sync"'
++ usage_sync=sync
+ eval 'desc_sync="Sync tasks using vdirsyncer"'
++ desc_sync='Sync tasks using vdirsyncer'
+ eval 'words_sync="sync"'
++ words_sync=sync
+ [[ sync sync Sync tasks using vdirsyncer sync == *SUPPORTS_ALL* ]]
+ [[ sync sync Sync tasks using vdirsyncer sync == *PASSIVE* ]]
+ addcmd view 'view <id>' 'Show detailed info for given task' 'v|view|info|vcal' PASSIVE
+ local cmd usage desc alts
+ cmd=view
+ usage='view <id>'
+ desc='Show detailed info for given task'
+ alts='v|view|info|vcal'
+ [[ -z list fold unfold toggle done notdone add del cleanup rename left right note tag untag sync ]]
+ valid_modes='list fold unfold toggle done notdone add del cleanup rename left right note tag untag sync view'
+ eval 'usage_view="view <id>"'
++ usage_view='view <id>'
+ eval 'desc_view="Show detailed info for given task"'
++ desc_view='Show detailed info for given task'
+ eval 'words_view="v|view|info|vcal"'
++ words_view='v|view|info|vcal'
+ [[ view view <id> Show detailed info for given task v|view|info|vcal PASSIVE == *SUPPORTS_ALL* ]]
+ [[ view view <id> Show detailed info for given task v|view|info|vcal PASSIVE == *PASSIVE* ]]
+ [[ -z list ]]
+ passive_modes='list|view'
+ DEBUG=0
+ TESTMODE=0
+ AUTOSYNC=0
++ cat /Users/rpearce/.task_cli/defaultcal
+ CALID=f8a6add82fe4466ab03ccb7ca5bd861a
+ ARGS=fhic:dstyl:r:
+ getopts fhic:dstyl:r: i
+ case "$i" in
+ CALID=haven
+ getopts fhic:dstyl:r: i
+ shift 2
+ dir=/Users/rpearce/.task_cli/allcals/haven
+ idfile=/Users/rpearce/.task_cli/idmappings_haven
+ [[ ! -e /Users/rpearce/.task_cli/idmappings_haven ]]
+ oooo
/Users/rpearce/code/task_cli/t.sh: line 1448: oooo: command not found
+ warn 'No ID mapping file found for calendar '\''haven'\'' (/Users/rpearce/.task_cli/idmappings_haven)'
+ echo -e '\033[1m\033[33mWARNING: \033[0m\033[33mNo ID mapping file found for calendar '\''haven'\'' (/Users/rpearce/.task_cli/idmappings_haven)\033[0m'
WARNING: No ID mapping file found for calendar 'haven' (/Users/rpearce/.task_cli/idmappings_haven)
+ confirm 'Create one from existing tasks?'
+ local yn
+ [[ '' -eq 1 ]]
+ echo -en '\033[1m\033[35mCONFIRM: \033[0m\033[35mCreate one from existing tasks? (y/N)? \033[0m'
CONFIRM: Create one from existing tasks? (y/N)? + read yn
+ [[ y == \y ]]
+ return 0
+ [[ 0 -eq 0 ]]
+ loadtasks -v
+ local f ess x thislev par parid show thissum thisdesc
+ local verbose=0
+ maxid=-1
+ maxindent=-1
+ maxtaskwidth=-1
+ ntasks=0
+ [[ 1 -ge 1 ]]
+ [[ -v == \-\v ]]
+ verbose=1
+ shift 1
+ [[ 0 -ge 1 ]]
+ dblog 'Loading tasks...'
+ [[ 0 -eq 1 ]]
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res='sum©Black moutain 1hr 10 min©uid©MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw©checked©0©folded©0'
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum='Black moutain 1hr 10 min'
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw
++ getorgenid MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw
++ local res uid v=0
++ uid=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw
+++ getid MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw
+++ local res id uid
+++ uid=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw
+ taskid[$id]=1
+ tasksum[$id]='Black moutain 1hr 10 min'
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt -1 ]]
+ maxid=1
+ [[ 24 -gt '' ]]
+ taskwid=24
+ [[ 0 -gt 24 ]]
+ [[ -z MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDo4MjIyMDMzMw ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=1
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res='sum©Mount Ainlie 47 min©uid©MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4©checked©0©folded©0'
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum='Mount Ainlie 47 min'
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4
++ getorgenid MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4
++ local res uid v=0
++ uid=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4
+++ getid MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4
+++ local res id uid
+++ uid=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4
+ taskid[$id]=1
+ tasksum[$id]='Mount Ainlie 47 min'
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 19 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxMDYxOTYwMjQ4 ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=2
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res=sum©Today©uid©MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0©checked©0©folded©0
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum=Today
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0
++ getorgenid MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0
++ local res uid v=0
++ uid=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0
+++ getid MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0
+++ local res id uid
+++ uid=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0
+ taskid[$id]=1
+ tasksum[$id]=Today
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 5 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoxNTQ4MDM0OTQ5MDE4NzY0 ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=3
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res='sum©Sharpen knives©uid©MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy©checked©0©folded©0'
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum='Sharpen knives'
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy
++ getorgenid MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy
++ local res uid v=0
++ uid=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy
+++ getid MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy
+++ local res id uid
+++ uid=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy
+ taskid[$id]=1
+ tasksum[$id]='Sharpen knives'
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 14 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z MDUwODgwMDU5NjE1MjY0NjkzNzk6MTEwNzgzNzEwNDoyOTk2MzU2MzcyNTgxNTEy ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=4
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/NWpWRmJHVmt0bHdCS0VFWQ.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/NWpWRmJHVmt0bHdCS0VFWQ.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/NWpWRmJHVmt0bHdCS0VFWQ.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/NWpWRmJHVmt0bHdCS0VFWQ.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/NWpWRmJHVmt0bHdCS0VFWQ.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res=sum©Outside©uid©NWpWRmJHVmt0bHdCS0VFWQ©checked©0©folded©0
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum=Outside
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=NWpWRmJHVmt0bHdCS0VFWQ
++ getorgenid NWpWRmJHVmt0bHdCS0VFWQ
++ local res uid v=0
++ uid=NWpWRmJHVmt0bHdCS0VFWQ
+++ getid NWpWRmJHVmt0bHdCS0VFWQ
+++ local res id uid
+++ uid=NWpWRmJHVmt0bHdCS0VFWQ
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=NWpWRmJHVmt0bHdCS0VFWQ
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=NWpWRmJHVmt0bHdCS0VFWQ
+ taskid[$id]=1
+ tasksum[$id]=Outside
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 7 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z NWpWRmJHVmt0bHdCS0VFWQ ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=5
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/R2RIVmNPRkxEdFctQzlBeA.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/R2RIVmNPRkxEdFctQzlBeA.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/R2RIVmNPRkxEdFctQzlBeA.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/R2RIVmNPRkxEdFctQzlBeA.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/R2RIVmNPRkxEdFctQzlBeA.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res='sum©Clean out pantry©uid©R2RIVmNPRkxEdFctQzlBeA©checked©0©folded©0'
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum='Clean out pantry'
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=R2RIVmNPRkxEdFctQzlBeA
++ getorgenid R2RIVmNPRkxEdFctQzlBeA
++ local res uid v=0
++ uid=R2RIVmNPRkxEdFctQzlBeA
+++ getid R2RIVmNPRkxEdFctQzlBeA
+++ local res id uid
+++ uid=R2RIVmNPRkxEdFctQzlBeA
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=R2RIVmNPRkxEdFctQzlBeA
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=R2RIVmNPRkxEdFctQzlBeA
+ taskid[$id]=1
+ tasksum[$id]='Clean out pantry'
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 16 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z R2RIVmNPRkxEdFctQzlBeA ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=6
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/RDZXS0RIWmlSdGlCY0V2MA.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/RDZXS0RIWmlSdGlCY0V2MA.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/RDZXS0RIWmlSdGlCY0V2MA.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/RDZXS0RIWmlSdGlCY0V2MA.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/RDZXS0RIWmlSdGlCY0V2MA.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res='sum©Shopping list©uid©RDZXS0RIWmlSdGlCY0V2MA©checked©0©folded©0'
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum='Shopping list'
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=RDZXS0RIWmlSdGlCY0V2MA
++ getorgenid RDZXS0RIWmlSdGlCY0V2MA
++ local res uid v=0
++ uid=RDZXS0RIWmlSdGlCY0V2MA
+++ getid RDZXS0RIWmlSdGlCY0V2MA
+++ local res id uid
+++ uid=RDZXS0RIWmlSdGlCY0V2MA
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=RDZXS0RIWmlSdGlCY0V2MA
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=RDZXS0RIWmlSdGlCY0V2MA
+ taskid[$id]=1
+ tasksum[$id]='Shopping list'
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 13 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z RDZXS0RIWmlSdGlCY0V2MA ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=7
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/Ti10LU1iaWhEdEM3aWw2NA.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/Ti10LU1iaWhEdEM3aWw2NA.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/Ti10LU1iaWhEdEM3aWw2NA.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/Ti10LU1iaWhEdEM3aWw2NA.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/Ti10LU1iaWhEdEM3aWw2NA.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res='sum©Wash oven ©uid©Ti10LU1iaWhEdEM3aWw2NA©checked©0©folded©0'
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum='Wash oven '
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=Ti10LU1iaWhEdEM3aWw2NA
++ getorgenid Ti10LU1iaWhEdEM3aWw2NA
++ local res uid v=0
++ uid=Ti10LU1iaWhEdEM3aWw2NA
+++ getid Ti10LU1iaWhEdEM3aWw2NA
+++ local res id uid
+++ uid=Ti10LU1iaWhEdEM3aWw2NA
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=Ti10LU1iaWhEdEM3aWw2NA
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=Ti10LU1iaWhEdEM3aWw2NA
+ taskid[$id]=1
+ tasksum[$id]='Wash oven '
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 10 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z Ti10LU1iaWhEdEM3aWw2NA ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=8
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/VWVIOWlEWVhoNXBVeS1aSg.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/VWVIOWlEWVhoNXBVeS1aSg.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/VWVIOWlEWVhoNXBVeS1aSg.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/VWVIOWlEWVhoNXBVeS1aSg.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/VWVIOWlEWVhoNXBVeS1aSg.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res='sum©Change all passwords©uid©VWVIOWlEWVhoNXBVeS1aSg©checked©0©folded©0'
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum='Change all passwords'
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=VWVIOWlEWVhoNXBVeS1aSg
++ getorgenid VWVIOWlEWVhoNXBVeS1aSg
++ local res uid v=0
++ uid=VWVIOWlEWVhoNXBVeS1aSg
+++ getid VWVIOWlEWVhoNXBVeS1aSg
+++ local res id uid
+++ uid=VWVIOWlEWVhoNXBVeS1aSg
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=VWVIOWlEWVhoNXBVeS1aSg
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=VWVIOWlEWVhoNXBVeS1aSg
+ taskid[$id]=1
+ tasksum[$id]='Change all passwords'
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 20 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z VWVIOWlEWVhoNXBVeS1aSg ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=9
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/WWhZdVA3eHNMMGNlR294Rw.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/WWhZdVA3eHNMMGNlR294Rw.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/WWhZdVA3eHNMMGNlR294Rw.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/WWhZdVA3eHNMMGNlR294Rw.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/WWhZdVA3eHNMMGNlR294Rw.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res='sum©Kmart glasses©uid©WWhZdVA3eHNMMGNlR294Rw©checked©0©folded©0'
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum='Kmart glasses'
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=WWhZdVA3eHNMMGNlR294Rw
++ getorgenid WWhZdVA3eHNMMGNlR294Rw
++ local res uid v=0
++ uid=WWhZdVA3eHNMMGNlR294Rw
+++ getid WWhZdVA3eHNMMGNlR294Rw
+++ local res id uid
+++ uid=WWhZdVA3eHNMMGNlR294Rw
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=WWhZdVA3eHNMMGNlR294Rw
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=WWhZdVA3eHNMMGNlR294Rw
+ taskid[$id]=1
+ tasksum[$id]='Kmart glasses'
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 13 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z WWhZdVA3eHNMMGNlR294Rw ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=10
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/c0tyZXhWSzY0bVRXQlk5VA.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/c0tyZXhWSzY0bVRXQlk5VA.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/c0tyZXhWSzY0bVRXQlk5VA.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/c0tyZXhWSzY0bVRXQlk5VA.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/c0tyZXhWSzY0bVRXQlk5VA.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res=sum©Inside©uid©c0tyZXhWSzY0bVRXQlk5VA©checked©0©folded©0
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum=Inside
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=c0tyZXhWSzY0bVRXQlk5VA
++ getorgenid c0tyZXhWSzY0bVRXQlk5VA
++ local res uid v=0
++ uid=c0tyZXhWSzY0bVRXQlk5VA
+++ getid c0tyZXhWSzY0bVRXQlk5VA
+++ local res id uid
+++ uid=c0tyZXhWSzY0bVRXQlk5VA
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=c0tyZXhWSzY0bVRXQlk5VA
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=c0tyZXhWSzY0bVRXQlk5VA
+ taskid[$id]=1
+ tasksum[$id]=Inside
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 6 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z c0tyZXhWSzY0bVRXQlk5VA ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=11
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/dXRXa3FIUnNZa1FXMmtFUA.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/dXRXa3FIUnNZa1FXMmtFUA.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/dXRXa3FIUnNZa1FXMmtFUA.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/dXRXa3FIUnNZa1FXMmtFUA.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/dXRXa3FIUnNZa1FXMmtFUA.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res='sum©IKEA cabinet swap©uid©dXRXa3FIUnNZa1FXMmtFUA©checked©0©folded©0'
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum='IKEA cabinet swap'
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=dXRXa3FIUnNZa1FXMmtFUA
++ getorgenid dXRXa3FIUnNZa1FXMmtFUA
++ local res uid v=0
++ uid=dXRXa3FIUnNZa1FXMmtFUA
+++ getid dXRXa3FIUnNZa1FXMmtFUA
+++ local res id uid
+++ uid=dXRXa3FIUnNZa1FXMmtFUA
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=dXRXa3FIUnNZa1FXMmtFUA
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=dXRXa3FIUnNZa1FXMmtFUA
+ taskid[$id]=1
+ tasksum[$id]='IKEA cabinet swap'
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 17 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z dXRXa3FIUnNZa1FXMmtFUA ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=12
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/dmZ0bUtjWUtIQ0txUnVveQ.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/dmZ0bUtjWUtIQ0txUnVveQ.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/dmZ0bUtjWUtIQ0txUnVveQ.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/dmZ0bUtjWUtIQ0txUnVveQ.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/dmZ0bUtjWUtIQ0txUnVveQ.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res='sum©Pressure blue dust©uid©dmZ0bUtjWUtIQ0txUnVveQ©checked©0©folded©0'
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum='Pressure blue dust'
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=dmZ0bUtjWUtIQ0txUnVveQ
++ getorgenid dmZ0bUtjWUtIQ0txUnVveQ
++ local res uid v=0
++ uid=dmZ0bUtjWUtIQ0txUnVveQ
+++ getid dmZ0bUtjWUtIQ0txUnVveQ
+++ local res id uid
+++ uid=dmZ0bUtjWUtIQ0txUnVveQ
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=dmZ0bUtjWUtIQ0txUnVveQ
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=dmZ0bUtjWUtIQ0txUnVveQ
+ taskid[$id]=1
+ tasksum[$id]='Pressure blue dust'
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 18 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z dmZ0bUtjWUtIQ0txUnVveQ ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=13
+ for f in '$dir/*.vcf'
+ dblog '--> loading from /Users/rpearce/.task_cli/allcals/haven/dzZ0RVd6TEtHTDBPY0R1Xw.vcf'
+ [[ 0 -eq 1 ]]
+ loadtask /Users/rpearce/.task_cli/allcals/haven/dzZ0RVd6TEtHTDBPY0R1Xw.vcf
+ local uid sum checked folded desc file id parent res i cats
+ dblog 'open /Users/rpearce/.task_cli/allcals/haven/dzZ0RVd6TEtHTDBPY0R1Xw.vcf'
+ [[ 0 -eq 1 ]]
+ file=/Users/rpearce/.task_cli/allcals/haven/dzZ0RVd6TEtHTDBPY0R1Xw.vcf
++ cat /Users/rpearce/.task_cli/allcals/haven/dzZ0RVd6TEtHTDBPY0R1Xw.vcf
++ awk -F: 'BEGIN { checked=0; folded=0; } /^UID:/ { printf("uid©%s©",$2); } /^SUMMARY:/ { sub("SUMMARY:",""); printf("sum©%s©",$0); } /^CATEGORIES:/ { sub("^CATEGORIES:",""); printf("cats©%s©",$0); } /^DESCRIPTION:/ { sub("DESCRIPTION:",""); printf("desc©%s©",$0); } /^RELATED-TO/ { sub("^RELATED-TO.*:",""); printf("parent©%s©",$0); } /^X-OC-HIDESUBTASKS:1/ { folded=1; } /^STATUS:COMPLETED/ { checked=1; } END { printf("checked©%d©folded©%d\n",checked,folded); }'
+ res='sum©Baby book©uid©dzZ0RVd6TEtHTDBPY0R1Xw©checked©0©folded©0'
+ IFS=©
+ read -ra tok
+ parent=
+ i=0
+ [[ ! -z sum ]]
+ dblog 'process token '\''sum'\'''
+ [[ 0 -eq 1 ]]
+ [[ sum == \u\i\d ]]
+ [[ sum == \s\u\m ]]
+ sum='Baby book'
+ i=2
+ [[ ! -z uid ]]
+ dblog 'process token '\''uid'\'''
+ [[ 0 -eq 1 ]]
+ [[ uid == \u\i\d ]]
+ uid=dzZ0RVd6TEtHTDBPY0R1Xw
++ getorgenid dzZ0RVd6TEtHTDBPY0R1Xw
++ local res uid v=0
++ uid=dzZ0RVd6TEtHTDBPY0R1Xw
+++ getid dzZ0RVd6TEtHTDBPY0R1Xw
+++ local res id uid
+++ uid=dzZ0RVd6TEtHTDBPY0R1Xw
+++ res=
+++ echo
+++ [[ -z '' ]]
+++ return 1
++ res=
++ echo 'getid returned '
getid returned
++ [[ -z '' ]]
++ res=1
++ echo 'generated res 1'
generated res 1
++ idmap[$nextid]=dzZ0RVd6TEtHTDBPY0R1Xw
++ nextid=2
++ echo 'new nextid is 2'
new nextid is 2
++ needsave=1
++ echo 1
+ id=1
+ i=4
+ [[ ! -z checked ]]
+ dblog 'process token '\''checked'\'''
+ [[ 0 -eq 1 ]]
+ [[ checked == \u\i\d ]]
+ [[ checked == \s\u\m ]]
+ [[ checked == \c\a\t\s ]]
+ [[ checked == \d\e\s\c ]]
+ [[ checked == \p\a\r\e\n\t ]]
+ [[ checked == \c\h\e\c\k\e\d ]]
+ checked=0
+ i=6
+ [[ ! -z folded ]]
+ dblog 'process token '\''folded'\'''
+ [[ 0 -eq 1 ]]
+ [[ folded == \u\i\d ]]
+ [[ folded == \s\u\m ]]
+ [[ folded == \c\a\t\s ]]
+ [[ folded == \d\e\s\c ]]
+ [[ folded == \p\a\r\e\n\t ]]
+ [[ folded == \c\h\e\c\k\e\d ]]
+ [[ folded == \f\o\l\d\e\d ]]
+ folded=0
+ i=8
+ [[ ! -z '' ]]
+ IFS=' '
+ taskuid[$id]=dzZ0RVd6TEtHTDBPY0R1Xw
+ taskid[$id]=1
+ tasksum[$id]='Baby book'
+ taskcats[$id]=
+ taskdesc[$id]=
+ taskchecked[$id]=0
+ taskfolded[$id]=0
+ taskparent[$id]=
+ [[ 0 -eq 1 ]]
+ [[ 1 -gt 1 ]]
+ [[ 9 -gt 24 ]]
+ [[ 0 -gt 24 ]]
+ [[ -z dzZ0RVd6TEtHTDBPY0R1Xw ]]
+ return 0
+ echo 'loadtasks() nextid is 1'
loadtasks() nextid is 1
+ ntasks=14
+ numwid=1
+ echo 'loadtasks() final nextid is 1 maxid is 1 ntasks is 14'
loadtasks() final nextid is 1 maxid is 1 ntasks is 14
+ dblog 'Calculating max indent level'
+ [[ 0 -eq 1 ]]
+ for x in '${!taskuid[@]}'
+ show=1
+ par=
+ [[ ! -z '' ]]
+ dblog ' uid 1 id [1] parent [] parent [] show [1]'
+ [[ 0 -eq 1 ]]
+ [[ 1 -eq 1 ]]
+ dblog ' ->showing 1 [Baby book]'
+ [[ 0 -eq 1 ]]
++ getindentlevel 1
++ local id thisid parentuid parentid level
++ id=1
++ thisid=1
++ level=0
++ '[' '!' -z ']'
++ echo 0
+ thislev=0
+ dblog ' ->lv: 0'
+ [[ 0 -eq 1 ]]
+ [[ 0 -gt -1 ]]
+ maxindent=0
+ thissum='Baby book'
+ thisdesc=
+ [[ 9 -gt -1 ]]
+ maxtaskwidth=9
+ [[ 0 -gt 9 ]]
+ dblog ' ->sum: Baby book'
+ [[ 0 -eq 1 ]]
+ [[ 14 -eq 1 ]]
+ ess=s
+ [[ 1 -eq 1 ]]
+ action 'Finished loading 14 tasks.'
+ echo -e '\033[1m\033[32m* \033[0m\033[32mFinished loading 14 tasks.\033[0m'
* Finished loading 14 tasks.
+ dblog 'Finished loading 14 tasks.'
+ [[ 0 -eq 1 ]]
+ return 0
+ echo 'nextid is 1'
nextid is 1
+ echo 'idmap count is 0'
idmap count is 0
+ saveids -v
+ local id verbose=0
+ local ess nids=0
+ [[ -v -eq -v ]]
+ verbose=1
+ [[ 0 -gt 0 ]]
+ [[ 1 -eq 1 ]]
+ warn 'No ID mappings found to save'
+ echo -e '\033[1m\033[33mWARNING: \033[0m\033[33mNo ID mappings found to save\033[0m'
WARNING: No ID mappings found to save
+ return 1
+ exit 1