sh wtsync.sh {action} {document_id} {file}"
Important:
- ensure
~/.wordstree
exists- ensure token is a line
First, you need a token. For that, you can run:
sh wtsync.sh
That will create ~/.wordstree
and prompt for you to add your credentials.
Still ugly
sh wtsync.sh pull {document-id} --show
sh wtsync.sh pull {document-id} {file}
sh wtsync.sh pull {document-id} {file} --markdown
- check that we have 3 parameters
- check that we have a valid file location
- ensure valid token & auth check
- if not, then ask for email & password
- ensure valid document id