Skip to content

Commit

Permalink
improve layout
Browse files Browse the repository at this point in the history
  • Loading branch information
vilaca committed Apr 6, 2024
1 parent a5c3600 commit af56cac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
12 changes: 7 additions & 5 deletions scripts/diffs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ do
yesterday["$name"]=$position
done < "yesterday-nr"

echo "|Current|Yesterday|Repository|Change|"
printf '<div align="center">\n\n'

echo "|Current|Yesterday|Repository|Up/Dn|"
echo "|:---:|:---:|:---|:---:|"
#draw chart
while IFS="" read -r line || [ -n "$line" ]
Expand All @@ -23,17 +25,17 @@ do
move=""
if ((position < last))
then
move="⬆️"
move="🔼"
elif ((position > last))
then
move="⬇️"
move="🔽"
else
move="-"
fi

echo "|$position|${last:--}|$name|$move|"
echo "|$position|${last:--}|[$name]($name)|$move|"
done < "today-nr"

printf '\n\n<div>\n'



8 changes: 4 additions & 4 deletions scripts/utils/yesterday.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
current_date=$(date +%s)
seven_days=$((7 * 24 * 60 * 60))
seven_days_ago=$((current_date - seven_days))
seven_days_ago_date=$(date -d "@$seven_days_ago" +%d-%m-%Y)
echo $seven_days_ago_date
yesterday=$((1 * 24 * 60 * 60))
yesterday_ago=$((current_date - yesterday))
yesterday_ago_date=$(date -d "@$yesterday_ago" +%d-%m-%Y)
echo $yesterday_ago_date

0 comments on commit af56cac

Please sign in to comment.