@3dprogramin/tasktracker 中文文档教程
Task tracker
在 nodejs
Installation
npm install @3dprogramin/tasktracker
或
git clone https://github.com/3dprogramin/tasktracker
Usage
const tasktracker = require('@3dprogramin/tasktracker');
Restart time
tasktracker.restart().then(function(data){
send_os_notif('Time restarted');
}).catch(function(err){
send_os_notif(format('Error: {}', err.message));
});
Get passed time
tasktracker.passed_time().then(function(passed_time){
send_os_notif(format('Started to track {}', passed_time));
}).catch(function(err){
send_os_notif(format('Error: {}', err.message));
});
中构建一个简单的任务时间跟踪器send osnotif 方法执行一个操作系统命令,在 屏幕。 方法可以在示例中找到
Example
该示例包含一个开箱即用的工作程序(如果您使用的是带有 OpenBox 的 ArchLinux) 如果你没有,请确保你安装了 notify-send
一旦你开始工作,你可以设置一个热键来让它更容易,我使用了 obkey
目前
,它接受两个参数:restart
和 show
Usage
重启时间跟踪器
node example/index.js restart
显示经过的时间
node example/index.js show
License
MIT
Task tracker
A simple task time tracker build in nodejs
Installation
npm install @3dprogramin/tasktracker
or
git clone https://github.com/3dprogramin/tasktracker
Usage
const tasktracker = require('@3dprogramin/tasktracker');
Restart time
tasktracker.restart().then(function(data){
send_os_notif('Time restarted');
}).catch(function(err){
send_os_notif(format('Error: {}', err.message));
});
Get passed time
tasktracker.passed_time().then(function(passed_time){
send_os_notif(format('Started to track {}', passed_time));
}).catch(function(err){
send_os_notif(format('Error: {}', err.message));
});
The sendosnotif method executes a OS command, that prints an alert on the screen. Method can be found inside example
Example
The example contains an out-of-the-box working program (if you're on ArchLinux with OpenBox) If you're not, make sure you have notify-send
installed
Once you have that working, you can set a hotkey to make it even easier, I've used obkey
to do that
Currently, it accepts two arguments: restart
and show
Usage
Restart time tracker
node example/index.js restart
Show passed time
node example/index.js show
License
MIT