From be80c31e712bd4c0efbc91dbcca4133fc2cf08c4 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:22:16 +0100 Subject: [PATCH] Update weekly_stats_graphs.yaml --- .github/workflows/weekly_stats_graphs.yaml | 38 +++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/weekly_stats_graphs.yaml b/.github/workflows/weekly_stats_graphs.yaml index 78e4cee48..91971824f 100644 --- a/.github/workflows/weekly_stats_graphs.yaml +++ b/.github/workflows/weekly_stats_graphs.yaml @@ -139,7 +139,43 @@ jobs: ) #plot for [i=1:*] 'Stats3' using 0:i rm Stats3 - + - name: Create individual stats + run: | + # Prepare data + cp Stats Stats3 + # Remove Totals + sed -i "2d" Stats3 + # Transpose data + awk ' + { + for (i=1; i<=NF; i++) { + a[NR,i] = $i + } + } + NF>p { p = NF } + END { + for(j=1; j<=p; j++) { + str=a[1,j] + for(i=2; i<=NR; i++){ + str=str" "a[i,j]; + } + print str + } + }' Stats3 > StatsTmp && mv StatsTmp Stats3 + # For each addon, create graph + input="Stats3" + while IFS= read -r line + do + TITLE="${line%% *}" + FOLDER="$(grep -rl "ghcr.io/alexbelgium/$TITLE-" */* | xargs dirname)" + # if folder exists + if [ -d "$FOLDER" ]; then + echo "$TITLE" + fi + done < "$input" + # Clean files + rm Stats3 + - name: Commit if needed uses: EndBug/add-and-commit@v9 with: