mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Update weekly_stats.yaml
This commit is contained in:
5
.github/workflows/weekly_stats.yaml
vendored
5
.github/workflows/weekly_stats.yaml
vendored
@@ -34,6 +34,7 @@ jobs:
|
||||
# Go through all folders, add to filters if not existing
|
||||
# shellcheck disable=SC2086
|
||||
for f in $( find -- * -maxdepth 0 -type d | sort -r ); do
|
||||
echo "Look at $f"
|
||||
DOWNLOADS=0
|
||||
if [ -f "$f"/config.json ]; then
|
||||
SLUG="$(jq -r '.image' "$f/config.json" | awk -F 'alexbelgium/|-{arch' '{print $2}')"
|
||||
@@ -110,17 +111,20 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Install apps
|
||||
run: |
|
||||
echo "Install apps"
|
||||
sudo apt-get install gawk -y
|
||||
sudo apt-get install gnuplot-nox -y
|
||||
- name: Create global stats
|
||||
run: |
|
||||
# Prepare data
|
||||
echo "Copy file"
|
||||
cp Stats Stats3
|
||||
# Inverse file
|
||||
gawk -i inplace '{for(i=NF;i>1;i--)printf "%s ",$i;printf "%s",$1;print ""}' Stats3
|
||||
# Only totals
|
||||
head -n 2 Stats3 > tmp_file && mv tmp_file Stats3
|
||||
# Transpose data
|
||||
echo "Transpose data"
|
||||
awk '
|
||||
{
|
||||
for (i=1; i<=NF; i++) {
|
||||
@@ -139,6 +143,7 @@ jobs:
|
||||
}' Stats3 > StatsTmp && mv StatsTmp Stats3
|
||||
sed -i "1d" Stats3
|
||||
# Plot graph
|
||||
echo "Create graph"
|
||||
gnuplot-nox -persist <<-EOFMarker
|
||||
set title 'Total addons'
|
||||
set ylabel 'Number of installations'
|
||||
|
||||
Reference in New Issue
Block a user