Add slip for the git message
This commit is contained in:
20
phase0.sh
20
phase0.sh
@@ -1,10 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
TIME="$1 year ago"
|
||||
|
||||
|
||||
IFS=$'\n'
|
||||
DATA=(`git log --since="1 week ago" --until="now" --no-merges --format='"%H","%ct","%an","%ae","%s",'`)
|
||||
LINES=(`git log --since="1 week ago" --until="now" --no-merges --pretty=tformat: --shortstat | gawk '(NF > 0){ printf "%s,%s\n",$1,$4 }' -`)
|
||||
echo "Load data"
|
||||
DATA=(`git log --since="$TIME" --until="now" --no-merges --format='%ct,%an,%ae'`)
|
||||
echo "Load add/remove lines"
|
||||
LINES=(`git log --since="$TIME" --until="now" --no-merges --pretty=tformat: --shortstat | gawk '(NF > 0){ printf ",%s,%s\n",$1,$4 }' -`)
|
||||
echo "Load word"
|
||||
WORD=(`git log --since="$TIME" --until="now" --no-merges --format=',%s'`)
|
||||
|
||||
echo "Create .csv"
|
||||
touch gitlogy.csv
|
||||
|
||||
i=0
|
||||
while [ $i -lt ${#DATA[@]} ]; do
|
||||
echo "${DATA[$i]}${LINES[$i]}"
|
||||
echo "${DATA[$i]}${LINES[$i]}${WORD[$i]}" >> gitlogy.csv
|
||||
i=$[i + 1]
|
||||
done
|
||||
|
||||
echo "Parse message"
|
||||
sed -i -e "s/\ /,/g" gitlogy.csv
|
||||
|
||||
Reference in New Issue
Block a user