From 5959ae6a9ed97f7158484a705880e6373c0149b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=93=E5=96=B5=E9=85=B1?= Date: Sat, 15 Feb 2020 11:43:08 +0000 Subject: [PATCH] Update README.md --- README.md | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/README.md b/README.md index 669c70e..95f97a1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,119 @@ # todo-ddl Todo CLI with DDLs on nodejs. + + +## Architecture + +### overview + +```js +|todo-ddl +| +|---config +| |---email +| |---remote url +| +|---td +| |---task +| |---todo +| |---history +| +|---ddl +| +|---log +| + +``` + +### td structure + +```js + +td new td add td done +------> --------> ---------> + task todo history +<------ <-------- <--------- + td rm td return td recover + +``` + + + + +## Commands + +### config set ++ `td config [-e email] [-r remote]`: Set + + +### td set + ++ `td new [class]`: Create new tesk.. ++ `td add `: Add task to todo.. ++ `td done `: Finish todo.. ++ `td recover`: Recover todo from history.. ++ `td return `: Return todo to task.. ++ `td rm `: Remove task.. + ++ `td ls`: List todos.. ++ `td lt`: List tasks.. ++ `td history`: List history + +### log set + ++ `td select `: Select todo for loging.. ++ `td log `: Record logs.. ++ `td ll`: List logs.. ++ `td rml `: Remove log.. + +### ddl set + ++ `td newd `: Create new ddl.. ++ `td link `: Link task to ddl.. ++ `td ld`: List ddls.. ++ `td rmd `: Remove ddl.. + +### systemctl + ++ `td init`: Reset all.. ++ `td push`: Push local to remote.. ++ `td pull`: Pull from remote.. ++ `td sync`: Sync with remote.. + + +## Data structure + +```js +config:{ + email: "", + remote: "https://api.yimian.xyz/todo-ddl/" +} + + +data:{ + td:{[{ + id: 'a2s3s2ds', + name: '', + class: 'default', + createTime: (new Date()).valueOf(), + todoTime: (new Date()).valueOf(), + endTime: (new Date()).valueOf(), + idDel: false, + logs: [{ + id: 'fdkr8ei9odleiw93', + content: '', + createTime: (new Date()).valueOf() + }] + }]}, + + ddl: {[{ + id: 'di8eio', + name: '', + class: 'default', + link: [], + createTime: (new Date()).valueOf(), + expireTime: (new Date()).valueOf(), + }]} +} + +```