Skip to content

lurongkai/st-workhours

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

自动填写iEMS工作量脚本

pre-requirements

  • python 3.x
  • pip

初始化

pip install -r requirements.txt

关于iwh.conf

请复制iwh.conf.example并重命名为iwh.conf:

cp iwh.conf.example iwh.conf

打开iwh.conf,填入正确的usernamepassword,必要的话可以更改daily_hours参数。

如何使用

运行以下命令,从服务器拉取项目参数:

python iwh.py init

生成projects.json文件包含如下信息,请打开projects.json文件,修改每个项目中hours字段,填入正确的小时数(默认8小时)。

projects.json成功生成后,运行python iwh.py run可以提交当天的工作量。

还有?

该程序可以自动检测当前日期是否为工作日,所以,如果有一台24小时运行的linux,或者路由器,或者...等,就可以使用crontab来自动化运行了,比如:

PYTHONIOENCODING=UTF-8
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
# execute iwh on 9am, every day
0 9 * * * python path-to-iwh.py run

别忘了添加前三行,很重要。

About

fill daily workhours automatically

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages