geeks4change / spex
此包的最新版本(1.0.x-dev)没有提供许可证信息。
从SuperProductivity备份中提取时间报告。
1.0.x-dev
2021-11-26 18:11 UTC
Requires
- ext-posix: *
- doctrine/common: ^3.1
- symfony/console: ^5.2
- symfony/property-access: ^5.2
- symfony/property-info: ^5.2
- symfony/serializer: ^5.2
This package is auto-updated.
Last update: 2024-08-27 00:00:29 UTC
README
帮助从SuperProductivity记录时间日志。
这包含一些硬编码的假设,例如SuperProductivity在Ubuntu上以Snap的形式运行。
1a) (首选) 全局安装并通过bin-plugin安全运行
# (If not already done) Add global bin dir for ubuntu to your $PATH
>>~/.profile echo -e "\nPATH=$(composer global config bin-dir --absolute --quiet):\$PATH"
source ~/.profile
# (If not already done) Require the bin plugin globally.
composer global require bamarni/composer-bin-plugin
# For package separation, this should be the only thing required outside a bin.
# Require spex in its bin.
composer global bin spex require geeks4change/spex
1b) 在项目目录中安装
运行composer require geeks4change/spex
,然后运行bin/spex
/ bin/spex-sync
2) 查询
# Show help
spex
# Query by User, Week, Project, Day, Task.
spex uwpdt
# Filter by user, week, project-prefix.
spex t -u merlin -w+0-3 -p g4c
# Query synced data.
spex ut -f
# Show debug data
spex t -v
3a) 从现有仓库设置同步
mkdir -p ~/.local/share/spex
cd ~/.local/share/spex
git clone git@remote:my/repo data
touch "data/$USER.json.age""
# If you have another repo, too:
# git clone git@remote:other/repo other
3b) 从零开始设置同步
# If you do not have a ssh key, do `ssh-keygen -t rsa`
# You can add other dirs besides "data".
mkdir -p ~/.local/share/spex/data
cd -p ~/.local/share/spex/data
## Change as needed
echo "project-prefix1" >project-prefixes.txt
echo "project-prefix2" >>project-prefixes.txt
cat ~/.ssh/id_rsa.pub >authorized_keys.txt
cat ~/some/other/id_rsa.pub >>authorized_keys.txt
touch "$USER.json.age"
git init && git add . && git commit -m Init
git remote add origin git@remote:my/repo
4) 通过安装'rage'准备同步
# Go to releases and use latest!
wget https://github.com/str4d/rage/releases/download/v0.5.1/rage_0.5.1_amd64.deb
sudo apt install rage_0.5.1_amd64.deb
5) 执行同步
# This will pull, sync, commit, and push.
spex-sync