Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2021/03 #3

Merged
merged 17 commits into from Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions results/3BLD.csv
Expand Up @@ -2,12 +2,14 @@
3BLD,2020/05/23,36.82,16.38,20.44
3BLD (正しく埋まっているピース0),2020/03/22,40.43,19.83,20.60
3BLD (DNF),,,,
3BLD (FU/UFR),2021/01/29,52.99,,
3BLD (FU/UFR),2021/03/30,47.26,,
3BLD mo3,2020/05/28,42.95,,
3BLD ao50,2020/05/26,45.77,,
3BLD ao5,2020/05/26,45.77,,
3BLD ao12,2020/02/16,2:03.49,,
3BLD ao50,2020/02/17,3:04,,
3BLD 開眼,,,,
ECEC,2020/05/08,48.54,26.86,21.68
ECEC (FU/UFR),2021/03/19,1:30.82,43.33,47.49
エッジのみソルブ,2020/04/29,15.00,6.06,8.94
エッジのみソルブ (12文字),2020/03/29,19.77,7.25,12.52
コーナーのみソルブ,2019/05/26,15.85,,
Expand Down
4 changes: 2 additions & 2 deletions results/4BLD.csv
@@ -1,9 +1,9 @@
種目,日付,結果,分析記憶,実行
4BLD,2021/02/27,4:28.94,2:04,2:24
4BLD,2021/03/14,3:38.15,1:39,1:59
4BLD (DNF),2021/02/27,4:11.68,2:07,2:04
4BLD mo3,2019/03/31,13:50.00,,
4BLD開眼,2021/02/25,2:23.77,,
Xのみソルブ,2021/02/27,1:35.14,0:38,0:57
Xのみソルブ,2021/03/07,1:22.17,0:37,0:45
Wのみソルブ,2021/02/28,1:49.43,x:xx,x:xx
Cのみソルブ,2021/02/01,17.40,7.70,9.69
単発National Rank,2019/03/30,11,,
Expand Down
6 changes: 3 additions & 3 deletions results/5BLD.csv
@@ -1,12 +1,12 @@
種目,日付,結果,分析記憶,実行
5BLD,2021/02/28,11:14.36,5:31,5:43
5BLD,2021/03/15,9:53.62,4:24.75,5:28.87
5BLD (DNF),2021/02/18,10:25.28,4:31,5:54
5BLD mo3,2021/01/10,16:16.7,,
5BLD開眼,2021/01/30,4:18,,
Tのみソルブ,2021/02/19,2:04.17,0:48,1:16
Tのみソルブ,2021/03/02,1:42.68,0:38,1:04
Xのみソルブ,2021/02/06,1:34,0:38,0:56
Wのみソルブ,2021/02/25,1:46.95,0:51,0:55
MCのみソルブ,2021/02/16,1:35.04,0:27,1:08
MCのみソルブ,2021/03/01,1:26.92,0:32,0:54
単発National Rank,2018/12/23,11,,
平均National Rank,2019/08/12,2,,
単発Continental Rank,2019/04/27,82,,
Expand Down
6 changes: 3 additions & 3 deletions results/accumulated_solve_time.csv
@@ -1,7 +1,7 @@
種目,日付,結果
直近30日,2021/02/28,12:46:40.94
直近7日(2日休み),2021/02/21,03:23:31.91
直近7日(3日休み),2021/02/22,04:48:29.99
直近30日,2021/03/22,15:16:25.56
直近7日(2日休み),2021/03/02,05:41:13.68
直近7日(3日休み),2021/03/01,05:37:53.78
直近7日(4日休み),2021/02/28,06:39:29.44
直近7日(5日休み),,
直近7日(6日休み),,
Expand Down
26 changes: 22 additions & 4 deletions shell/commit_one_line_update.sh 100644 → 100755
@@ -1,11 +1,11 @@
#!/bin/bash
#!/bin/zsh

set -ue

# 変更が1行だけか確認する
ll=$(git diff --numstat HEAD | wc -l | awk '{print $1}' | tr -d '\n')
insertion=$(git diff --numstat HEAD | awk '{print $1}' | tr -d '\n')
deletion=$(git diff --numstat HEAD | awk '{print $2}' | tr -d '\n')
insertion=$(git diff --numstat HEAD | awk '{ s += $1 } END{print s}' | tr -d '\n')
deletion=$(git diff --numstat HEAD | awk '{ s += $2 } END{print s}' | tr -d '\n')

if [[ $ll -ne 1 ]] || [[ $insertion -ne 1 ]] || [[ $deletion -ne 1 ]]; then
echo "Error: ${ll} file changed, ${insertion} insertion, ${deletion} deletion" >&2
Expand All @@ -15,7 +15,25 @@ fi
# diffから、4BLD (FU/UFR) 5:09.37=[2:24]+2:45のような文字列を生成する
# 変更した行の情報によっては変なメッセージになるが、
# その場合はコミット後に手で直してgit commit --amendする想定
msg=$(git diff --unified=0 HEAD | grep -v '+++' | grep '^+' | sed -e 's/^+//' | awk -F, '{print $1" "$3"=["$4"]+"$5}')
diff_line=$(git diff --unified=0 HEAD | grep -v '^+++' | grep '^+' | sed -e 's/^+//')
event_col=$(echo $diff_line | cut -d ',' -f1)
diff_file_path=$(git diff --unified=0 HEAD | grep '^+++' | cut -d ' ' -f2)
diff_file_name=${diff_file_path:t:r}

msg=""
if [[ $(echo $event_col | grep -c 'のみソルブ') -eq 1 ]]; then
event_en=$(echo $event_col | awk -F 'のみソルブ' '
$1 == "T" {printf("t-center")}
$1 == "X" {printf("x-center")}
$1 == "W" {printf("w-edge")}
$1 == "MC" {printf("MC")}')

result=$(echo $diff_line | awk -F, '{print $3"=["$4"]+"$5}')
msg="${diff_file_name} ${event_en} only ${result}"
else
msg=$(git diff --unified=0 HEAD | grep -v '+++' | grep '^+' | sed -e 's/^+//' | awk -F, '{print $1" "$3"=["$4"]+"$5}')
fi


# git commit時にメッセージが出るので、ここでは出さない
# echo $msg
Expand Down